web-app-theme 0.4.0 → 0.5.0

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -85,6 +85,21 @@ If you want to show form error messages inside the generated forms, use the foll
85
85
  end
86
86
  end
87
87
 
88
+ If you want to have translated pages, simple create in your locale.yml the keys just like config/locales/en_us.yml example.
89
+ en_us:
90
+ web-app-theme:
91
+ save: Save
92
+ cancel: Cancel
93
+ list: List
94
+ edit: Edit
95
+ new: New
96
+ show: Show
97
+ delete: Delete
98
+ confirm: Are you sure?
99
+ created_at: Created at
100
+ all: All
101
+
102
+
88
103
  ![Web App Theme screenshot](http://img.skitch.com/20091109-c2k618qerx1ysw5ytxsighuf3f.jpg)
89
104
 
90
105
  Contributing
@@ -100,8 +115,10 @@ Links
100
115
  -----
101
116
 
102
117
  * Repository: git://github.com/pilu/web-app-theme.git
118
+ * List: <http://groups.google.com/group/web-app-theme-generator>
103
119
  * Issues: <http://github.com/pilu/web-app-theme/issues>
104
120
  * Gem: <http://gemcutter.org/gems/web-app-theme>
121
+ * Themes: <http://pilu.github.com/web-app-theme>
105
122
 
106
123
  Author
107
124
  ------
@@ -109,7 +126,7 @@ Author
109
126
  Andrea Franz - [http://gravityblast.com](http://gravityblast.com)
110
127
 
111
128
  Contributors
112
- ---
129
+ ------------
113
130
 
114
131
  * Nelson Fernandez
115
132
  * Giovanni Intini
@@ -121,4 +138,12 @@ Contributors
121
138
  * Garret Alfert
122
139
  * Mikkel Hoegh
123
140
  * Juan Maria Martinez Arce
124
- * Stas SUSHKOV
141
+ * Stas SUSHKOV
142
+ * Daniel Cukier
143
+ * Roberto Klein
144
+
145
+ Credits
146
+ -------
147
+
148
+ * Icons: FAMFAMFAM Silk icons <http://www.famfamfam.com/lab/icons/silk/>
149
+ * Buttons: Particletree - Rediscovering the Button Element <http://particletree.com/features/rediscovering-the-button-element/>
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.4.0
1
+ 0.5.0
@@ -0,0 +1,15 @@
1
+ de:
2
+ web-app-theme:
3
+ save: Speichern
4
+ cancel: Abbrechen
5
+ list: Liste
6
+ edit: Bearbeiten
7
+ new: Neu
8
+ show: Anzeigen
9
+ delete: Löschen
10
+ confirm: Sind Sie sicher?
11
+ created_at: Erstellt am
12
+ all: Alle
13
+ profile: Benutzerkonto
14
+ settings: Einstellungen
15
+ logout: Abmelden
@@ -0,0 +1,12 @@
1
+ pt_br:
2
+ web-app-theme:
3
+ save: Salvar
4
+ cancel: Cancelar
5
+ list: Listar
6
+ edit: Alterar
7
+ new: Novo
8
+ show: Exibir
9
+ delete: Excluir
10
+ confirm: Você tem certeza?
11
+ created_at: Criado em
12
+ all: Lista de
@@ -30,6 +30,10 @@ Then /^I should have a stylesheet named "([^\"]*)"$/ do |filename|
30
30
  stylesheet_exists?(filename).should be_true
31
31
  end
32
32
 
33
+ Then /^I should have an image named "([^\"]*)"$/ do |filename|
34
+ image_exists?(filename).should be_true
35
+ end
36
+
33
37
  Given /^I generate a theme without layout choosing the "([^\"]*)" theme$/ do |theme_name|
34
38
  generate_layout(:theme => theme_name, :no_layout => true )
35
39
  end
@@ -58,6 +58,10 @@ module GeneratorHelpers
58
58
  File.exists?(File.join(@app_root, "app", "views", view_path))
59
59
  end
60
60
 
61
+ def image_exists?(image_path)
62
+ File.exists?(File.join(@app_root, "public", "images", image_path))
63
+ end
64
+
61
65
  def stylesheet_exists?(relative_path)
62
66
  File.exists?(File.join(@app_root, "public", "stylesheets", relative_path)).should be_true
63
67
  end
@@ -12,6 +12,10 @@ Feature: Layout generation
12
12
  And I should have a stylesheet named "web_app_theme.css"
13
13
  And I should have a stylesheet named "web_app_theme_override.css"
14
14
  And I should have a stylesheet named "themes/default/style.css"
15
+ And I should have an image named "web-app-theme/cross.png"
16
+ And I should have an image named "web-app-theme/key.png"
17
+ And I should have an image named "web-app-theme/tick.png"
18
+ And I should have an image named "web-app-theme/application_edit.png"
15
19
 
16
20
  # script/generate theme admin
17
21
  Scenario: Generate a layout with a name
Binary file
Binary file
Binary file
Binary file
data/index.html CHANGED
@@ -48,29 +48,27 @@
48
48
  <div id="header">
49
49
  <h1><a href="index.html">Web App Theme</a></h1>
50
50
  <div id="user-navigation">
51
- <ul>
51
+ <ul class="wat-cf">
52
52
  <li><a href="#">Profile</a></li>
53
53
  <li><a href="#">Settings</a></li>
54
54
  <li><a class="logout" href="#">Logout</a></li>
55
55
  </ul>
56
- <div class="clear"></div>
57
56
  </div>
58
57
  <div id="main-navigation">
59
- <ul>
58
+ <ul class="wat-cf">
60
59
  <li class="first"><a href="#block-text">Main Page</a></li>
61
60
  <li class="active"><a href="#block-text">Active</a></li>
62
61
  <li><a href="#block-login">Login</a></li>
63
62
  <li><a href="#block-signup">Signup</a></li>
64
63
  </ul>
65
- <div class="clear"></div>
66
64
  </div>
67
65
  </div>
68
- <div id="wrapper">
66
+ <div id="wrapper" class="wat-cf">
69
67
  <div id="main">
70
68
 
71
69
  <div class="block" id="block-text">
72
70
  <div class="secondary-navigation">
73
- <ul>
71
+ <ul class="wat-cf">
74
72
  <li class="active first"><a href="#block-text">Text</a></li>
75
73
  <li><a href="#block-tables">Tables</a></li>
76
74
  <li><a href="#block-forms">Forms</a></li>
@@ -78,7 +76,6 @@
78
76
  <li><a href="#block-forms-2">2 Columns Forms</a></li>
79
77
  <li><a href="#block-lists">Lists</a></li>
80
78
  </ul>
81
- <div class="clear"></div>
82
79
  </div>
83
80
  <div class="content">
84
81
  <h2 class="title">Text</h2>
@@ -98,7 +95,7 @@
98
95
 
99
96
  <div class="block" id="block-tables">
100
97
  <div class="secondary-navigation">
101
- <ul>
98
+ <ul class="wat-cf">
102
99
  <li class="first"><a href="#block-text">Text</a></li>
103
100
  <li class="active"><a href="#block-tables">Tables</a></li>
104
101
  <li><a href="#block-forms">Forms</a></li>
@@ -106,7 +103,6 @@
106
103
  <li><a href="#block-forms-2">2 Columns Forms</a></li>
107
104
  <li><a href="#block-lists">Lists</a></li>
108
105
  </ul>
109
- <div class="clear"></div>
110
106
  </div>
111
107
  <div class="content">
112
108
  <h2 class="title">Tables</h2>
@@ -134,14 +130,15 @@
134
130
  <td><input type="checkbox" class="checkbox" name="id" value="1" /></td><td>4</td><td>machoman</td><td>Macho Man</td><td>Randy Savage</td><td class="last"><a href="#">show</a> | <a href="#">edit</a> | <a href="#">destroy</a></td>
135
131
  </tr>
136
132
  </table>
137
- <div class="actions-bar">
133
+ <div class="actions-bar wat-cf">
138
134
  <div class="actions">
139
- <input type="submit" class="button" value="Delete" />
135
+ <button class="button" type="submit">
136
+ <img src="images/icons/cross.png" alt="Delete" /> Delete
137
+ </button>
140
138
  </div>
141
139
  <div class="pagination">
142
140
  <span class="disabled prev_page">« Previous</span><span class="current">1</span><a rel="next" href="#">2</a><a href="#">3</a><a href="#">4</a><a href="#">5</a><a href="#">6</a><a href="#">7</a><a href="#">8</a><a href="#">9</a><a href="#">10</a><a href="#">11</a><a rel="next" class="next_page" href="#">Next »</a>
143
141
  </div>
144
- <div class="clear"></div>
145
142
  </div>
146
143
  </form>
147
144
  </div>
@@ -150,7 +147,7 @@
150
147
 
151
148
  <div class="block" id="block-forms">
152
149
  <div class="secondary-navigation">
153
- <ul>
150
+ <ul class="wat-cf">
154
151
  <li class="first"><a href="#block-text">Text</a></li>
155
152
  <li><a href="#block-tables">Tables</a></li>
156
153
  <li class="active"><a href="#block-forms">Forms</a></li>
@@ -158,7 +155,6 @@
158
155
  <li><a href="#block-forms-2">2 Columns Forms</a></li>
159
156
  <li><a href="#block-lists">Lists</a></li>
160
157
  </ul>
161
- <div class="clear"></div>
162
158
  </div>
163
159
  <div class="content">
164
160
  <h2 class="title">Forms</h2>
@@ -182,8 +178,13 @@
182
178
  <textarea class="text_area" rows="10" cols="80"></textarea>
183
179
  <span class="description">Write here a long text</span>
184
180
  </div>
185
- <div class="group navform">
186
- <input type="submit" class="button" value="Save &rarr;" /> or <a href="#header">Cancel</a>
181
+ <div class="group navform wat-cf">
182
+ <button class="button" type="submit">
183
+ <img src="images/icons/tick.png" alt="Save" /> Save
184
+ </button>
185
+ <a href="#header" class="button">
186
+ <img src="images/icons/cross.png" alt="Cancel"/> Cancel
187
+ </a>
187
188
  </div>
188
189
  </form>
189
190
  </div>
@@ -192,7 +193,7 @@
192
193
 
193
194
  <div class="block" id="block-messages">
194
195
  <div class="secondary-navigation">
195
- <ul>
196
+ <ul class="wat-cf">
196
197
  <li class="first"><a href="#block-text">Text</a></li>
197
198
  <li><a href="#block-tables">Tables</a></li>
198
199
  <li><a href="#block-forms">Forms</a></li>
@@ -200,7 +201,6 @@
200
201
  <li><a href="#block-forms-2">2 Columns Forms</a></li>
201
202
  <li><a href="#block-lists">Lists</a></li>
202
203
  </ul>
203
- <div class="clear"></div>
204
204
  </div>
205
205
  <div class="content">
206
206
  <h2 class="title">Messages</h2>
@@ -222,7 +222,7 @@
222
222
 
223
223
  <div class="block" id="block-forms-2">
224
224
  <div class="secondary-navigation">
225
- <ul>
225
+ <ul class="wat-cf">
226
226
  <li class="first"><a href="#block-text">Text</a></li>
227
227
  <li><a href="#block-tables">Tables</a></li>
228
228
  <li><a href="#block-forms">Forms</a></li>
@@ -230,13 +230,12 @@
230
230
  <li class="active"><a href="#block-forms-2">2 Columns Forms</a></li>
231
231
  <li><a href="#block-lists">Lists</a></li>
232
232
  </ul>
233
- <div class="clear"></div>
234
233
  </div>
235
234
  <div class="content">
236
235
  <h2 class="title">2 columns forms</h2>
237
236
  <div class="inner">
238
237
  <form action="#" method="get" class="form">
239
- <div class="columns">
238
+ <div class="columns wat-cf">
240
239
  <div class="column left">
241
240
  <div class="group">
242
241
  <label class="label">Text field</label>
@@ -272,9 +271,13 @@
272
271
  </div>
273
272
  </div>
274
273
  </div>
275
- <div class="clear"></div>
276
- <div class="group navform">
277
- <input type="submit" class="button" value="Save &rarr;" /> or <a href="#">Cancel</a>
274
+ <div class="group navform wat-cf">
275
+ <button class="button" type="submit">
276
+ <img src="images/icons/tick.png" alt="Save" /> Save
277
+ </button>
278
+ <a href="#header" class="button">
279
+ <img src="images/icons/cross.png" alt="Cancel"/> Cancel
280
+ </a>
278
281
  </div>
279
282
  </form>
280
283
  </div>
@@ -283,7 +286,7 @@
283
286
 
284
287
  <div class="block" id="block-lists">
285
288
  <div class="secondary-navigation">
286
- <ul>
289
+ <ul class="wat-cf">
287
290
  <li class="first"><a href="#block-text">Text</a></li>
288
291
  <li><a href="#block-tables">Tables</a></li>
289
292
  <li><a href="#block-forms">Forms</a></li>
@@ -291,7 +294,6 @@
291
294
  <li><a href="#block-forms-2">2 Columns Forms</a></li>
292
295
  <li class="active"><a href="#block-lists">Lists</a></li>
293
296
  </ul>
294
- <div class="clear"></div>
295
297
  </div>
296
298
  <div class="content">
297
299
  <h2 class="title">Lists</h2>
@@ -375,7 +377,6 @@
375
377
  </div>
376
378
  </div>
377
379
  </div>
378
- <div class="clear"></div>
379
380
  </div>
380
381
  <div id="box">
381
382
  <h1>Web App Theme</h1>
@@ -388,29 +389,28 @@
388
389
  </div>
389
390
  </div>
390
391
  <form action="#" class="form login">
391
- <div class="group">
392
+ <div class="group wat-cf">
392
393
  <div class="left">
393
394
  <label class="label right">Login</label>
394
395
  </div>
395
396
  <div class="right">
396
397
  <input type="text" class="text_field" />
397
398
  </div>
398
- <div class="clear"></div>
399
399
  </div>
400
- <div class="group">
400
+ <div class="group wat-cf">
401
401
  <div class="left">
402
402
  <label class="label right">Password</label>
403
403
  </div>
404
404
  <div class="right">
405
405
  <input type="password" class="text_field" />
406
406
  </div>
407
- <div class="clear"></div>
408
407
  </div>
409
- <div class="group navform">
408
+ <div class="group navform wat-cf">
410
409
  <div class="right">
411
- <input type="submit" class="button" value="Login" />
410
+ <button class="button" type="submit">
411
+ <img src="images/icons/key.png" alt="Save" /> Login
412
+ </button>
412
413
  </div>
413
- <div class="clear"></div>
414
414
  </div>
415
415
  </form>
416
416
  </div>
@@ -420,7 +420,7 @@
420
420
  <h2>Sign up</h2>
421
421
  <div class="content">
422
422
  <form action="#" class="form">
423
- <div class="group">
423
+ <div class="group wat-cf">
424
424
  <div class="left">
425
425
  <label class="label">Login</label>
426
426
  </div>
@@ -428,9 +428,8 @@
428
428
  <input type="text" class="text_field" />
429
429
  <span class="description">Ex: web-app-theme</span>
430
430
  </div>
431
- <div class="clear"></div>
432
431
  </div>
433
- <div class="group">
432
+ <div class="group wat-cf">
434
433
  <div class="left">
435
434
  <label class="label">Email</label>
436
435
  </div>
@@ -438,9 +437,8 @@
438
437
  <input type="text" class="text_field" />
439
438
  <span class="description">Ex: test@example.com</span>
440
439
  </div>
441
- <div class="clear"></div>
442
440
  </div>
443
- <div class="group">
441
+ <div class="group wat-cf">
444
442
  <div class="left">
445
443
  <label class="label">Password</label>
446
444
  </div>
@@ -448,7 +446,6 @@
448
446
  <input type="password" class="text_field" />
449
447
  <span class="description">Must contains the word 'yeah'</span>
450
448
  </div>
451
- <div class="clear"></div>
452
449
  </div>
453
450
 
454
451
  <div class="group">
@@ -461,8 +458,10 @@
461
458
  <input type="text" class="text_field" />
462
459
  <span class="description">Ex: a simple text</span>
463
460
  </div>
464
- <div class="group navform">
465
- <input type="submit" class="button" value="Sign up" />
461
+ <div class="group navform wat-cf">
462
+ <button class="button" type="submit">
463
+ <img src="images/icons/tick.png" alt="Save" /> Signup
464
+ </button>
466
465
  </div>
467
466
  </form>
468
467
  </div>
@@ -3,26 +3,24 @@
3
3
  <head>
4
4
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
5
5
  <title><%= options[:app_name] %></title>
6
- <%%= stylesheet_link_tag 'web_app_theme', "themes/<%= options[:theme] %>/style" %>
6
+ <%%= stylesheet_link_tag "web_app_theme", "web_app_theme_override", "themes/<%= options[:theme] %>/style", :cache => true %>
7
7
  </head>
8
8
  <body>
9
9
  <div id="container">
10
10
  <div id="header">
11
11
  <h1><a href="/"><%= options[:app_name] %></a></h1>
12
12
  <div id="user-navigation">
13
- <ul>
14
- <li><a href="#">Profile</a></li>
15
- <li><a href="#">Settings</a></li>
16
- <li><a href="/logout" class="logout">Logout</a></li>
13
+ <ul class="wat-cf">
14
+ <li><a href="#"><%%= t("web-app-theme.profile", :default => "Profile") %></a></li>
15
+ <li><a href="#"><%%= t("web-app-theme.settings", :default => "Settings") %></a></li>
16
+ <li><a href="/logout" class="logout"><%%= t("web-app-theme.logout", :default => "Logout") %></a></li>
17
17
  </ul>
18
- <div class="clear"></div>
19
18
  </div>
20
19
  <div id="main-navigation">
21
- <ul></ul>
22
- <div class="clear"></div>
20
+ <ul class="wat-cf"></ul>
23
21
  </div>
24
22
  </div>
25
- <div id="wrapper">
23
+ <div id="wrapper" class="wat-cf">
26
24
  <div class="flash">
27
25
  <%% flash.each do |type, message| -%>
28
26
  <div class="message <%%= type %>">
@@ -41,7 +39,6 @@
41
39
  <div id="sidebar">
42
40
  <%%= yield :sidebar %>
43
41
  </div>
44
- <div class="clear"></div>
45
42
  </div>
46
43
  </div>
47
44
  </body>
@@ -11,9 +11,13 @@ class ThemeGenerator < Rails::Generator::Base
11
11
  end
12
12
 
13
13
  def manifest
14
- record do |m|
14
+ record do |m|
15
15
  m.directory("app/views/layouts")
16
- m.directory("public/stylesheets/themes/#{options[:theme]}/")
16
+ m.directory("public/images/web-app-theme")
17
+ %w(cross key tick application_edit).each do |icon|
18
+ m.file("../../../images/icons/#{icon}.png", "public/images/web-app-theme/#{icon}.png")
19
+ end
20
+ m.directory("public/stylesheets/themes/#{options[:theme]}/")
17
21
  m.template("view_layout_#{options[:layout_type]}.html.erb", File.join("app/views/layouts", "#{@name}.html.erb")) unless options[:no_layout]
18
22
  m.template("../../../stylesheets/base.css", File.join("public/stylesheets", "web_app_theme.css"))
19
23
  m.template("web_app_theme_override.css", File.join("public/stylesheets", "web_app_theme_override.css"))
@@ -1,14 +1,13 @@
1
1
  <div class="block">
2
2
  <div class="secondary-navigation">
3
- <ul>
4
- <li class="first"><%%= link_to 'List', <%= controller_routing_path %>_path %></li>
5
- <li><%%= link_to 'New', new_<%= singular_controller_routing_path %>_path %></li>
6
- <li class="active"><%%= link_to 'Edit', edit_<%= singular_controller_routing_path %>_path %></li>
3
+ <ul class="wat-cf">
4
+ <li class="first"><%%= link_to "#{t("web-app-theme.list", :default => "List")}", <%= controller_routing_path %>_path %></li>
5
+ <li><%%= link_to "#{t("web-app-theme.new", :default => "New")}", new_<%= singular_controller_routing_path %>_path %></li>
6
+ <li class="active"><%%= link_to "#{t("web-app-theme.edit", :default => "Edit")}", edit_<%= singular_controller_routing_path %>_path %></li>
7
7
  </ul>
8
- <div class="clear"></div>
9
8
  </div>
10
9
  <div class="content">
11
- <h2 class="title">Edit <%= model_name %></h2>
10
+ <h2 class="title"><%%= t("web-app-theme.edit", :default => "Edit") %> <%= model_name %></h2>
12
11
  <div class="inner">
13
12
  <%% form_for @<%= model_name.underscore %>, :url => <%= singular_controller_routing_path %>_path(@<%= resource_name %>), :html => { :class => :form } do |f| -%>
14
13
  <%%= render :partial => "form", :locals => {:f => f} %>
@@ -1,10 +1,13 @@
1
1
  <% columns.each do |column| %>
2
2
  <div class="group">
3
- <%%= f.label :<%= column.name %>, "<%= column.name.capitalize %>", :class => :label %>
3
+ <%%= f.label :<%= column.name.humanize %>, t("activerecord.attributes.<%= model_name.underscore %>.<%= column.name %>", :default => "<%= column.name.humanize %>"), :class => :label %>
4
4
  <%%= f.<%= column.field_type %> :<%= column.name %>, :class => '<%= column.field_type %>' %>
5
5
  <span class="description">Ex: a simple text</span>
6
6
  </div>
7
7
  <%- end -%>
8
- <div class="group navform">
9
- <input type="submit" class="button" value="Save &rarr;" /> or <%%= link_to 'Cancel', <%= controller_routing_path %>_path %>
8
+ <div class="group navform wat-cf">
9
+ <button class="button" type="submit">
10
+ <%%= image_tag("web-app-theme/tick.png", :alt => "#{t("web-app-theme.save", :default => "Save")}") %> <%%= t("web-app-theme.save", :default => "Save") %>
11
+ </button>
12
+ <%%= link_to "#{image_tag("web-app-theme/cross.png", :alt => "#{t("web-app-theme.cancel", :default => "Cancel")}")} #{t("web-app-theme.cancel", :default => "Cancel")}", <%= controller_routing_path %>_path, :class => "button" %>
10
13
  </div>
@@ -1,13 +1,12 @@
1
1
  <div class="block">
2
2
  <div class="secondary-navigation">
3
- <ul>
4
- <li class="first"><%%= link_to 'List', <%= controller_routing_path %>_path %></li>
5
- <li class="active"><%%= link_to 'New', new_<%= singular_controller_routing_path %>_path %></li>
3
+ <ul class="wat-cf">
4
+ <li class="first"><%%= link_to "#{t("web-app-theme.list", :default => "List")}", <%= controller_routing_path %>_path %></li>
5
+ <li class="active"><%%= link_to "#{t("web-app-theme.new", :default => "New")}", new_<%= singular_controller_routing_path %>_path %></li>
6
6
  </ul>
7
- <div class="clear"></div>
8
7
  </div>
9
8
  <div class="content">
10
- <h2 class="title">New <%= model_name %></h2>
9
+ <h2 class="title"><%%= t("web-app-theme.new", :default => "New")%> <%= model_name %></h2>
11
10
  <div class="inner">
12
11
  <%% form_for :<%= model_name.underscore %>, :url => <%= controller_routing_path %>_path, :html => { :class => :form } do |f| -%>
13
12
  <%%= render :partial => "form", :locals => {:f => f} %>
@@ -1,21 +1,21 @@
1
1
  <div class="block">
2
2
  <div class="secondary-navigation">
3
- <ul>
4
- <li class="first"><%%= link_to 'List', <%= controller_routing_path %>_path %></li>
5
- <li><%%= link_to 'New', new_<%= singular_controller_routing_path %>_path %></li>
6
- <li class="active"><%%= link_to 'Show', <%= singular_controller_routing_path %>_path %></li>
3
+ <ul class="wat-cf">
4
+ <li class="first"><%%= link_to "#{t("web-app-theme.list", :default => "List")}", <%= controller_routing_path %>_path %></li>
5
+ <li><%%= link_to "#{t("web-app-theme.new", :default => "New")}", new_<%= singular_controller_routing_path %>_path %></li>
6
+ <li class="active"><%%= link_to "#{t("web-app-theme.show", :default => "Show")}", <%= singular_controller_routing_path %>_path %></li>
7
7
  </ul>
8
- <div class="clear"></div>
9
8
  </div>
10
9
  <div class="content">
11
10
  <div class="inner">
12
11
  <% columns.each do |column| %>
13
12
  <p>
14
- <b><%= column.name.capitalize %>:</b>
13
+ <b><%%= t("activerecord.attributes.<%= singular_controller_routing_path %>.<%= column.name %>", :default => t("activerecord.labels.<%= column.name %>", :default => "<%= column.name.humanize %>")) %>:</b>
15
14
  <%%= @<%= resource_name %>.<%= column.name %> %>
16
15
  </p>
17
16
  <%- end -%>
18
- <%%= link_to 'Edit', edit_<%= singular_controller_routing_path %>_path(@<%= resource_name %>) %>
17
+ <%%= link_to "#{image_tag("web-app-theme/application_edit.png", :alt => "#{t("web-app-theme.edit", :default=> "Edit")}")} #{t("web-app-theme.edit", :default=> "Edit")}", edit_<%= singular_controller_routing_path %>_path(@<%= resource_name %>), :class => "button" %>
18
+ <%%= link_to "#{image_tag("web-app-theme/cross.png", :alt => "#{t("web-app-theme.delete", :default=> "Delete")}")} #{t("web-app-theme.delete", :default => "Delete")}", <%= singular_controller_routing_path %>_path(@<%= resource_name %>), :method => "delete", :class => "button", :confirm => "#{t("web-app-theme.confirm", :default => "Are you sure?")}" %>
19
19
  </div>
20
20
  </div>
21
21
  </div>
@@ -10,29 +10,26 @@
10
10
  <%% end -%>
11
11
  </div>
12
12
  <%% form_tag({:action => :create}, :class => 'form login') do -%>
13
- <div class="group">
13
+ <div class="group wat-cf">
14
14
  <div class="left">
15
15
  <label class="label right">Login</label>
16
16
  </div>
17
17
  <div class="right">
18
18
  <%%= text_field_tag :login, @login, :class => 'text_field' %>
19
19
  </div>
20
- <div class="clear"></div>
21
20
  </div>
22
- <div class="group">
21
+ <div class="group wat-cf">
23
22
  <div class="left">
24
23
  <label class="label right">Password</label>
25
24
  </div>
26
25
  <div class="right">
27
26
  <%%= password_field_tag :password, nil, :class => 'text_field' %>
28
27
  </div>
29
- <div class="clear"></div>
30
28
  </div>
31
- <div class="group navform">
29
+ <div class="group navform wat-cf">
32
30
  <div class="right">
33
31
  <input type="submit" class="button" value="Sign in" />
34
32
  </div>
35
- <div class="clear"></div>
36
33
  </div>
37
34
  <%% end -%>
38
35
  </div>
@@ -10,42 +10,38 @@
10
10
  <%% end -%>
11
11
  </div>
12
12
  <%% form_for :<%= resource_name %>, :url => <%= controller_routing_path %>_path, :html => { :class => 'form' } do |f| -%>
13
- <div class="group">
13
+ <div class="group wat-cf">
14
14
  <div class="left">
15
15
  <label class="label">Login</label>
16
16
  </div>
17
17
  <div class="right">
18
18
  <%%= f.text_field :login, :class => 'text_field' %>
19
19
  </div>
20
- <div class="clear"></div>
21
20
  </div>
22
- <div class="group">
21
+ <div class="group wat-cf">
23
22
  <div class="left">
24
23
  <label class="label">Email</label>
25
24
  </div>
26
25
  <div class="right">
27
26
  <%%= f.text_field :email, :class => 'text_field' %>
28
27
  </div>
29
- <div class="clear"></div>
30
28
  </div>
31
- <div class="group">
29
+ <div class="group wat-cf">
32
30
  <div class="left">
33
31
  <label class="label">Password</label>
34
32
  </div>
35
33
  <div class="right">
36
34
  <%%= f.password_field :password, :class => 'text_field' %>
37
35
  </div>
38
- <div class="clear"></div>
39
36
  </div>
40
37
 
41
38
  <div class="group">
42
- <div class="left">
39
+ <div class="left wat-cf">
43
40
  <label class="label">Password</label>
44
41
  </div>
45
42
  <div class="right">
46
43
  <%%= f.password_field :password_confirmation, :class => 'text_field' %>
47
44
  </div>
48
- <div class="clear"></div>
49
45
  </div>
50
46
 
51
47
  <div class="group navform">
@@ -1,21 +1,22 @@
1
1
  <div class="block">
2
2
  <div class="secondary-navigation">
3
- <ul>
4
- <li class="first active"><%%= link_to 'List', <%= controller_routing_path %>_path %></li>
5
- <li><%%= link_to 'New', new_<%= singular_controller_routing_path %>_path %></li>
3
+ <ul class="wat-cf">
4
+ <li class="first active"><%%= link_to "#{t("web-app-theme.list", :default => "List")}", <%= controller_routing_path %>_path %></li>
5
+ <li><%%= link_to "#{t("web-app-theme.new", :default => "New")}", new_<%= singular_controller_routing_path %>_path %></li>
6
6
  </ul>
7
- <div class="clear"></div>
8
7
  </div>
9
8
  <div class="content">
10
- <h2 class="title">All <%= plural_model_name %></h2>
9
+ <h2 class="title"><%%= t("web-app-theme.all", :default => "All") %> <%= plural_model_name %></h2>
11
10
  <div class="inner">
12
11
  <table class="table">
13
12
  <tr>
14
13
  <th class="first">ID</th>
15
14
  <% unless columns.empty? -%>
16
- <th><%= columns.first.name.capitalize %></th>
15
+ <th>
16
+ <%%= t("activerecord.attributes.<%= singular_controller_routing_path %>.<%= columns.first.name %>", :default => t("activerecord.labels.<%= columns.first.name %>", :default => "<%= columns.first.name.capitalize %>")) %>
17
+ </th>
17
18
  <% end -%>
18
- <th>Created at</th>
19
+ <th><%%= t("web-app-theme.created_at", :default => "Created at") %></th>
19
20
  <th class="last">&nbsp;</th>
20
21
  </tr>
21
22
  <%% @<%= plural_resource_name %>.each do |<%= resource_name %>| -%>
@@ -32,20 +33,19 @@
32
33
  <%%= <%= resource_name %>.created_at %>
33
34
  </td>
34
35
  <td class="last">
35
- <%%= link_to 'show', <%= singular_controller_routing_path %>_path(<%= resource_name %>) %> |
36
- <%%= link_to 'edit', edit_<%= singular_controller_routing_path %>_path(<%= resource_name %>) %> |
37
- <%%= link_to 'destroy', <%= singular_controller_routing_path %>_path(<%= resource_name %>), :method => :delete, :confirm => 'Are you sure?' %>
36
+ <%%= link_to "#{t("web-app-theme.show", :default => "Show")}", <%= singular_controller_routing_path %>_path(<%= resource_name %>) %> |
37
+ <%%= link_to "#{t("web-app-theme.edit", :default => "Edit")}", edit_<%= singular_controller_routing_path %>_path(<%= resource_name %>) %> |
38
+ <%%= link_to "#{t("web-app-theme.delete", :default => "Delete")}", <%= singular_controller_routing_path %>_path(<%= resource_name %>), :method => :delete, :confirm => "#{t("web-app-theme.confirm", :default => "Are you sure?")}" %>
38
39
  </td>
39
40
  </tr>
40
41
  <%% end -%>
41
42
  </table>
42
- <div class="actions-bar">
43
+ <div class="actions-bar wat-cf">
43
44
  <div class="actions">
44
45
  </div>
45
46
  <% if options[:will_paginate] %>
46
47
  <%%= will_paginate @<%= plural_resource_name %> %>
47
48
  <% end %>
48
- <div class="clear"></div>
49
49
  </div>
50
50
  </div>
51
51
  </div>
data/stylesheets/base.css CHANGED
@@ -1,6 +1,21 @@
1
1
  * {margin:0;padding:0}
2
2
  .clear { clear: both; height: 0; }
3
3
 
4
+ .wat-cf:after {
5
+ content: ".";
6
+ display: block;
7
+ height: 0;
8
+ clear: both;
9
+ visibility: hidden;
10
+ }
11
+
12
+ .wat-cf {display: inline-block;}
13
+
14
+ /* Hides from IE-mac \*/
15
+ * html .wat-cf {height: 1%;}
16
+ .wat-cf {display: block;}
17
+ /* End hide from IE-mac */
18
+
4
19
  h1 { margin: 15px 0; font-size: 22px; font-weight: normal; }
5
20
  h2 { font-size: 22px; margin: 15px 0; font-weight: normal;}
6
21
  h3 { font-size: 18px; margin: 10px 0; font-weight: normal;}
@@ -30,7 +45,7 @@ body {
30
45
  #header h1 {
31
46
  margin: 0;
32
47
  padding: 10px 0;
33
- font-size: 30px;
48
+ font-size: 26px;
34
49
  }
35
50
 
36
51
  #header h1 a:link, #header h1 a:active, #header h1 a:hover, #header h1 a:visited {
@@ -137,7 +152,8 @@ body {
137
152
  }
138
153
 
139
154
  #main-navigation ul li a {
140
- font-size: 15px;
155
+ font-size: 14px;
156
+ line-height: 14px;
141
157
  display: block;
142
158
  padding: 8px 15px;
143
159
  }
@@ -333,4 +349,49 @@ ul.list li .item .avatar {
333
349
  padding: 10px 20px;
334
350
  }
335
351
 
352
+ /* Inspired by http://particletree.com/features/rediscovering-the-button-element */
353
+
354
+ a.button:link, a.button:visited, a.button:hover, a.button:active, button.button {
355
+ color: #222;
356
+ display:block;
357
+ float:left;
358
+ margin:0 7px 0 0;
359
+ background-color: #eee;
360
+ border:1px solid #bfbfbf;
361
+ font-size: 1em;
362
+ line-height: 1.3em;
363
+ font-weight:bold;
364
+ cursor:pointer;
365
+ padding:5px 10px 6px 7px;
366
+ text-decoration: none;
367
+ }
368
+
369
+ button.button {
370
+ width:auto;
371
+ overflow:visible;
372
+ padding:4px 10px 3px 7px; /* IE6 */
373
+ }
374
+ button.button[type] {
375
+ padding:5px 10px 5px 7px; /* Firefox */
376
+ line-height:17px; /* Safari */
377
+ }
378
+
379
+ *:first-child+html button.button[type] {
380
+ padding:4px 10px 3px 7px; /* IE7 */
381
+ }
382
+
383
+ button.button img, a.button img {
384
+ margin:0 3px -3px 0 !important;
385
+ padding:0;
386
+ border:none;
387
+ width:16px;
388
+ height:16px;
389
+ }
390
+
391
+ button.button:hover, a.button:hover {
392
+ background-color:#dedede;
393
+ }
336
394
 
395
+ button.button:active, a.button:active {
396
+ background-color:#e5e5e5;
397
+ }
@@ -7,7 +7,7 @@ a { -moz-outline: none; }
7
7
 
8
8
  body {
9
9
  color: #222;
10
- background: #f0f0ee;
10
+ background: #e5e5e5;
11
11
  font-family: helvetica, arial, sans-serif;
12
12
  }
13
13
 
@@ -21,7 +21,7 @@ hr {
21
21
  }
22
22
 
23
23
  #header h1 {
24
- padding: 20px 0;
24
+ padding: 15px 0;
25
25
  }
26
26
 
27
27
  #header h1 a:link, #header h1 a:active, #header h1 a:hover, #header h1 a:visited {
@@ -95,7 +95,7 @@ hr {
95
95
  }
96
96
 
97
97
  #main-navigation ul li.active {
98
- background: #f0f0ee;
98
+ background: #e5e5e5;
99
99
  }
100
100
 
101
101
  #main-navigation ul li a:link, #main-navigation ul li a:visited, #main-navigation ul li a:hover, #main-navigation ul li a:active,
@@ -105,6 +105,13 @@ hr {
105
105
  color: #FFF;
106
106
  }
107
107
 
108
+ #user-navigation a.logout {
109
+ background: #cc0000;
110
+ padding: 2px 6px;
111
+ -moz-border-radius: 4px;
112
+ -webkit-border-radius: 3px;
113
+ }
114
+
108
115
  .secondary-navigation li a:hover {
109
116
  background: #470E0E;
110
117
  }
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{web-app-theme}
8
- s.version = "0.4.0"
8
+ s.version = "0.5.0"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Andrea Franz"]
12
- s.date = %q{2009-11-10}
12
+ s.date = %q{2010-01-04}
13
13
  s.description = %q{Web app theme generator for rails projects}
14
14
  s.email = %q{andrea@gravityblast.com}
15
15
  s.extra_rdoc_files = [
@@ -22,12 +22,18 @@ Gem::Specification.new do |s|
22
22
  "README.md",
23
23
  "Rakefile",
24
24
  "VERSION",
25
+ "config/locales/de_de.yml",
26
+ "config/locales/pt_br.yml",
25
27
  "features/step_definitions/layout_steps.rb",
26
28
  "features/step_definitions/themed_steps.rb",
27
29
  "features/support/env.rb",
28
30
  "features/theme_generator.feature",
29
31
  "features/themed_generator.feature",
30
32
  "images/avatar.png",
33
+ "images/icons/application_edit.png",
34
+ "images/icons/cross.png",
35
+ "images/icons/key.png",
36
+ "images/icons/tick.png",
31
37
  "index.html",
32
38
  "javascripts/jquery-1.3.min.js",
33
39
  "javascripts/jquery.localscroll.js",
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: web-app-theme
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrea Franz
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-11-10 00:00:00 +01:00
12
+ date: 2010-01-04 00:00:00 +01:00
13
13
  default_executable:
14
14
  dependencies: []
15
15
 
@@ -28,12 +28,18 @@ files:
28
28
  - README.md
29
29
  - Rakefile
30
30
  - VERSION
31
+ - config/locales/de_de.yml
32
+ - config/locales/pt_br.yml
31
33
  - features/step_definitions/layout_steps.rb
32
34
  - features/step_definitions/themed_steps.rb
33
35
  - features/support/env.rb
34
36
  - features/theme_generator.feature
35
37
  - features/themed_generator.feature
36
38
  - images/avatar.png
39
+ - images/icons/application_edit.png
40
+ - images/icons/cross.png
41
+ - images/icons/key.png
42
+ - images/icons/tick.png
37
43
  - index.html
38
44
  - javascripts/jquery-1.3.min.js
39
45
  - javascripts/jquery.localscroll.js