bootstrap-sass-extras 0.0.3 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (96) hide show
  1. checksums.yaml +5 -5
  2. data/.travis.yml +9 -0
  3. data/CHANGELOG.md +48 -5
  4. data/Gemfile +4 -1
  5. data/Gemfile.lock +147 -87
  6. data/README.md +142 -34
  7. data/Rakefile +11 -1
  8. data/app/helpers/badge_helper.rb +13 -0
  9. data/app/helpers/bootstrap_flash_helper.rb +18 -10
  10. data/app/helpers/bootstrap_viewport_meta_helper.rb +27 -0
  11. data/app/helpers/glyph_helper.rb +10 -7
  12. data/app/helpers/modal_helper.rb +19 -15
  13. data/app/helpers/nav_helper.rb +40 -0
  14. data/app/helpers/twitter_breadcrumbs_helper.rb +8 -2
  15. data/app/helpers/url_helper.rb +28 -0
  16. data/app/views/bootstrap_sass_extras/_breadcrumbs.html.erb +6 -0
  17. data/bootstrap-sass-extras.gemspec +1 -0
  18. data/lib/bootstrap-sass-extras/breadcrumbs.rb +57 -0
  19. data/lib/bootstrap-sass-extras/engine.rb +6 -0
  20. data/lib/bootstrap-sass-extras/version.rb +1 -1
  21. data/lib/generators/bootstrap/install/templates/en.bootstrap.yml +1 -0
  22. data/lib/generators/bootstrap/layout/layout_generator.rb +1 -4
  23. data/lib/generators/bootstrap/layout/templates/layout.html.erb +39 -57
  24. data/lib/generators/bootstrap/layout/templates/layout.html.haml +27 -45
  25. data/lib/generators/bootstrap/layout/templates/layout.html.slim +27 -46
  26. data/lib/generators/bootstrap/partial/templates/_login.html.erb +6 -6
  27. data/lib/generators/bootstrap/themed/templates/_form.html.erb +11 -9
  28. data/lib/generators/bootstrap/themed/templates/_form.html.haml +9 -8
  29. data/lib/generators/bootstrap/themed/templates/_form.html.slim +9 -9
  30. data/lib/generators/bootstrap/themed/templates/edit.html.erb +2 -2
  31. data/lib/generators/bootstrap/themed/templates/edit.html.haml +2 -2
  32. data/lib/generators/bootstrap/themed/templates/edit.html.slim +2 -2
  33. data/lib/generators/bootstrap/themed/templates/index.html.erb +16 -14
  34. data/lib/generators/bootstrap/themed/templates/index.html.haml +11 -7
  35. data/lib/generators/bootstrap/themed/templates/index.html.slim +13 -11
  36. data/lib/generators/bootstrap/themed/templates/new.html.erb +2 -2
  37. data/lib/generators/bootstrap/themed/templates/new.html.haml +2 -2
  38. data/lib/generators/bootstrap/themed/templates/new.html.slim +3 -3
  39. data/lib/generators/bootstrap/themed/templates/show.html.erb +19 -17
  40. data/lib/generators/bootstrap/themed/templates/show.html.haml +12 -12
  41. data/lib/generators/bootstrap/themed/templates/show.html.slim +12 -11
  42. data/lib/generators/bootstrap/themed/templates/simple_form/_form.html.erb +9 -7
  43. data/lib/generators/bootstrap/themed/templates/simple_form/_form.html.haml +6 -5
  44. data/lib/generators/bootstrap/themed/templates/simple_form/_form.html.slim +6 -6
  45. data/spec/dummy/README.rdoc +15 -248
  46. data/spec/dummy/Rakefile +1 -2
  47. data/spec/dummy/app/assets/config/manifest.js +3 -0
  48. data/spec/dummy/app/{mailers/.gitkeep → assets/images/.keep} +0 -0
  49. data/spec/dummy/app/assets/javascripts/application.js +4 -6
  50. data/spec/dummy/app/assets/stylesheets/application.css +6 -4
  51. data/spec/dummy/app/controllers/application_controller.rb +3 -1
  52. data/spec/dummy/app/{models/.gitkeep → controllers/concerns/.keep} +0 -0
  53. data/spec/dummy/{lib/assets/.gitkeep → app/mailers/.keep} +0 -0
  54. data/spec/dummy/{log/.gitkeep → app/models/.keep} +0 -0
  55. data/spec/dummy/app/models/concerns/.keep +0 -0
  56. data/spec/dummy/app/views/application/_custom_breadcrumbs.html.erb +1 -0
  57. data/spec/dummy/app/views/layouts/application.html.erb +2 -2
  58. data/spec/dummy/bin/bundle +3 -0
  59. data/spec/dummy/bin/rails +4 -0
  60. data/spec/dummy/bin/rake +4 -0
  61. data/spec/dummy/bin/setup +29 -0
  62. data/spec/dummy/config.ru +2 -2
  63. data/spec/dummy/config/application.rb +1 -37
  64. data/spec/dummy/config/boot.rb +4 -9
  65. data/spec/dummy/config/database.yml +8 -8
  66. data/spec/dummy/config/environment.rb +3 -3
  67. data/spec/dummy/config/environments/development.rb +22 -18
  68. data/spec/dummy/config/environments/production.rb +46 -34
  69. data/spec/dummy/config/environments/test.rb +19 -14
  70. data/spec/dummy/config/initializers/assets.rb +11 -0
  71. data/spec/dummy/config/initializers/cookies_serializer.rb +3 -0
  72. data/spec/dummy/config/initializers/filter_parameter_logging.rb +4 -0
  73. data/spec/dummy/config/initializers/inflections.rb +6 -5
  74. data/spec/dummy/config/initializers/mime_types.rb +0 -1
  75. data/spec/dummy/config/initializers/session_store.rb +1 -6
  76. data/spec/dummy/config/initializers/wrap_parameters.rb +6 -6
  77. data/spec/dummy/config/locales/en.yml +20 -2
  78. data/spec/dummy/config/routes.rb +23 -25
  79. data/spec/dummy/config/secrets.yml +22 -0
  80. data/spec/dummy/lib/assets/.keep +0 -0
  81. data/spec/dummy/log/.keep +0 -0
  82. data/spec/dummy/public/404.html +54 -13
  83. data/spec/dummy/public/422.html +54 -13
  84. data/spec/dummy/public/500.html +53 -12
  85. data/spec/helpers/badge_helper_spec.rb +16 -0
  86. data/spec/helpers/bootstrap_flash_helper_spec.rb +52 -12
  87. data/spec/helpers/bootstrap_viewport_meta_helper_spec.rb +17 -0
  88. data/spec/helpers/button_to_helper_spec.rb +33 -0
  89. data/spec/helpers/glyph_helper_spec.rb +15 -0
  90. data/spec/helpers/nav_helper_spec.rb +79 -0
  91. data/spec/helpers/twitter_breadcrumbs_helper_spec.rb +161 -0
  92. data/spec/spec_helper.rb +1 -1
  93. metadata +69 -30
  94. data/app/views/twitter-bootstrap/_breadcrumbs.html.erb +0 -14
  95. data/spec/dummy/config/initializers/secret_token.rb +0 -7
  96. data/spec/dummy/script/rails +0 -6
@@ -3,67 +3,49 @@
3
3
  %head
4
4
  %meta(charset="utf-8")
5
5
  %meta(http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1")
6
- %meta(name="viewport" content="width=device-width, initial-scale=1.0")
6
+ = viewport_meta_tag
7
7
  %title= content_for?(:title) ? yield(:title) : "<%= app_name %>"
8
8
  = csrf_meta_tags
9
9
  / Le HTML5 shim, for IE6-8 support of HTML elements
10
10
  /[if lt IE 9]
11
11
  = javascript_include_tag "//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.6.1/html5shiv.js"
12
- = stylesheet_link_tag "application", :media => "all"
13
- = favicon_link_tag 'apple-touch-icon-144x144-precomposed.png', :rel => 'apple-touch-icon-precomposed', :type => 'image/png', :sizes => '144x144'
14
- = favicon_link_tag 'apple-touch-icon-114x114-precomposed.png', :rel => 'apple-touch-icon-precomposed', :type => 'image/png', :sizes => '114x114'
15
- = favicon_link_tag 'apple-touch-icon-72x72-precomposed.png', :rel => 'apple-touch-icon-precomposed', :type => 'image/png', :sizes => '72x72'
16
- = favicon_link_tag 'apple-touch-icon-precomposed.png', :rel => 'apple-touch-icon-precomposed', :type => 'image/png'
17
- = favicon_link_tag 'favicon.ico', :rel => 'shortcut icon'
18
-
12
+ = javascript_include_tag "//cdnjs.cloudflare.com/ajax/libs/respond.js/1.3.0/respond.js"
13
+ = stylesheet_link_tag "application", media: "all"
14
+ = favicon_link_tag 'apple-touch-icon-144x144-precomposed.png', rel: 'apple-touch-icon-precomposed', type: 'image/png', sizes: '144x144'
15
+ = favicon_link_tag 'apple-touch-icon-114x114-precomposed.png', rel: 'apple-touch-icon-precomposed', type: 'image/png', sizes: '114x114'
16
+ = favicon_link_tag 'apple-touch-icon-72x72-precomposed.png', rel: 'apple-touch-icon-precomposed', type: 'image/png', sizes: '72x72'
17
+ = favicon_link_tag 'apple-touch-icon-precomposed.png', rel: 'apple-touch-icon-precomposed', type: 'image/png'
18
+ = favicon_link_tag 'favicon.ico', rel: 'shortcut icon'
19
+ = javascript_include_tag "application"
19
20
 
20
21
  %body
21
- .navbar.navbar-<%= layout_type %>-top
22
- .navbar-inner
23
- .<%= container_class %>
24
- %a.btn.btn-navbar(data-target=".nav-collapse" data-toggle="collapse")
22
+ %nav.navbar.navbar-default.navbar-fixed-top(role="navigation")
23
+ .container
24
+ .navbar-header
25
+ %button.navbar-toggle(type="button" data-toggle="collapse" data-target=".navbar-responsive-collapse")
25
26
  %span.icon-bar
26
27
  %span.icon-bar
27
28
  %span.icon-bar
28
- %a.brand(href="#") <%= app_name %>
29
- .container.nav-collapse
30
- %ul.nav
31
- %li= link_to "Link 1", "/path1"
32
- %li= link_to "Link 2", "/path2"
33
- %li= link_to "Link 3", "/path3"
34
-
35
- .<%= container_class %>
36
- <%- if layout_type == "fluid" -%>
29
+ %a.navbar-brand(href="#") <%= app_name %>
30
+ .navbar-collapse.collapse.navbar-responsive-collapse
31
+ %ul.nav.navbar-nav
32
+ %li.active= link_to "Link 1", "#"
33
+ %li= link_to "Link 2", "#"
34
+ %li= link_to "Link 3", "#"
35
+ %li= link_to "Link 3", "#"
37
36
 
38
- .row-fluid
39
- .span3
40
- .well.sidebar-nav
41
- %ul.nav.nav-list
42
- %li.nav-header Sidebar
43
- %li= link_to "Link 1", "/path1"
44
- %li= link_to "Link 2", "/path2"
45
- %li= link_to "Link 3", "/path3"
46
- .span9
47
- = bootstrap_flash
48
- = yield
49
- <% else %>
37
+ .container
50
38
  .row
51
- .span9
39
+ .col-md-9
52
40
  = bootstrap_flash
53
41
  = yield
54
- .span3
42
+ .col-md-3
55
43
  .well.sidebar-nav
56
44
  %h3 Sidebar
57
45
  %ul.nav.nav-list
58
46
  %li.nav-header Sidebar
59
- %li= link_to "Link 1", "/path1"
60
- %li= link_to "Link 2", "/path2"
61
- %li= link_to "Link 3", "/path3"
62
- <% end %>
47
+ %li= link_to "Link 1", "#"
48
+ %li= link_to "Link 2", "#"
49
+ %li= link_to "Link 3", "#"
63
50
  %footer
64
- %p &copy; Company 2013
65
- /
66
- Javascripts
67
- \==================================================
68
- / Placed at the end of the document so the pages load faster
69
- = javascript_include_tag "application"
51
+ %p &copy; Company <%= Date.today.year %>
@@ -3,69 +3,50 @@ html lang="en"
3
3
  head
4
4
  meta charset="utf-8"
5
5
  meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1"
6
- meta name="viewport" content="width=device-width, initial-scale=1.0"
6
+ = viewport_meta_tag
7
7
  title= content_for?(:title) ? yield(:title) : "<%= app_name %>"
8
8
  = csrf_meta_tags
9
9
 
10
10
  /! Le HTML5 shim, for IE6-8 support of HTML elements
11
11
  /[if lt IE 9]
12
12
  = javascript_include_tag "//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.6.1/html5shiv.js"
13
- = stylesheet_link_tag "application", :media => "all"
14
- = favicon_link_tag 'apple-touch-icon-144x144-precomposed.png', :rel => 'apple-touch-icon-precomposed', :type => 'image/png', :sizes => '144x144'
15
- = favicon_link_tag 'apple-touch-icon-114x114-precomposed.png', :rel => 'apple-touch-icon-precomposed', :type => 'image/png', :sizes => '114x114'
16
- = favicon_link_tag 'apple-touch-icon-72x72-precomposed.png', :rel => 'apple-touch-icon-precomposed', :type => 'image/png', :sizes => '72x72'
17
- = favicon_link_tag 'apple-touch-icon-precomposed.png', :rel => 'apple-touch-icon-precomposed', :type => 'image/png'
18
- = favicon_link_tag 'favicon.ico', :rel => 'shortcut icon'
19
-
20
-
13
+ = javascript_include_tag "//cdnjs.cloudflare.com/ajax/libs/respond.js/1.3.0/respond.js"
14
+ = stylesheet_link_tag "application", media: "all"
15
+ = favicon_link_tag 'apple-touch-icon-144x144-precomposed.png', rel: 'apple-touch-icon-precomposed', type: 'image/png', sizes: '144x144'
16
+ = favicon_link_tag 'apple-touch-icon-114x114-precomposed.png', rel: 'apple-touch-icon-precomposed', type: 'image/png', sizes: '114x114'
17
+ = favicon_link_tag 'apple-touch-icon-72x72-precomposed.png', rel: 'apple-touch-icon-precomposed', type: 'image/png', sizes: '72x72'
18
+ = favicon_link_tag 'apple-touch-icon-precomposed.png', rel: 'apple-touch-icon-precomposed', type: 'image/png'
19
+ = favicon_link_tag 'favicon.ico', rel: 'shortcut icon'
20
+ = javascript_include_tag "application"
21
21
 
22
22
  body
23
- .navbar.navbar-<%= layout_type %>-top
24
- .navbar-inner
25
- .<%= container_class %>
26
- a.btn.btn-navbar data-target=".nav-collapse" data-toggle="collapse"
23
+ nav.navbar.navbar-default.navbar-fixed-top role="navigation"
24
+ .container
25
+ .navbar-header
26
+ button.navbar-toggle type="button" data-toggle="collapse" data-target=".navbar-responsive-collapse"
27
27
  span.icon-bar
28
28
  span.icon-bar
29
29
  span.icon-bar
30
- a.brand href="#"<%= app_name %>
31
- .<%=container_class%>.nav-collapse
32
- ul.nav
33
- li= link_to "Link 1", "/path1"
34
- li= link_to "Link 2", "/path2"
35
- li= link_to "Link 3", "/path3"
30
+ a.navbar-brand href="#" <%= app_name %>
31
+ .navbar-collapse.collapse.navbar-responsive-collapse
32
+ ul.nav.navbar-nav
33
+ li.active= link_to "Link 1", "#"
34
+ li= link_to "Link 2", "#"
35
+ li= link_to "Link 3", "#"
36
36
 
37
- .<%= container_class %>
38
- <%- if layout_type == "fluid" -%>
39
-
40
- .row-fluid
41
- .span3
42
- .well.sidebar-nav
43
- ul.nav.nav-list
44
- li.nav-header Sidebar
45
- li= link_to "Link 1", "/path1"
46
- li= link_to "Link 2", "/path2"
47
- li= link_to "Link 3", "/path3"
48
- .span9
49
- = bootstrap_flash
50
- = yield
51
- <% else %>
37
+ .container
52
38
  .row
53
- .span9
39
+ .col-md-9
54
40
  = bootstrap_flash
55
41
  = yield
56
- .span3
42
+ .col-md-3
57
43
  .well.sidebar-nav
58
44
  h3 Sidebar
59
45
  ul.nav.nav-list
60
46
  li.nav-header Sidebar
61
- li= link_to "Link 1", "/path1"
62
- li= link_to "Link 2", "/path2"
63
- li= link_to "Link 3", "/path3"
64
- <% end %>
47
+ li= link_to "Link 1", "#"
48
+ li= link_to "Link 2", "#"
49
+ li= link_to "Link 3", "#"
50
+
65
51
  footer
66
- p &copy; Company 2013
67
- /!
68
- Javascripts
69
- \==================================================
70
- /! Placed at the end of the document so the pages load faster
71
- = javascript_include_tag "application"
52
+ p &copy; Company <%= Date.today.year %>
@@ -1,14 +1,14 @@
1
1
  <h2>Sign in</h2>
2
2
 
3
- <%= form_for(resource, :as => resource_name, :url => session_path(resource_name), :html => { :class => 'form-horizontal' }) do |f| %>
3
+ <%= form_for(resource, as: resource_name, url: session_path(resource_name), html: { class: 'form-horizontal' }) do |f| %>
4
4
  <div class="control-group">
5
- <%= f.label :email, :class => 'control-label' %>
5
+ <%= f.label :email, class: 'control-label' %>
6
6
  <div class="controls">
7
7
  <%= f.email_field :email %>
8
8
  </div>
9
9
  </div>
10
10
  <div class="control-group">
11
- <%= f.label :password, :class => 'control-label' %>
11
+ <%= f.label :password, class: 'control-label' %>
12
12
  <div class="controls">
13
13
  <%= f.password_field :password %>
14
14
  </div>
@@ -16,14 +16,14 @@
16
16
 
17
17
  <% if devise_mapping.rememberable? -%>
18
18
  <div class='control-group' >
19
- <%= f.label :remember_me, :class => 'control-label' %>
19
+ <%= f.label :remember_me, class: 'control-label' %>
20
20
  <%= f.check_box :remember_me %>
21
21
  </div>
22
22
  <% end -%>
23
23
 
24
24
  <div class="form-actions">
25
- <%= f.submit "Sign in", :class => 'btn' %>
25
+ <%= f.submit "Sign in", class: 'btn' %>
26
26
  </div>
27
27
  <% end %>
28
28
 
29
- <%= render :partial => "devise/shared/links" %>
29
+ <%= render partial: "devise/shared/links" %>
@@ -1,16 +1,18 @@
1
- <%%= form_for @<%= resource_name %>, :html => { :class => 'form-horizontal' } do |f| %>
1
+ <%%= form_for @<%= resource_name %>, html: { class: 'form-horizontal' } do |f| %>
2
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 %>' %>
3
+ <div class="form-group">
4
+ <%%= f.label :<%= column.name %>, class: 'control-label col-md-2' %>
5
+ <div class="col-md-10">
6
+ <%%= f.<%= column.field_type %> :<%= column.name %>, class: '<%= column.field_type %> form-control' %>
7
7
  </div>
8
8
  </div>
9
9
  <%- end -%>
10
10
 
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' %>
11
+ <div class="form-group">
12
+ <div class='col-md-offset-2 col-md-10'>
13
+ <%%= f.submit nil, class: 'btn btn-primary' %>
14
+ <%%= link_to t('.cancel', default: t("helpers.links.cancel")),
15
+ <%= controller_routing_path %>_path, class: 'btn btn-default' %>
16
+ </div>
15
17
  </div>
16
18
  <%% end %>
@@ -1,10 +1,11 @@
1
- = form_for @<%= resource_name %>, :html => { :class => 'form-horizontal' } do |f|
1
+ = form_for @<%= resource_name %>, html: { class: 'form-horizontal' } do |f|
2
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 %>'
3
+ .form-group
4
+ = f.label :<%= column.name %>, class: 'control-label col-md-2'
5
+ .col-md-10
6
+ = f.<%= column.field_type %> :<%= column.name %>, class: '<%= column.field_type %> form-control'
7
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'
8
+ .form-group
9
+ .col-md-offset-2.col-md-10
10
+ = f.submit nil, class: 'btn btn-primary'
11
+ = link_to t('.cancel', default: t("helpers.links.cancel")), <%= controller_routing_path %>_path, class: 'btn btn-default'
@@ -1,11 +1,11 @@
1
- = form_for @<%= resource_name %>, :html => { :class => "form-horizontal" } do |f|
1
+ = form_for @<%= resource_name %>, html: { class: "form-horizontal" } do |f|
2
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 %>'
3
+ .form-group
4
+ = f.label :<%= column.name %>, class: 'control-label col-md-2'
5
+ .col-md-10
6
+ = f.<%= column.field_type %> :<%= column.name %>, class: '<%= column.field_type %> form-control'
7
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'
8
+ .form-group
9
+ .col-md-offset-2.col-md-10
10
+ = f.submit nil, class: 'btn btn-primary'
11
+ = link_to t('.cancel', default: t("helpers.links.cancel")), <%= controller_routing_path %>_path, class: 'btn btn-default'
@@ -1,5 +1,5 @@
1
1
  <%%- model_class = <%= resource_name.classify %> -%>
2
2
  <div class="page-header">
3
- <h1><%%=t '.title', :default => [:'helpers.titles.edit', 'Edit %{model}'], :model => model_class.model_name.human.titleize %></h1>
3
+ <h1><%%=t '.title', default: [:'helpers.titles.edit', 'Edit %{model}'], model: model_class.model_name.human.titleize %></h1>
4
4
  </div>
5
- <%%= render :partial => 'form' %>
5
+ <%%= render partial: 'form' %>
@@ -1,4 +1,4 @@
1
1
  - model_class = <%= resource_name.classify %>
2
2
  .page-header
3
- %h1=t '.title', :default => [:'helpers.titles.edit', 'Edit %{model}'], :model => model_class.model_name.human.titleize
4
- = render :partial => "form"
3
+ %h1=t '.title', default: [:'helpers.titles.edit', 'Edit %{model}'], model: model_class.model_name.human.titleize
4
+ = render partial: "form"
@@ -1,4 +1,4 @@
1
1
  - model_class = <%= resource_name.classify %>
2
2
  div class="page-header"
3
- h1=t '.title', :default => [:'helpers.titles.edit', 'Edit %{model}'], :model => model_class.model_name.human.titleize
4
- = render :partial => "form"
3
+ h1=t '.title', default: [:'helpers.titles.edit', 'Edit %{model}'], model: model_class.model_name.human.titleize
4
+ = render partial: "form"
@@ -1,6 +1,6 @@
1
1
  <%%- model_class = <%= resource_name.classify %> -%>
2
2
  <div class="page-header">
3
- <h1><%%=t '.title', :default => model_class.model_name.human.pluralize.titleize %></h1>
3
+ <h1><%%=t '.title', default: model_class.model_name.human.pluralize.titleize %></h1>
4
4
  </div>
5
5
  <table class="table table-striped">
6
6
  <thead>
@@ -10,31 +10,33 @@
10
10
  <th><%%= model_class.human_attribute_name(:<%= column.name %>) %></th>
11
11
  <%- end -%>
12
12
  <th><%%= model_class.human_attribute_name(:created_at) %></th>
13
- <th><%%=t '.actions', :default => t("helpers.actions") %></th>
13
+ <th><%%=t '.actions', default: t("helpers.actions") %></th>
14
14
  </tr>
15
15
  </thead>
16
16
  <tbody>
17
17
  <%% @<%= plural_resource_name %>.each do |<%= resource_name %>| %>
18
18
  <tr>
19
- <td><%%= link_to <%= resource_name %>.id, <%= singular_controller_routing_path %>_path(<%= resource_name %>) %></td>
19
+ <td><%%= <%= resource_name %>.id %></td>
20
20
  <%- columns.each do |column| -%>
21
- <td><%%= <%= resource_name %>.<%= column.name %> %></td>
21
+ <td><%%= <%= resource_name %>.<%= column.name %> %></td>
22
22
  <%- end -%>
23
- <td><%%=l <%= resource_name %>.created_at %></td>
23
+ <td><%%=l <%= resource_name %>.created_at, format: :long %></td>
24
24
  <td>
25
- <%%= link_to t('.edit', :default => t("helpers.links.edit")),
26
- edit_<%= singular_controller_routing_path %>_path(<%= resource_name %>), :class => 'btn btn-mini' %>
27
- <%%= link_to t('.destroy', :default => t("helpers.links.destroy")),
28
- <%= singular_controller_routing_path %>_path(<%= resource_name %>),
29
- :method => :delete,
30
- :data => { :confirm => t('.confirm', :default => t("helpers.links.confirm", :default => 'Are you sure?')) },
31
- :class => 'btn btn-mini btn-danger' %>
25
+ <%%= link_to <%= singular_controller_routing_path %>_path(<%= resource_name %>), class: 'btn btn-xs', title: "#{ t('.show', default: t('helpers.links.show')) }" do %>
26
+ <%%= glyph 'info-sign' %>
27
+ <%%- end -%>
28
+ <%%= link_to edit_<%= singular_controller_routing_path %>_path(<%= resource_name %>), class: 'btn btn-xs', title: "#{ t('.edit', default: t('helpers.links.edit')) }" do %>
29
+ <%%= glyph 'pencil' %>
30
+ <%%- end -%>
31
+ <%%= link_to <%= singular_controller_routing_path %>_path(<%= resource_name %>), method: :delete, data: { confirm: t('.confirm', default: t("helpers.links.confirm", default: 'Are you sure?')) }, class: 'btn btn-xs', title: "#{ t('.destroy', default: t('helpers.links.destroy')) }" do %>
32
+ <%%= glyph 'remove' %>
33
+ <%%- end -%>
32
34
  </td>
33
35
  </tr>
34
36
  <%% end %>
35
37
  </tbody>
36
38
  </table>
37
39
 
38
- <%%= link_to t('.new', :default => t("helpers.links.new")),
40
+ <%%= link_to t('.new', default: t("helpers.links.new")),
39
41
  new_<%= singular_controller_routing_path %>_path,
40
- :class => 'btn btn-primary' %>
42
+ class: 'btn btn-primary' %>
@@ -1,6 +1,6 @@
1
1
  - model_class = <%= resource_name.classify %>
2
2
  .page-header
3
- %h1=t '.title', :default => model_class.model_name.human.pluralize.titleize
3
+ %h1=t '.title', default: model_class.model_name.human.pluralize.titleize
4
4
  %table.table.table-striped
5
5
  %thead
6
6
  %tr
@@ -9,17 +9,21 @@
9
9
  %th= model_class.human_attribute_name(:<%= column.name %>)
10
10
  <%- end -%>
11
11
  %th= model_class.human_attribute_name(:created_at)
12
- %th=t '.actions', :default => t("helpers.actions")
12
+ %th=t '.actions', default: t("helpers.actions")
13
13
  %tbody
14
14
  - @<%= plural_resource_name %>.each do |<%= resource_name %>|
15
15
  %tr
16
- %td= link_to <%= resource_name %>.id, <%= singular_controller_routing_path %>_path(<%= resource_name %>)
16
+ %td= <%= resource_name %>.id
17
17
  <%- columns.each do |column| -%>
18
18
  %td= <%= resource_name %>.<%= column.name %>
19
19
  <%- end -%>
20
- %td=l <%= resource_name %>.created_at
20
+ %td=l <%= resource_name %>.created_at, format: :long
21
21
  %td
22
- = link_to t('.edit', :default => t("helpers.links.edit")), edit_<%= singular_controller_routing_path %>_path(<%= resource_name %>), :class => 'btn btn-mini'
23
- = link_to t('.destroy', :default => t("helpers.links.destroy")), <%= singular_controller_routing_path %>_path(<%= resource_name %>), :method => :delete, :data => { :confirm => t('.confirm', :default => t("helpers.links.confirm", :default => 'Are you sure?')) }, :class => 'btn btn-mini btn-danger'
22
+ = link_to <%= singular_controller_routing_path %>_path(<%= resource_name %>), class: 'btn btn-xs', title: "#{ t('.show', default: t('helpers.links.show')) }" do
23
+ = glyph 'info-sign'
24
+ = link_to edit_<%= singular_controller_routing_path %>_path(<%= resource_name %>), class: 'btn btn-xs', title: "#{ t('.edit', default: t('helpers.links.edit')) }" do
25
+ = glyph 'pencil'
26
+ = link_to <%= singular_controller_routing_path %>_path(<%= resource_name %>), method: :delete, data: { confirm: t('.confirm', default: t("helpers.links.confirm", default: 'Are you sure?')) }, class: 'btn btn-xs', title: "#{ t('.destroy', default: t('helpers.links.destroy')) }" do
27
+ = glyph 'remove'
24
28
 
25
- = link_to t('.new', :default => t("helpers.links.new")), new_<%= singular_controller_routing_path %>_path, :class => 'btn btn-primary'
29
+ = link_to t('.new', default: t("helpers.links.new")), new_<%= singular_controller_routing_path %>_path, class: 'btn btn-primary'
@@ -1,7 +1,7 @@
1
1
  - model_class = <%= resource_name.classify %>
2
- div class="page-header"
3
- h1=t '.title', :default => model_class.model_name.human.pluralize.titleize
4
- table class="table table-striped"
2
+ .page-header
3
+ h1=t '.title', default: model_class.model_name.human.pluralize.titleize
4
+ table.table.table-striped
5
5
  thead
6
6
  tr
7
7
  th= model_class.human_attribute_name(:id)
@@ -9,19 +9,21 @@ table class="table table-striped"
9
9
  th= model_class.human_attribute_name(:<%= column.name %>)
10
10
  <%- end -%>
11
11
  th= model_class.human_attribute_name(:created_at)
12
- th=t '.actions', :default => t("helpers.actions")
12
+ th=t '.actions', default: t("helpers.actions")
13
13
  tbody
14
14
  - @<%= plural_resource_name %>.each do |<%= resource_name %>|
15
15
  tr
16
- td= link_to <%= resource_name %>.id, <%= singular_controller_routing_path %>_path(<%= resource_name %>)
16
+ td= <%= resource_name %>.id
17
17
  <%- columns.each do |column| -%>
18
18
  td= <%= resource_name %>.<%= column.name %>
19
19
  <%- end -%>
20
- td=l <%= resource_name %>.created_at
20
+ td=l <%= resource_name %>.created_at, format: :long
21
21
  td
22
- = link_to t('.edit', :default => t("helpers.links.edit")), edit_<%= singular_controller_routing_path %>_path(<%= resource_name %>), :class => 'btn btn-mini'
23
- '
24
- = link_to t('.destroy', :default => t("helpers.links.destroy")), <%= singular_controller_routing_path %>_path(<%= resource_name %>), :method => :delete, :data => { :confirm => t('.confirm', :default => t("helpers.links.confirm", :default => 'Are you sure?')) }, :class => 'btn btn-mini btn-danger'
25
-
26
- = link_to t('.new', :default => t("helpers.links.new")), new_<%= singular_controller_routing_path %>_path, :class => 'btn btn-primary'
22
+ = link_to <%= singular_controller_routing_path %>_path(<%= resource_name %>), class: 'btn btn-xs', title: "#{ t('.show', default: t('helpers.links.show')) }" do
23
+ = glyph 'info-sign'
24
+ = link_to edit_<%= singular_controller_routing_path %>_path(<%= resource_name %>), class: 'btn btn-xs', title: "#{ t('.edit', default: t('helpers.links.edit')) }" do
25
+ = glyph 'pencil'
26
+ = link_to <%= singular_controller_routing_path %>_path(<%= resource_name %>), method: :delete, data: { confirm: t('.confirm', default: t("helpers.links.confirm", default: 'Are you sure?')) }, class: 'btn btn-xs', title: "#{ t('.destroy', default: t('helpers.links.destroy')) }" do
27
+ = glyph 'remove'
27
28
 
29
+ = link_to t('.new', default: t("helpers.links.new")), new_<%= singular_controller_routing_path %>_path, class: 'btn btn-primary'