flexi_generators 0.2.10 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +17 -0
- data/Gemfile +4 -0
- data/LICENSE +22 -0
- data/README.md +29 -0
- data/Rakefile +2 -16
- data/flexi_generators.gemspec +17 -114
- data/lib/flexi_generators.rb +11 -0
- data/lib/generators/flexi/config/config_generator.rb +25 -0
- data/lib/generators/flexi/config/templates/field_error.rb +9 -0
- data/lib/generators/flexi/config/templates/inflector_portuguese.rb +62 -0
- data/lib/generators/flexi/config/templates/pt-BR.yml +224 -0
- data/lib/generators/flexi/config/templates/will_paginate.rb +26 -0
- data/lib/generators/flexi/install/install_generator.rb +28 -0
- data/lib/generators/flexi/install/templates/application.css +15 -0
- data/lib/generators/flexi/install/templates/application.js +16 -0
- data/lib/generators/flexi/layout/layout_generator.rb +46 -0
- data/lib/generators/flexi/layout/templates/_flash.html.erb +4 -0
- data/lib/generators/flexi/layout/templates/_navbar.html.erb +6 -0
- data/lib/generators/flexi/layout/templates/_sidebar.html.erb +16 -0
- data/lib/generators/flexi/layout/templates/_user_dropdown.html.erb +11 -0
- data/lib/generators/flexi/layout/templates/application.css +16 -0
- data/lib/generators/flexi/layout/templates/dashboard.html.erb +49 -0
- data/lib/generators/flexi/layout/templates/error_messages_helper.rb +33 -0
- data/lib/generators/flexi/layout/templates/layout.css +8 -0
- data/lib/generators/flexi/layout/templates/layout.html.erb +76 -0
- data/lib/generators/flexi/layout/templates/layout_helper.rb +47 -0
- data/lib/generators/flexi/scaffold/scaffold_generator.rb +24 -109
- data/lib/generators/flexi/scaffold/templates/_form.html.erb +22 -0
- data/lib/generators/flexi/scaffold/templates/edit.html.erb +1 -0
- data/lib/generators/flexi/scaffold/templates/index.html.erb +36 -0
- data/lib/generators/flexi/scaffold/templates/new.html.erb +1 -0
- data/lib/generators/flexi/scaffold/templates/show.html.erb +21 -0
- data/lib/twitter-bootstrap/engine.rb +6 -0
- data/lib/twitter-bootstrap/railtie.rb +6 -0
- data/lib/twitter-bootstrap/version.rb +5 -0
- data/lib/version.rb +3 -0
- data/vendor/assets/images/glyphicons-halflings-white.png +0 -0
- data/vendor/assets/images/glyphicons-halflings.png +0 -0
- data/vendor/assets/javascripts/bootstrap.js +1825 -0
- data/vendor/assets/stylesheets/bootstrap-responsive.css +815 -0
- data/vendor/assets/stylesheets/bootstrap.css +4983 -0
- metadata +51 -89
- data/README.textile +0 -64
- data/VERSION +0 -1
- data/lib/generators/flexi.rb +0 -16
- data/lib/generators/flexi/auth/USAGE +0 -5
- data/lib/generators/flexi/auth/auth_generator.rb +0 -122
- data/lib/generators/flexi/auth/templates/authentication.rb +0 -55
- data/lib/generators/flexi/auth/templates/authlogic_session.rb +0 -2
- data/lib/generators/flexi/auth/templates/fixtures.yml +0 -24
- data/lib/generators/flexi/auth/templates/migration.rb +0 -16
- data/lib/generators/flexi/auth/templates/sessions_controller.rb +0 -26
- data/lib/generators/flexi/auth/templates/sessions_helper.rb +0 -2
- data/lib/generators/flexi/auth/templates/tests/testunit/sessions_controller.rb +0 -20
- data/lib/generators/flexi/auth/templates/tests/testunit/user.rb +0 -4
- data/lib/generators/flexi/auth/templates/tests/testunit/users_controller.rb +0 -23
- data/lib/generators/flexi/auth/templates/user.rb +0 -3
- data/lib/generators/flexi/auth/templates/users_controller.rb +0 -43
- data/lib/generators/flexi/auth/templates/users_helper.rb +0 -2
- data/lib/generators/flexi/auth/templates/views/erb/_error_messages.html.erb +0 -11
- data/lib/generators/flexi/auth/templates/views/erb/_menu.html.erb +0 -16
- data/lib/generators/flexi/auth/templates/views/erb/application.html.erb +0 -39
- data/lib/generators/flexi/auth/templates/views/erb/edit.html.erb +0 -24
- data/lib/generators/flexi/auth/templates/views/erb/index.html.erb +0 -27
- data/lib/generators/flexi/auth/templates/views/erb/login.html.erb +0 -22
- data/lib/generators/flexi/auth/templates/views/erb/new.html.erb +0 -24
- data/lib/generators/flexi/auth/templates/views/erb/show.html.erb +0 -16
- data/lib/generators/flexi/prepare/USAGE +0 -6
- data/lib/generators/flexi/prepare/prepare_generator.rb +0 -68
- data/lib/generators/flexi/prepare/templates/add.png +0 -0
- data/lib/generators/flexi/prepare/templates/admin_home_controller.rb +0 -6
- data/lib/generators/flexi/prepare/templates/admin_home_index.html.erb +0 -16
- data/lib/generators/flexi/prepare/templates/application.css +0 -279
- data/lib/generators/flexi/prepare/templates/application_helper.rb +0 -44
- data/lib/generators/flexi/prepare/templates/back.png +0 -0
- data/lib/generators/flexi/prepare/templates/bg.png +0 -0
- data/lib/generators/flexi/prepare/templates/bg2.png +0 -0
- data/lib/generators/flexi/prepare/templates/boxheader.gif +0 -0
- data/lib/generators/flexi/prepare/templates/btn-bg-hover.png +0 -0
- data/lib/generators/flexi/prepare/templates/btn-bg.png +0 -0
- data/lib/generators/flexi/prepare/templates/custom_field_error.rb +0 -12
- data/lib/generators/flexi/prepare/templates/delete.png +0 -0
- data/lib/generators/flexi/prepare/templates/edit.png +0 -0
- data/lib/generators/flexi/prepare/templates/inflector_portuguese.rb +0 -60
- data/lib/generators/flexi/prepare/templates/login.css +0 -142
- data/lib/generators/flexi/prepare/templates/login.html.erb +0 -26
- data/lib/generators/flexi/prepare/templates/logo.png +0 -0
- data/lib/generators/flexi/prepare/templates/menu.png +0 -0
- data/lib/generators/flexi/prepare/templates/messages/Thumbs.db +0 -0
- data/lib/generators/flexi/prepare/templates/messages/error.png +0 -0
- data/lib/generators/flexi/prepare/templates/messages/info.png +0 -0
- data/lib/generators/flexi/prepare/templates/messages/success.png +0 -0
- data/lib/generators/flexi/prepare/templates/messages/tip.png +0 -0
- data/lib/generators/flexi/prepare/templates/messages/warning.png +0 -0
- data/lib/generators/flexi/prepare/templates/pt-BR.yml +0 -206
- data/lib/generators/flexi/prepare/templates/routes.rb +0 -3
- data/lib/generators/flexi/prepare/templates/show.png +0 -0
- data/lib/generators/flexi/prepare/templates/site.css +0 -72
- data/lib/generators/flexi/prepare/templates/site.html.erb +0 -20
- data/lib/generators/flexi/prepare/templates/site_controller.rb +0 -9
- data/lib/generators/flexi/prepare/templates/site_helper.rb +0 -2
- data/lib/generators/flexi/prepare/templates/site_index.html.erb +0 -27
- data/lib/generators/flexi/prepare/templates/users.png +0 -0
- data/lib/generators/flexi/scaffold/USAGE +0 -5
- data/lib/generators/flexi/scaffold/templates/controller.rb +0 -43
- data/lib/generators/flexi/scaffold/templates/fixtures.yml +0 -9
- data/lib/generators/flexi/scaffold/templates/helper.rb +0 -2
- data/lib/generators/flexi/scaffold/templates/migration.rb +0 -14
- data/lib/generators/flexi/scaffold/templates/model.rb +0 -3
- data/lib/generators/flexi/scaffold/templates/tests/controller.rb +0 -50
- data/lib/generators/flexi/scaffold/templates/tests/helper.rb +0 -4
- data/lib/generators/flexi/scaffold/templates/tests/model.rb +0 -8
- data/lib/generators/flexi/scaffold/templates/views/erb/_error_messages.html.erb +0 -11
- data/lib/generators/flexi/scaffold/templates/views/erb/_form.html.erb +0 -13
- data/lib/generators/flexi/scaffold/templates/views/erb/edit.html.erb +0 -3
- data/lib/generators/flexi/scaffold/templates/views/erb/index.html.erb +0 -29
- data/lib/generators/flexi/scaffold/templates/views/erb/new.html.erb +0 -3
- data/lib/generators/flexi/scaffold/templates/views/erb/show.html.erb +0 -15
- data/template.rb +0 -15
Binary file
|
@@ -1,16 +0,0 @@
|
|
1
|
-
<%% title("Admin::Home") %>
|
2
|
-
<h1>Primeiros passos</h1>
|
3
|
-
<ul>
|
4
|
-
<li>
|
5
|
-
<h2>Edite este layout em app/views/layouts/application.html.erb</h2>
|
6
|
-
<p>Crie seu layout, menus e altere o logo e estilos.</p>
|
7
|
-
</li>
|
8
|
-
<li>
|
9
|
-
<h2>Edite esta página em app/views/admin/home/index.html.erb</h2>
|
10
|
-
<p>Crie sua página administrativa.</p>
|
11
|
-
</li>
|
12
|
-
<li>
|
13
|
-
<h2>Gere seu scaffold</h2>
|
14
|
-
<p>rails g flexi_scaffold Post title:string body:text</p>
|
15
|
-
</li>
|
16
|
-
</ul>
|
@@ -1,279 +0,0 @@
|
|
1
|
-
/* Basic */
|
2
|
-
html { background: url('/images/bg.png');}
|
3
|
-
body {
|
4
|
-
margin:0;
|
5
|
-
padding:0;
|
6
|
-
background: url('/images/bg2.png') repeat-x top;
|
7
|
-
font-family: Arial,Helvetica,sans-serif;
|
8
|
-
font-size: 13px;
|
9
|
-
color: #333333;
|
10
|
-
}
|
11
|
-
a {text-decoration: none;}
|
12
|
-
a:hover {text-decoration: underline;}
|
13
|
-
input[type=text],input[type=password],input[type=file],select,textarea {
|
14
|
-
padding: 5px;
|
15
|
-
border-top: solid 1px #c4c4c4;
|
16
|
-
border-left: solid 1px #e9e9e9;
|
17
|
-
border-bottom: solid 1px #e9e9e9;
|
18
|
-
border-right: solid 1px #c4c4c4;
|
19
|
-
-moz-border-radius:5px;
|
20
|
-
}
|
21
|
-
.logout{ color:#D30000; font-weight:bold;}
|
22
|
-
.login { font-weight:bold; }
|
23
|
-
label { font-weight:bold;}
|
24
|
-
h1, h2 { padding:2px; margin:2px; }
|
25
|
-
a img { border: none; }
|
26
|
-
a { color: #0000FF; }
|
27
|
-
.clear { clear: both; height: 0; overflow: hidden; }
|
28
|
-
div#control_box {
|
29
|
-
-moz-border-radius:5px;
|
30
|
-
background-color:#F3F3F3;
|
31
|
-
border:1px solid #E5E5E5;
|
32
|
-
padding:5px;
|
33
|
-
text-align:center;
|
34
|
-
}
|
35
|
-
div#title_box {
|
36
|
-
background-color:#F3F3F3;
|
37
|
-
border:1px solid #E5E5E5;
|
38
|
-
padding:1px;
|
39
|
-
text-align:center;
|
40
|
-
}
|
41
|
-
div#new_box { padding:0 0 15px; }
|
42
|
-
ul.actions {visibility:hidden; margin:0; padding:0;}
|
43
|
-
ul.actions li {display:inline; margin-right:5px;}
|
44
|
-
.field{padding-bottom:15px;}
|
45
|
-
|
46
|
-
/* Pagination */
|
47
|
-
.pagination{ margin-top: 15px; text-align: center; }
|
48
|
-
.pagination a {
|
49
|
-
color:#008BBF;
|
50
|
-
-moz-border-radius:5px 5px 5px 5px;
|
51
|
-
border:1px solid #CCCCCC;
|
52
|
-
margin:0 2px;
|
53
|
-
padding:3px 6px;
|
54
|
-
}
|
55
|
-
.pagination span {
|
56
|
-
-moz-border-radius:5px 5px 5px 5px;
|
57
|
-
border:1px solid #CCCCCC;
|
58
|
-
margin:0 2px;
|
59
|
-
padding:3px 6px;
|
60
|
-
}
|
61
|
-
.pagination em {
|
62
|
-
color:#fff;
|
63
|
-
padding:3px 6px;
|
64
|
-
margin:0 2px;
|
65
|
-
background: #398BD1 url("/images/btn-bg.png") repeat-x scroll center top;
|
66
|
-
text-shadow:0 -1px 1px rgba(0, 0, 0, 0.25);
|
67
|
-
-moz-border-radius :5px;
|
68
|
-
border:1px solid rgba(0, 0, 0, 0.25);
|
69
|
-
}
|
70
|
-
|
71
|
-
/* Navigation */
|
72
|
-
#sidenav {
|
73
|
-
width: 156px;
|
74
|
-
float:left;
|
75
|
-
background-color: #F3F3F3;
|
76
|
-
padding: 0px 0px 0px 0px;
|
77
|
-
font-size: 14px;
|
78
|
-
font-weight: bold;
|
79
|
-
margin: 0px 0px 0px 0px;
|
80
|
-
}
|
81
|
-
#sidenav ul {
|
82
|
-
list-style-type:none;
|
83
|
-
list-style-position:outside;
|
84
|
-
list-style-image: none;
|
85
|
-
padding:0px 0px 0px 0px;
|
86
|
-
margin:0px 0px 0px 0px;
|
87
|
-
}
|
88
|
-
#sidenav li { }
|
89
|
-
#sidenav li a {
|
90
|
-
width: 156px;
|
91
|
-
display:block;
|
92
|
-
width:93%;
|
93
|
-
height: 100%;
|
94
|
-
line-height: 25px;
|
95
|
-
border-bottom: 1px solid #DDDDDD;
|
96
|
-
padding-left: 10px;
|
97
|
-
color: #4E5660;
|
98
|
-
}
|
99
|
-
#sidenav li a:hover { background: #FFFADF; }
|
100
|
-
#sidenav li.current a {background: #DFF6FF; color: #000; }
|
101
|
-
|
102
|
-
div.top_nav{
|
103
|
-
text-align: right;
|
104
|
-
width: 900px;
|
105
|
-
margin: 0 auto;
|
106
|
-
border-bottom:1px solid #4E5660;
|
107
|
-
margin-bottom: 10px;
|
108
|
-
padding-bottom: 2px;
|
109
|
-
padding-top: 2px;
|
110
|
-
text-shadow:0 1px 0 #FFFFFF;
|
111
|
-
color: #333333;
|
112
|
-
font-size: 15px;
|
113
|
-
font-weight: bold;
|
114
|
-
}
|
115
|
-
|
116
|
-
/* Content */
|
117
|
-
div#header{ width: 900px; margin: 0 auto; }
|
118
|
-
#container {
|
119
|
-
width: 900px;
|
120
|
-
overflow: auto;
|
121
|
-
margin: 0 auto;
|
122
|
-
margin-top: 10px;
|
123
|
-
}
|
124
|
-
|
125
|
-
#main{
|
126
|
-
width: 733px;
|
127
|
-
float:right;
|
128
|
-
padding: 0 ;
|
129
|
-
margin:0;
|
130
|
-
}
|
131
|
-
|
132
|
-
#main .box table { width: 100%; }
|
133
|
-
#main .box table th {
|
134
|
-
background:url("/images/boxheader.gif") repeat-x scroll 0 0 #E2E2E2;
|
135
|
-
color:#333333;
|
136
|
-
font-weight:bold;
|
137
|
-
text-shadow:1px 1px 1px #FFFFFF;
|
138
|
-
padding:8px;
|
139
|
-
text-align:left;
|
140
|
-
}
|
141
|
-
/*#main table th { background-color: #F3F3F3 }*/
|
142
|
-
#main .box table tr td { border-bottom: 1px solid #DDDDDD; height:40px;}
|
143
|
-
#main .box table tr:hover td { background: #FFFADF none repeat scroll 0 0; }
|
144
|
-
#main .box table tr:hover .actions{ visibility:visible; }
|
145
|
-
|
146
|
-
/* Box */
|
147
|
-
.box {
|
148
|
-
background:#fff;
|
149
|
-
border:1px solid #c5c5c5;
|
150
|
-
margin-bottom:15px;
|
151
|
-
padding:15px;
|
152
|
-
border-top:0;
|
153
|
-
-moz-border-radius-bottomleft :5px;
|
154
|
-
-moz-border-radius-bottomright :5px;
|
155
|
-
-webkit-border-bottom-left-radius:5px;
|
156
|
-
-webkit-border-bottom-right-radius:5px;
|
157
|
-
}
|
158
|
-
.box-header {
|
159
|
-
border:1px solid #c5c5c5;
|
160
|
-
font-weight:bold;
|
161
|
-
text-align:center;
|
162
|
-
font-size:14px;
|
163
|
-
background:#e2e2e2 url('/images/boxheader.gif') repeat-x top;
|
164
|
-
padding:10px 15px;
|
165
|
-
color:#333333;
|
166
|
-
text-shadow:1px 1px 1px #FFFFFF;
|
167
|
-
-moz-border-radius-topleft:5px;
|
168
|
-
-webkit-border-top-left-radius:5px;
|
169
|
-
-moz-border-radius-topright:5px;
|
170
|
-
-webkit-border-top-right-radius:5px;
|
171
|
-
}
|
172
|
-
.menu {
|
173
|
-
background:#fff;
|
174
|
-
border:1px solid #c5c5c5;
|
175
|
-
padding:15px;
|
176
|
-
-moz-border-radius :5px;
|
177
|
-
}
|
178
|
-
|
179
|
-
/* Buttons */
|
180
|
-
.button {
|
181
|
-
cursor:pointer;
|
182
|
-
display:inline-block;
|
183
|
-
font:14px/100% Arial, Helvetica, sans-serif;
|
184
|
-
font-weight:bold;
|
185
|
-
margin:0 5px;
|
186
|
-
outline:none;
|
187
|
-
padding:8px 20px;
|
188
|
-
width:auto;
|
189
|
-
text-align:center;
|
190
|
-
text-decoration:none;
|
191
|
-
vertical-align:baseline;
|
192
|
-
background:#202020 url('/images/btn-bg.png') repeat-x top;
|
193
|
-
color:#fff;
|
194
|
-
border:1px solid rgba(0, 0, 0, 0.25);
|
195
|
-
-moz-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
|
196
|
-
-webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
|
197
|
-
text-shadow:0 -1px 1px rgba(0, 0, 0, 0.25);
|
198
|
-
-moz-border-radius:5px;
|
199
|
-
-webkit-border-radius:5px;
|
200
|
-
}
|
201
|
-
.button:hover {
|
202
|
-
background-image: url('/images/btn-bg-hover.png');
|
203
|
-
text-decoration:none;
|
204
|
-
outline:none;
|
205
|
-
}
|
206
|
-
.button:active {
|
207
|
-
position:relative;
|
208
|
-
top:1px;
|
209
|
-
outline:none;
|
210
|
-
}
|
211
|
-
.button.blue { background-color:#398BD1; }
|
212
|
-
.button.green { background-color:#55a34a; }
|
213
|
-
.button.red { background-color:#d13a39; }
|
214
|
-
.button.yellow { background-color:#c5a059; }
|
215
|
-
.button.grey {
|
216
|
-
background-color:#eee;
|
217
|
-
color:#4d4d4d;
|
218
|
-
text-shadow:0 -1px 1px #fff;
|
219
|
-
}
|
220
|
-
.button.medium {
|
221
|
-
font-size:13px;
|
222
|
-
padding:6px 15px;
|
223
|
-
}
|
224
|
-
.button.medium.save {
|
225
|
-
font-size:13px;
|
226
|
-
padding:4px 15px;
|
227
|
-
}
|
228
|
-
.button.small {
|
229
|
-
font-size:11px;
|
230
|
-
padding:3px 10px;
|
231
|
-
width:auto;
|
232
|
-
}
|
233
|
-
|
234
|
-
/* Notices */
|
235
|
-
.flash_messages {
|
236
|
-
border-width:1px;
|
237
|
-
border-style:solid;
|
238
|
-
padding:17px 17px 17px 55px;
|
239
|
-
-moz-border-radius:5px;
|
240
|
-
margin-bottom:10px;
|
241
|
-
-webkit-border:5px;
|
242
|
-
border-radius:5px;
|
243
|
-
-moz-box-shadow:1px 1px rgba(255, 255, 255, 0.6) inset;
|
244
|
-
-webkit-box-shadow:1px 1px rgba(255, 255, 255, 0.6) inset;
|
245
|
-
}
|
246
|
-
.flash_messages.notice {
|
247
|
-
background:#f1ffbf url('/images/messages/success.png') no-repeat 10px 10px;
|
248
|
-
border-color:#a6d50f;
|
249
|
-
color:#1E5F1D;
|
250
|
-
}
|
251
|
-
.flash_messages.error {
|
252
|
-
background:#fecdc6 url('/images/messages/error.png') no-repeat 10px 10px;
|
253
|
-
border-color:#E17984;
|
254
|
-
color:#9E0B0F;
|
255
|
-
}
|
256
|
-
.flash_messages.warning {
|
257
|
-
background:#ffecb0 url('/images/messages/warning.png') no-repeat 10px 10px;
|
258
|
-
border-color:#ffbc2a;
|
259
|
-
color:#BF8F00;
|
260
|
-
}
|
261
|
-
.flash_messages.info {
|
262
|
-
background:#d4e7f5 url('/images/messages/info.png') no-repeat 10px 10px;
|
263
|
-
border-color:#589ad7;
|
264
|
-
color:#0089EF;
|
265
|
-
}
|
266
|
-
.flash_messages.tip {
|
267
|
-
background:#ffeccd url('/images/messages/tip.png') no-repeat 10px 10px;
|
268
|
-
border-color:#dd9854;
|
269
|
-
color:#CF7E00;
|
270
|
-
}
|
271
|
-
.flash_messages.error_explanation{
|
272
|
-
background:#F9E1DE url('/images/messages/error.png') no-repeat 15px 18px;
|
273
|
-
border-color:#E17984;
|
274
|
-
color:#9E0B0F;
|
275
|
-
}
|
276
|
-
/* Field Errors */
|
277
|
-
input.field_with_errors { background-color:#FFEBEB; border-color: #E17984; }
|
278
|
-
textarea.field_with_errors { background-color:#FFEBEB; border-color: #E17984; }
|
279
|
-
select.field_with_errors { background-color:#FFEBEB; border-color: #E17984; }
|
@@ -1,44 +0,0 @@
|
|
1
|
-
module ApplicationHelper
|
2
|
-
def title(page_title, show_title = true)
|
3
|
-
content_for(:title) { page_title.to_s }
|
4
|
-
@show_title = show_title
|
5
|
-
end
|
6
|
-
|
7
|
-
def show_title?
|
8
|
-
@show_title
|
9
|
-
end
|
10
|
-
|
11
|
-
def stylesheet(*args)
|
12
|
-
content_for(:head) { stylesheet_link_tag(*args) }
|
13
|
-
end
|
14
|
-
|
15
|
-
def javascript(*args)
|
16
|
-
content_for(:head) { javascript_include_tag(*args) }
|
17
|
-
end
|
18
|
-
|
19
|
-
def flash_messages
|
20
|
-
content = ""
|
21
|
-
flash.collect do |key, value|
|
22
|
-
content << content_tag(:div, value, :class=>"flash_messages #{key}")
|
23
|
-
end
|
24
|
-
content
|
25
|
-
end
|
26
|
-
|
27
|
-
def analytics(site_id)
|
28
|
-
html = <<-ANALYTICS
|
29
|
-
<script>
|
30
|
-
var _gaq = [['_setAccount', '#{site_id}'], ['_trackPageview']];
|
31
|
-
(function(d, t) {
|
32
|
-
var g = d.createElement(t),
|
33
|
-
s = d.getElementsByTagName(t)[0];
|
34
|
-
g.async = true;
|
35
|
-
g.src = '//www.google-analytics.com/ga.js';
|
36
|
-
s.parentNode.insertBefore(g, s);
|
37
|
-
})(document, 'script');
|
38
|
-
</script>
|
39
|
-
ANALYTICS
|
40
|
-
|
41
|
-
html.html_safe
|
42
|
-
end
|
43
|
-
|
44
|
-
end
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
@@ -1,12 +0,0 @@
|
|
1
|
-
#Personalizando campos com erro
|
2
|
-
ActionView::Base.field_error_proc = Proc.new do |html_tag, instance|
|
3
|
-
error_class = "field_with_errors"
|
4
|
-
if html_tag =~ /<(input|textarea|select)[^>]+class=/
|
5
|
-
class_attribute = html_tag =~ /class=['"]/
|
6
|
-
html_tag.insert(class_attribute + 7, "#{error_class}; ")
|
7
|
-
elsif html_tag =~ /<(input|textarea|select)/
|
8
|
-
first_whitespace = html_tag =~ /\s/
|
9
|
-
html_tag[first_whitespace] = " class='#{error_class}' "
|
10
|
-
end
|
11
|
-
html_tag
|
12
|
-
end
|
Binary file
|
Binary file
|
@@ -1,60 +0,0 @@
|
|
1
|
-
#encoding: utf-8
|
2
|
-
# Infelizmente não é possível colocar todas as regras...
|
3
|
-
#
|
4
|
-
# http://pt.wikipedia.org/wiki/Plural e
|
5
|
-
# http://pt.wikipedia.org/wiki/Singular
|
6
|
-
|
7
|
-
ActiveSupport::Inflector.inflections do |inflect|
|
8
|
-
inflect.clear
|
9
|
-
inflect.plural(/$/, 's')
|
10
|
-
inflect.plural(/(s)$/i, '\1')
|
11
|
-
inflect.plural(/^(paí)s$/i, '\1ses')
|
12
|
-
#inflect.plural(/(z|r)$/i, '\1es')
|
13
|
-
inflect.plural(/al$/i, 'ais')
|
14
|
-
inflect.plural(/el$/i, 'eis')
|
15
|
-
inflect.plural(/ol$/i, 'ois')
|
16
|
-
inflect.plural(/ul$/i, 'uis')
|
17
|
-
inflect.plural(/([^aeou])il$/i, '\1is')
|
18
|
-
inflect.plural(/m$/i, 'ns')
|
19
|
-
inflect.plural(/^(japon|escoc|ingl|dinamarqu|fregu|portugu)ês$/i, '\1eses')
|
20
|
-
inflect.plural(/^(|g)ás$/i, '\1ases')
|
21
|
-
inflect.plural(/ão$/i, 'ões')
|
22
|
-
inflect.plural(/^(irm|m)ão$/i, '\1ãos')
|
23
|
-
inflect.plural(/^(alem|c|p)ão$/i, '\1ães')
|
24
|
-
inflect.plural(/or$/i, 'ores')
|
25
|
-
# Sem acentos...
|
26
|
-
inflect.plural(/ao$/i, 'oes')
|
27
|
-
inflect.plural(/^(irm|m)ao$/i, '\1aos')
|
28
|
-
inflect.plural(/^(alem|c|p)ao$/i, '\1aes')
|
29
|
-
|
30
|
-
inflect.singular(/ores$/i, 'or')
|
31
|
-
inflect.singular(/([^ê])s$/i, '\1')
|
32
|
-
inflect.singular(/^(á|gá|paí)s$/i, '\1s')
|
33
|
-
inflect.singular(/(r|z)es$/i, '\1')
|
34
|
-
inflect.singular(/([^p])ais$/i, '\1al')
|
35
|
-
inflect.singular(/eis$/i, 'el')
|
36
|
-
inflect.singular(/ois$/i, 'ol')
|
37
|
-
inflect.singular(/uis$/i, 'ul')
|
38
|
-
inflect.singular(/(r|t|f|v)is$/i, '\1il')
|
39
|
-
inflect.singular(/ns$/i, 'm')
|
40
|
-
inflect.singular(/sses$/i, 'sse')
|
41
|
-
inflect.singular(/^(.*[^s]s)es$/i, '\1')
|
42
|
-
inflect.singular(/ães$/i, 'ão')
|
43
|
-
inflect.singular(/aes$/i, 'ao')
|
44
|
-
inflect.singular(/ãos$/i, 'ão')
|
45
|
-
inflect.singular(/aos$/i, 'ao')
|
46
|
-
inflect.singular(/ões$/i, 'ão')
|
47
|
-
inflect.singular(/oes$/i, 'ao')
|
48
|
-
inflect.singular(/(japon|escoc|ingl|dinamarqu|fregu|portugu)eses$/i, '\1ês')
|
49
|
-
inflect.singular(/^(g|)ases$/i, '\1ás')
|
50
|
-
#irregulares
|
51
|
-
#irregulares = {'país' => 'paises'}
|
52
|
-
#
|
53
|
-
#
|
54
|
-
#irregulares.each do |key, value|
|
55
|
-
# inflect.plural(/^#{key.to_s}$/, value)
|
56
|
-
# inflect.singular(/^#{value}$/, key.to_s)
|
57
|
-
#end
|
58
|
-
inflect.uncountable %w( tórax tênis ônibus lápis fênix )
|
59
|
-
end
|
60
|
-
|
@@ -1,142 +0,0 @@
|
|
1
|
-
html { background: url('/images/bg.png');}
|
2
|
-
body {
|
3
|
-
margin:0;
|
4
|
-
padding:0;
|
5
|
-
background: url('/images/bg2.png') repeat-x top;
|
6
|
-
font-family: Arial,Helvetica,sans-serif;
|
7
|
-
font-size: 13px;
|
8
|
-
color: #333333;
|
9
|
-
}
|
10
|
-
a {text-decoration: none;}
|
11
|
-
a:hover {text-decoration: underline;}
|
12
|
-
input[type=text],input[type=password],input[type=file],select,textarea {
|
13
|
-
padding: 5px;
|
14
|
-
border-top: solid 1px #c4c4c4;
|
15
|
-
border-left: solid 1px #e9e9e9;
|
16
|
-
border-bottom: solid 1px #e9e9e9;
|
17
|
-
border-right: solid 1px #c4c4c4;
|
18
|
-
-moz-border-radius:5px;
|
19
|
-
width: 97%;
|
20
|
-
}
|
21
|
-
div#logo{ padding-top:40px; padding-bottom: 10px; text-align:center; }
|
22
|
-
div#control_box { padding:1px; text-align:center; }
|
23
|
-
div#title_box {
|
24
|
-
background-color:#F3F3F3;
|
25
|
-
border:1px solid #E5E5E5;
|
26
|
-
padding:1px;
|
27
|
-
text-align:center;
|
28
|
-
}
|
29
|
-
label { font-weight:bold;}
|
30
|
-
h1, h2 { padding:2px; margin:2px; }
|
31
|
-
a img { border: none; }
|
32
|
-
a { color: #0000FF; }
|
33
|
-
.clear { clear: both; height: 0; overflow: hidden; }
|
34
|
-
#main{
|
35
|
-
width: 633px;
|
36
|
-
float:right;
|
37
|
-
padding: 0 ;
|
38
|
-
margin:0;
|
39
|
-
}
|
40
|
-
#container {
|
41
|
-
width: 400px;
|
42
|
-
overflow: auto;
|
43
|
-
margin: 0 auto;
|
44
|
-
margin-top: 10px;
|
45
|
-
}
|
46
|
-
.login_box{padding-top:20px;padding-bottom:20px;}
|
47
|
-
|
48
|
-
/* Box */
|
49
|
-
.box {
|
50
|
-
background:#fff;
|
51
|
-
border:1px solid #c5c5c5;
|
52
|
-
margin-bottom:15px;
|
53
|
-
padding:15px;
|
54
|
-
border-top:0;
|
55
|
-
-moz-border-radius-bottomleft :5px;
|
56
|
-
-moz-border-radius-bottomright :5px;
|
57
|
-
-webkit-border-bottom-left-radius:5px;
|
58
|
-
-webkit-border-bottom-right-radius:5px;
|
59
|
-
}
|
60
|
-
.box-header {
|
61
|
-
border:1px solid #c5c5c5;
|
62
|
-
font-weight:bold;
|
63
|
-
font-size:14px;
|
64
|
-
text-align:center;
|
65
|
-
background:#e2e2e2 url('/images/boxheader.gif') repeat-x top;
|
66
|
-
padding:10px 15px;
|
67
|
-
color:#333333;
|
68
|
-
text-shadow:1px 1px 1px #FFFFFF;
|
69
|
-
-moz-border-radius-topleft:5px;
|
70
|
-
-webkit-border-top-left-radius:5px;
|
71
|
-
-moz-border-radius-topright:5px;
|
72
|
-
-webkit-border-top-right-radius:5px;
|
73
|
-
}
|
74
|
-
|
75
|
-
/* Buttons */
|
76
|
-
.button {
|
77
|
-
cursor:pointer;
|
78
|
-
display:inline-block;
|
79
|
-
font:14px/100% Arial, Helvetica, sans-serif;
|
80
|
-
font-weight:bold;
|
81
|
-
margin:0 5px;
|
82
|
-
outline:none;
|
83
|
-
padding:8px 20px;
|
84
|
-
width:auto;
|
85
|
-
text-align:center;
|
86
|
-
text-decoration:none;
|
87
|
-
vertical-align:baseline;
|
88
|
-
background:#202020 url('/images/btn-bg.png') repeat-x top;
|
89
|
-
color:#fff;
|
90
|
-
border:1px solid rgba(0, 0, 0, 0.25);
|
91
|
-
-moz-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
|
92
|
-
-webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
|
93
|
-
text-shadow:0 -1px 1px rgba(0, 0, 0, 0.25);
|
94
|
-
-moz-border-radius:5px;
|
95
|
-
-webkit-border-radius:5px;
|
96
|
-
}
|
97
|
-
.button:hover {
|
98
|
-
background-image: url('/images/btn-bg-hover.png');
|
99
|
-
text-decoration:none;
|
100
|
-
outline:none;
|
101
|
-
}
|
102
|
-
.button:active {
|
103
|
-
position:relative;
|
104
|
-
top:1px;
|
105
|
-
outline:none;
|
106
|
-
}
|
107
|
-
.button.blue { background-color:#398BD1; }
|
108
|
-
.button.green { background-color:#97d139; }
|
109
|
-
.button.red { background-color:#d13a39; }
|
110
|
-
.button.grey {
|
111
|
-
background-color:#eee;
|
112
|
-
color:#4d4d4d;
|
113
|
-
text-shadow:0 -1px 1px #fff;
|
114
|
-
}
|
115
|
-
.button.medium {
|
116
|
-
font-size:12px;
|
117
|
-
padding:5px 15px;
|
118
|
-
}
|
119
|
-
.button.small {
|
120
|
-
font-size:11px;
|
121
|
-
padding:3px 10px;
|
122
|
-
width:auto;
|
123
|
-
}
|
124
|
-
|
125
|
-
.flash_messages {
|
126
|
-
border-width:1px;
|
127
|
-
border-style:solid;
|
128
|
-
padding:17px 17px 17px 55px;
|
129
|
-
margin-bottom:10px;
|
130
|
-
-moz-border-radius:5px;
|
131
|
-
-webkit-border:5px;
|
132
|
-
border-radius:5px;
|
133
|
-
-moz-box-shadow:1px 1px rgba(255, 255, 255, 0.6) inset;
|
134
|
-
-webkit-box-shadow:1px 1px rgba(255, 255, 255, 0.6) inset;
|
135
|
-
font-weight:bold;
|
136
|
-
}
|
137
|
-
|
138
|
-
.flash_messages.error {
|
139
|
-
background:#fecdc6 url('/images/messages/error.png') no-repeat 10px 10px;
|
140
|
-
border-color:#E17984;
|
141
|
-
color:#9E0B0F;
|
142
|
-
}
|