twitter-bootstrap-rails 2.0.5 → 2.0.6

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of twitter-bootstrap-rails might be problematic. Click here for more details.

Files changed (34) hide show
  1. data/README.md +7 -0
  2. data/lib/generators/bootstrap/install/templates/bootstrap_and_overrides.less +10 -0
  3. data/lib/generators/bootstrap/layout/templates/layout.html.erb +11 -13
  4. data/lib/generators/bootstrap/layout/templates/layout.html.haml +12 -13
  5. data/lib/generators/bootstrap/layout/templates/layout.html.slim +3 -5
  6. data/lib/generators/bootstrap/themed/templates/_form.html.erb +12 -15
  7. data/lib/generators/bootstrap/themed/templates/_form.html.haml +9 -13
  8. data/lib/generators/bootstrap/themed/templates/_form.html.slim +11 -11
  9. data/lib/generators/bootstrap/themed/templates/edit.html.erb +3 -0
  10. data/lib/generators/bootstrap/themed/templates/edit.html.haml +2 -0
  11. data/lib/generators/bootstrap/themed/templates/edit.html.slim +3 -3
  12. data/lib/generators/bootstrap/themed/templates/index.html.erb +21 -13
  13. data/lib/generators/bootstrap/themed/templates/index.html.haml +14 -15
  14. data/lib/generators/bootstrap/themed/templates/index.html.slim +16 -15
  15. data/lib/generators/bootstrap/themed/templates/new.html.erb +3 -0
  16. data/lib/generators/bootstrap/themed/templates/new.html.haml +2 -0
  17. data/lib/generators/bootstrap/themed/templates/new.html.slim +3 -2
  18. data/lib/generators/bootstrap/themed/templates/show.html.erb +13 -6
  19. data/lib/generators/bootstrap/themed/templates/show.html.haml +7 -4
  20. data/lib/generators/bootstrap/themed/templates/show.html.slim +12 -5
  21. data/lib/generators/bootstrap/themed/templates/simple_form/_form.html.erb +14 -0
  22. data/lib/generators/bootstrap/themed/templates/simple_form/_form.html.haml +11 -0
  23. data/lib/generators/bootstrap/themed/templates/simple_form/_form.html.slim +12 -0
  24. data/lib/generators/bootstrap/themed/themed_generator.rb +8 -5
  25. data/lib/twitter/bootstrap/rails/engine.rb +2 -1
  26. data/lib/twitter/bootstrap/rails/twitter-bootstrap-breadcrumbs.rb +5 -0
  27. data/lib/twitter/bootstrap/rails/version.rb +1 -1
  28. data/vendor/assets/fonts/fontawesome-webfont.eot +0 -0
  29. data/vendor/assets/fonts/fontawesome-webfont.svg +175 -0
  30. data/vendor/assets/fonts/fontawesome-webfont.svgz +0 -0
  31. data/vendor/assets/fonts/fontawesome-webfont.ttf +0 -0
  32. data/vendor/assets/fonts/fontawesome-webfont.woff +0 -0
  33. data/vendor/toolkit/fontawesome.less +267 -0
  34. metadata +19 -10
data/README.md CHANGED
@@ -160,6 +160,11 @@ twitter-bootstrap-rails has seperate branch (w/o Less) that just serves latest s
160
160
  <li>Fixes and release 2.0.0</li>
161
161
  <li>Updated to v2.0.1, versioned v2.0.1.0</li>
162
162
  <li>Released gem v.2.0.3</li>
163
+ <li>Released gem v.2.0.4</li>
164
+ <li>Released gem v.2.0.5</li>
165
+ <li>Added SimpleForm support</li>
166
+ <li>Added FontAwesome support</li>
167
+ <li>Released gem v.2.0.6</li>
163
168
  </ul>
164
169
 
165
170
 
@@ -177,6 +182,8 @@ twitter-bootstrap-rails has seperate branch (w/o Less) that just serves latest s
177
182
  <li>Gudleik Rasch</li>
178
183
  <li>Thomas Volkmar Worm</li>
179
184
  <li>Thiago Almeida</li>
185
+ <li>Sébastien Grosjean</li>
186
+ <li>Nick DeSteffen</li>
180
187
  </ul>
181
188
 
182
189
 
@@ -7,6 +7,16 @@ body { padding-top: 60px; }
7
7
  @iconSpritePath: asset-path('twitter/bootstrap/glyphicons-halflings.png');
8
8
  @iconWhiteSpritePath: asset-path('twitter/bootstrap/glyphicons-halflings-white.png');
9
9
 
10
+ // Set the Font Awesome (Font Awesome is default. You can disable by commenting below lines)
11
+ @fontAwesomeEotPath: asset-path('fontawesome-webfont.eot');
12
+ @fontAwesomeWoffPath: asset-path('fontawesome-webfont.woff');
13
+ @fontAwesomeTtfPath: asset-path('fontawesome-webfont.ttf');
14
+ @fontAwesomeSvgzPath: asset-path('fontawesome-webfont.svgz');
15
+ @fontAwesomeSvgPath: asset-path('fontawesome-webfont.svg');
16
+
17
+ // Font Awesome
18
+ @import "fontawesome";
19
+
10
20
  // Your custom LESS stylesheets goes here
11
21
  //
12
22
  // Since bootstrap was imported above you have access to its mixins which
@@ -3,7 +3,7 @@
3
3
  <head>
4
4
  <meta charset="utf-8">
5
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
- <title><%= app_name %></title>
6
+ <title><%%= content_for?(:title) ? yield(:title) : "<%= app_name %>" %></title>
7
7
  <%%= csrf_meta_tags %>
8
8
 
9
9
  <!-- Le HTML5 shim, for IE6-8 support of HTML elements -->
@@ -11,10 +11,8 @@
11
11
  <script src="http://html5shim.googlecode.com/svn/trunk/html5.js" type="text/javascript"></script>
12
12
  <![endif]-->
13
13
 
14
- <!-- Le styles -->
15
14
  <%%= stylesheet_link_tag "application", :media => "all" %>
16
15
 
17
- <!-- Le fav and touch icons -->
18
16
  <link href="images/favicon.ico" rel="shortcut icon">
19
17
  <link href="images/apple-touch-icon.png" rel="apple-touch-icon">
20
18
  <link href="images/apple-touch-icon-72x72.png" rel="apple-touch-icon" sizes="72x72">
@@ -37,9 +35,9 @@
37
35
  <a class="brand" href="#"><%= app_name %></a>
38
36
  <div class="<%= container_class %> nav-collapse">
39
37
  <ul class="nav">
40
- <%- (1..3).each do |i| -%>
41
- <li><%%= link_to "Link<%= i %>", "/path<%= i %>" %></li>
42
- <%- end -%>
38
+ <li><%%= link_to "Link1", "/path1" %></li>
39
+ <li><%%= link_to "Link2", "/path2" %></li>
40
+ <li><%%= link_to "Link3", "/path3" %></li>
43
41
  </ul>
44
42
  </div><!--/.nav-collapse -->
45
43
  </div>
@@ -53,9 +51,9 @@
53
51
  <div class="well sidebar-nav">
54
52
  <ul class="nav nav-list">
55
53
  <li class="nav-header">Sidebar</li>
56
- <%- (1..3).each do |i| -%>
57
- <li><%%= link_to "Link<%= i %>", "/path<%= i %>" %></li>
58
- <%- end -%>
54
+ <li><%%= link_to "Link1", "/path1" %></li>
55
+ <li><%%= link_to "Link2", "/path2" %></li>
56
+ <li><%%= link_to "Link3", "/path3" %></li>
59
57
  </ul>
60
58
  </div><!--/.well -->
61
59
  </div><!--/span-->
@@ -74,9 +72,9 @@
74
72
  <h3>Sidebar</h3>
75
73
  <ul class="nav nav-list">
76
74
  <li class="nav-header">Sidebar</li>
77
- <%- (1..3).each do |i| -%>
78
- <li><%%= link_to "Link<%= i %>", "/path<%= i %>" %></li>
79
- <%- end -%>
75
+ <li><%%= link_to "Link1", "/path1" %></li>
76
+ <li><%%= link_to "Link2", "/path2" %></li>
77
+ <li><%%= link_to "Link3", "/path3" %></li>
80
78
  </ul>
81
79
  </div><!--/.well -->
82
80
  </div><!--/span-->
@@ -90,7 +88,7 @@
90
88
 
91
89
  </div> <!-- /container -->
92
90
 
93
- <!-- Le javascript
91
+ <!-- Javascripts
94
92
  ================================================== -->
95
93
  <!-- Placed at the end of the document so the pages load faster -->
96
94
  <%%= javascript_include_tag "application" %>
@@ -1,20 +1,18 @@
1
1
  !!! 5
2
- %html{:lang => "en"}
2
+ %html(lang="en")
3
3
  %head
4
- %meta{:charset => "utf-8"}/
4
+ %meta(charset="utf-8")
5
+ %meta(name="viewport" content="width=device-width, initial-scale=1.0")
5
6
  %title= content_for?(:title) ? yield(:title) : "<%= app_name %>"
6
7
  = csrf_meta_tags
7
8
  / Le HTML5 shim, for IE6-8 support of HTML elements
8
9
  /[if lt IE 9]
9
10
  = javascript_include_tag "http://html5shim.googlecode.com/svn/trunk/html5.js"
10
- / Le styles
11
11
  = stylesheet_link_tag "application", :media => "all"
12
- / Le fav and touch icons
13
- %link{:href => "images/favicon.ico", :rel => "shortcut icon"}/
14
- %link{:href => "images/apple-touch-icon.png", :rel => "apple-touch-icon"}/
15
- %link{:href => "images/apple-touch-icon-72x72.png", :rel => "apple-touch-icon", :sizes => "72x72"}/
16
- %link{:href => "images/apple-touch-icon-114x114.png", :rel => "apple-touch-icon", :sizes => "114x114"}/
17
-
12
+ %link(href="images/favicon.ico" rel="shortcut icon")
13
+ %link(href="images/apple-touch-icon.png" rel="apple-touch-icon")
14
+ %link(href="images/apple-touch-icon-72x72.png" rel="apple-touch-icon" sizes="72x72")
15
+ %link(href="images/apple-touch-icon-114x114.png" rel="apple-touch-icon" sizes="114x114")
18
16
 
19
17
  %body
20
18
  .navbar.navbar-fixed-top
@@ -24,12 +22,12 @@
24
22
  <%- else -%>
25
23
  .container
26
24
  <%- end -%>
27
- %a.btn.btn-navbar{"data-target" => ".nav-collapse", "data-toggle" => "collapse"}
25
+ %a.btn.btn-navbar(data-target=".nav-collapse" data-toggle="collapse")
28
26
  %span.icon-bar
29
27
  %span.icon-bar
30
28
  %span.icon-bar
31
- %a.brand{:href => "#"}<%= app_name %>
32
- .<%=container_class%>.nav-collapse
29
+ %a.brand(href="#") <%= app_name %>
30
+ .container.nav-collapse
33
31
  %ul.nav
34
32
  %li= link_to "Link 1", "/path1"
35
33
  %li= link_to "Link 2", "/path2"
@@ -65,7 +63,8 @@
65
63
  %footer
66
64
  %p &copy; Company 2012
67
65
  /
68
- Le javascript
66
+ Javascripts
69
67
  \==================================================
70
68
  / Placed at the end of the document so the pages load faster
71
69
  = javascript_include_tag "application"
70
+ 
@@ -2,21 +2,19 @@ doctype html
2
2
  html lang="en"
3
3
  head
4
4
  meta charset="utf-8"
5
+ meta name="viewport" content="width=device-width, initial-scale=1.0"
5
6
  title= content_for?(:title) ? yield(:title) : "<%= app_name %>"
6
7
  = csrf_meta_tags
7
8
 
8
9
  /! Le HTML5 shim, for IE6-8 support of HTML elements
9
10
  /[if lt IE 9]
10
11
  = javascript_include_tag "http://html5shim.googlecode.com/svn/trunk/html5.js"
11
- /! Le styles
12
- = stylesheet_link_tag "application", :media => "all"
13
- / Le fav and touch icons
12
+ = stylesheet_link_tag "application", :media => "all"
14
13
  link href="images/favicon.ico" rel="shortcut icon"
15
14
  link href="images/apple-touch-icon.png" rel="apple-touch-icon"
16
15
  link href="images/apple-touch-icon-72x72.png" rel="apple-touch-icon" sizes="72x72"
17
16
  link href="images/apple-touch-icon-114x114.png" rel="apple-touch-icon" sizes="114x114"
18
17
 
19
-
20
18
  body
21
19
  .navbar.navbar-fixed-top
22
20
  .navbar-inner
@@ -66,7 +64,7 @@ html lang="en"
66
64
  footer
67
65
  p &copy; Company 2012
68
66
  /!
69
- Le javascript
67
+ Javascripts
70
68
  \==================================================
71
69
  /! Placed at the end of the document so the pages load faster
72
70
  = javascript_include_tag "application"
@@ -1,19 +1,16 @@
1
1
  <%%= form_for @<%= resource_name %>, :html => { :class => 'form-horizontal' } do |f| %>
2
- <fieldset>
3
- <legend><%%= controller.action_name.capitalize %> <%= model_name.titleize %></legend>
4
-
5
- <%- columns.each do |column| -%>
6
- <div class="control-group">
7
- <%%= f.label :<%= column.name %>, :class => 'control-label' %>
8
- <div class="controls">
9
- <%%= f.<%= column.field_type %> :<%= column.name %>, :class => '<%= column.field_type %>' %>
10
- </div>
2
+ <%- columns.each do |column| -%>
3
+ <div class="control-group">
4
+ <%%= f.label :<%= column.name %>, :class => 'control-label' %>
5
+ <div class="controls">
6
+ <%%= f.<%= column.field_type %> :<%= column.name %>, :class => '<%= column.field_type %>' %>
11
7
  </div>
8
+ </div>
9
+ <%- end -%>
12
10
 
13
- <%- end -%>
14
- <div class="form-actions">
15
- <%%= f.submit nil, :class => 'btn btn-primary' %>
16
- <%%= link_to 'Cancel', <%= controller_routing_path %>_path, :class => 'btn' %>
17
- </div>
18
- </fieldset>
11
+ <div class="form-actions">
12
+ <%%= f.submit nil, :class => 'btn btn-primary' %>
13
+ <%%= link_to t('.cancel', :default => t("helpers.links.cancel")),
14
+ <%= controller_routing_path %>_path, :class => 'btn' %>
15
+ </div>
19
16
  <%% end %>
@@ -1,14 +1,10 @@
1
1
  = form_for @<%= resource_name %>, :html => { :class => 'form-horizontal' } do |f|
2
- %fieldset
3
- %legend
4
- = controller.action_name.capitalize
5
- <%= model_name.titleize %>
6
- <%- columns.each do |column| -%>
7
- .control-group
8
- = f.label :<%= column.name %>, :class => 'control-label'
9
- .controls
10
- = f.<%= column.field_type %> :<%= column.name %>, :class => '<%= column.field_type %>'
11
- <%- end -%>
12
- .form-actions
13
- = f.submit nil, :class => 'btn btn-primary'
14
- = link_to "Cancel", <%= controller_routing_path %>_path, :class => 'btn'
2
+ <%- columns.each do |column| -%>
3
+ .control-group
4
+ = f.label :<%= column.name %>, :class => 'control-label'
5
+ .controls
6
+ = f.<%= column.field_type %> :<%= column.name %>, :class => '<%= column.field_type %>'
7
+ <%- end -%>
8
+ .form-actions
9
+ = f.submit nil, :class => 'btn btn-primary'
10
+ = link_to t('.cancel', :default => t("helpers.links.cancel")), <%= controller_routing_path %>_path, :class => 'btn'
@@ -1,11 +1,11 @@
1
- <%- columns.each do |column| -%>
2
- .clearfix
3
- = f.label :<%= column.name %>, t("activerecord.attributes.<%= model_name.underscore %>.<%= column.name %>", :default => "<%= column.name.humanize %>"), :class => :label
4
- .input
5
- = f.<%= column.field_type %> :<%= column.name %>, :class => '<%= column.field_type %>'
6
- <%- end -%>
7
-
8
- .form-actions
9
- button class="btn primary" type="submit" Save
10
- | or
11
- = link_to "Cancel", <%= controller_routing_path %>_path
1
+ = form_for @<%= resource_name %>, :html => { :class => "form-horizontal" } do |f|
2
+ <%- columns.each do |column| -%>
3
+ .control-group
4
+ = f.label :<%= column.name %>, :class => 'control-label'
5
+ .controls
6
+ = f.<%= column.field_type %> :<%= column.name %>, :class => '<%= column.field_type %>'
7
+ <%- end -%>
8
+ .form-actions
9
+ = f.submit nil, :class => 'btn btn-primary'
10
+ '
11
+ = link_to t('.cancel', :default => t("helpers.links.cancel")), <%= controller_routing_path %>_path, :class => 'btn'
@@ -1 +1,4 @@
1
+ <%%- model_class = @<%= resource_name %>.class -%>
2
+ <h1><%%=t '.title', :default => t('helpers.titles.edit', :model => model_class.model_name.human,
3
+ :default => "Edit #{model_class.model_name.human}") %></h1>
1
4
  <%%= render :partial => 'form' %>
@@ -1 +1,3 @@
1
+ - model_class = @<%= resource_name %>.class
2
+ %h1=t '.title', :default => t('helpers.titles.edit', :model => model_class.model_name.human, :default => "Edit #{model_class.model_name.human}")
1
3
  = render :partial => "form"
@@ -1,3 +1,3 @@
1
- = form_for @<%= resource_name %>, :url => <%= singular_controller_routing_path %>_path(@<%= resource_name %>), :html => { :class => "edit_<%= resource_name %>", :id => "edit_<%= resource_name %>" } do |f|
2
- input name="_method" type="hidden" value="put"
3
- = render :partial => "form", :locals => {:f => f}
1
+ - model_class = @<%= resource_name %>.class
2
+ h1=t '.title', :default => t('helpers.titles.edit', :model => model_class.model_name.human, :default => "Edit #{model_class.model_name.human}")
3
+ = render :partial => "form"
@@ -1,30 +1,38 @@
1
- <h1><%= resource_name.titleize %>s</h1>
1
+ <%%- model_class = <%= resource_name.classify %>.new.class -%>
2
+ <h1><%%=t '.title', :default => model_class.model_name.human.pluralize %></h1>
2
3
  <table class="table table-striped">
3
4
  <thead>
4
5
  <tr>
5
- <th>ID</th>
6
- <%- unless columns.empty? -%>
7
- <th><%= columns.first.name.humanize %></th>
6
+ <th><%%= model_class.human_attribute_name(:id) %></th>
7
+ <%- columns.each do |column| -%>
8
+ <th><%%= model_class.human_attribute_name(:<%= column.name %>) %></th>
8
9
  <%- end -%>
9
- <th>Created at</th>
10
- <th>Actions</th>
10
+ <th><%%= model_class.human_attribute_name(:created_at) %></th>
11
+ <th><%%=t '.actions', :default => t("helpers.actions") %></th>
11
12
  </tr>
12
13
  </thead>
13
14
  <tbody>
14
15
  <%% @<%= plural_resource_name %>.each do |<%= resource_name %>| %>
15
16
  <tr>
16
- <td><%%= <%= resource_name %>.id %></td>
17
- <%- unless columns.empty? -%>
18
- <td><%%= link_to <%= resource_name %>.<%= columns.first.name %>, <%= singular_controller_routing_path %>_path(<%= resource_name %>) %></td>
17
+ <td><%%= link_to <%= resource_name %>.id, <%= singular_controller_routing_path %>_path(<%= resource_name %>) %></td>
18
+ <%- columns.each do |column| -%>
19
+ <td><%%= <%= resource_name %>.<%= column.name %> %></td>
19
20
  <%- end -%>
20
- <td><%%= <%= resource_name %>.created_at %></td>
21
+ <td><%%=l <%= resource_name %>.created_at %></td>
21
22
  <td>
22
- <%%= link_to 'Edit', edit_<%= singular_controller_routing_path %>_path(<%= resource_name %>), :class => 'btn btn-mini' %>
23
- <%%= link_to 'Destroy', <%= singular_controller_routing_path %>_path(<%= resource_name %>), :method => :delete, :confirm => 'Are you sure?', :class => 'btn btn-mini btn-danger' %>
23
+ <%%= link_to t('.edit', :default => t("helpers.links.edit")),
24
+ edit_<%= singular_controller_routing_path %>_path(<%= resource_name %>), :class => 'btn btn-mini' %>
25
+ <%%= link_to t('.destroy', :default => t("helpers.links.destroy")),
26
+ <%= singular_controller_routing_path %>_path(<%= resource_name %>),
27
+ :method => :delete,
28
+ :confirm => t('.confirm', :default => t("helpers.links.confirm", :default => 'Are you sure?')),
29
+ :class => 'btn btn-mini btn-danger' %>
24
30
  </td>
25
31
  </tr>
26
32
  <%% end %>
27
33
  </tbody>
28
34
  </table>
29
35
 
30
- <%%= link_to 'New', new_<%= singular_controller_routing_path %>_path, :class => 'btn btn-primary' %>
36
+ <%%= link_to t('.new', :default => t("helpers.links.new")),
37
+ new_<%= singular_controller_routing_path %>_path,
38
+ :class => 'btn btn-primary' %>
@@ -1,25 +1,24 @@
1
- %h1 <%= resource_name.titleize %>s
1
+ - model_class = <%= resource_name.classify %>.new.class
2
+ %h1=t '.title', :default => model_class.model_name.human.pluralize
2
3
  %table.table.table-striped
3
4
  %thead
4
5
  %tr
5
- %th ID
6
- <%- unless columns.empty? -%>
7
- %th
8
- = t("activerecord.attributes.<%= singular_controller_routing_path %>.<%= columns.first.name %>", :default => t("activerecord.labels.<%= columns.first.name %>", :default => "<%= columns.first.name.capitalize %>"))
6
+ %th= model_class.human_attribute_name(:id)
7
+ <%- columns.each do |column| -%>
8
+ %th= model_class.human_attribute_name(:<%= column.name %>)
9
9
  <%- end -%>
10
- %th Created at
11
- %th Actions
10
+ %th= model_class.human_attribute_name(:created_at)
11
+ %th=t '.actions', :default => t("helpers.actions")
12
12
  %tbody
13
13
  - @<%= plural_resource_name %>.each do |<%= resource_name %>|
14
14
  %tr
15
- %td= <%= resource_name %>.id
16
- <%- unless columns.empty? -%>
17
- %td= link_to <%= resource_name %>.<%= columns.first.name %>, <%= singular_controller_routing_path %>_path(<%= resource_name %>)
15
+ %td= link_to <%= resource_name %>.id, <%= singular_controller_routing_path %>_path(<%= resource_name %>)
16
+ <%- columns.each do |column| -%>
17
+ %td= <%= resource_name %>.<%= column.name %>
18
18
  <%- end -%>
19
- %td= <%= resource_name %>.created_at
19
+ %td=l <%= resource_name %>.created_at
20
20
  %td
21
- = link_to "Show", <%= singular_controller_routing_path %>_path(<%= resource_name %>), :class => 'btn btn-mini'
22
- = link_to "Edit", edit_<%= singular_controller_routing_path %>_path(<%= resource_name %>), :class => 'btn btn-mini'
23
- = link_to "Destroy", <%= singular_controller_routing_path %>_path(<%= resource_name %>), :method => :delete, :confirm => "#{t("web-app-theme.confirm", :default => "Are you sure?")}", :class => 'btn btn-mini btn-danger'
21
+ = link_to t('.edit', :default => t("helpers.links.edit")), edit_<%= singular_controller_routing_path %>_path(<%= resource_name %>), :class => 'btn btn-mini'
22
+ = link_to t('.destroy', :default => t("helpers.links.destroy")), <%= singular_controller_routing_path %>_path(<%= resource_name %>), :method => :delete, :confirm => t('.confirm', :default => t("helpers.links.confirm", :default => 'Are you sure?')), :class => 'btn btn-mini btn-danger'
24
23
 
25
- = link_to "New", new_<%= singular_controller_routing_path %>_path, :class => 'btn btn-primary'
24
+ = link_to t('.new', :default => t("helpers.links.new")), new_<%= singular_controller_routing_path %>_path, :class => 'btn btn-primary'
@@ -1,25 +1,26 @@
1
- h1 <%= resource_name.titleize %>s
1
+ - model_class = <%= resource_name.classify %>.new.class
2
+ h1=t '.title', :default => model_class.model_name.human.pluralize
2
3
  table class="table table-striped"
3
4
  thead
4
5
  tr
5
- th ID
6
- <%- unless columns.empty? -%>
7
- th
8
- = t("activerecord.attributes.<%= singular_controller_routing_path %>.<%= columns.first.name %>", :default => t("activerecord.labels.<%= columns.first.name %>", :default => "<%= columns.first.name.capitalize %>"))
6
+ th= model_class.human_attribute_name(:id)
7
+ <%- columns.each do |column| -%>
8
+ th= model_class.human_attribute_name(:<%= column.name %>)
9
9
  <%- end -%>
10
- th Created at
11
- th Actions
10
+ th= model_class.human_attribute_name(:created_at)
11
+ th=t '.actions', :default => t("helpers.actions")
12
12
  tbody
13
13
  - @<%= plural_resource_name %>.each do |<%= resource_name %>|
14
14
  tr
15
- td= <%= resource_name %>.id
16
- <%- unless columns.empty? -%>
17
- td= link_to <%= resource_name %>.<%= columns.first.name %>, <%= singular_controller_routing_path %>_path(<%= resource_name %>)
15
+ td= link_to <%= resource_name %>.id, <%= singular_controller_routing_path %>_path(<%= resource_name %>)
16
+ <%- columns.each do |column| -%>
17
+ td= <%= resource_name %>.<%= column.name %>
18
18
  <%- end -%>
19
- td= <%= resource_name %>.created_at
19
+ td=l <%= resource_name %>.created_at
20
20
  td
21
- = link_to "Show", <%= singular_controller_routing_path %>_path(<%= resource_name %>)
22
- = link_to "Edit", edit_<%= singular_controller_routing_path %>_path(<%= resource_name %>)
23
- = link_to "Destroy", <%= singular_controller_routing_path %>_path(<%= resource_name %>), :method => :delete, :confirm => "#{t("web-app-theme.confirm", :default => "Are you sure?")}"
21
+ = link_to t('.edit', :default => t("helpers.links.edit")), edit_<%= singular_controller_routing_path %>_path(<%= resource_name %>), :class => 'btn btn-mini'
22
+ '
23
+ = link_to t('.destroy', :default => t("helpers.links.destroy")), <%= singular_controller_routing_path %>_path(<%= resource_name %>), :method => :delete, :confirm => t('.confirm', :default => t("helpers.links.confirm", :default => 'Are you sure?')), :class => 'btn btn-mini btn-danger'
24
+
25
+ = link_to t('.new', :default => t("helpers.links.new")), new_<%= singular_controller_routing_path %>_path, :class => 'btn btn-primary'
24
26
 
25
- = link_to "New", new_<%= singular_controller_routing_path %>_path, :class => 'btn btn-primary'
@@ -1 +1,4 @@
1
+ <%%- model_class = @<%= resource_name %>.class -%>
2
+ <h1><%%=t '.title', :default => t('helpers.titles.new', :model => model_class.model_name.human,
3
+ :default => "New #{model_class.model_name.human}") %></h1>
1
4
  <%%= render :partial => 'form' %>
@@ -1 +1,3 @@
1
+ - model_class = @<%= resource_name %>.class
2
+ %h1=t '.title', :default => t('helpers.titles.new', :model => model_class.model_name.human, :default => "New #{model_class.model_name.human}")
1
3
  = render :partial => "form"
@@ -1,2 +1,3 @@
1
- = form_for @<%= resource_name %>, :url => <%= controller_routing_path %>_path, :html => { :class => :form } do |f|
2
- = render :partial => "form", :locals => {:f => f}
1
+ - model_class = @<%= resource_name %>.class
2
+ h1=t '.title', :default => t('helpers.titles.new', :model => model_class.model_name.human, :default => "New #{model_class.model_name.human}")
3
+ = render :partial => "form"