bootstrap-generators 2.3.2 → 3.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (179) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +12 -2
  3. data/{LICENSE.txt → MIT-LICENSE} +1 -3
  4. data/README.md +19 -64
  5. data/Rakefile +24 -22
  6. data/bootstrap-generators.gemspec +3 -1
  7. data/lib/bootstrap-generators.rb +12 -1
  8. data/lib/bootstrap/generators/version.rb +1 -1
  9. data/lib/generators/bootstrap/install/install_generator.rb +9 -24
  10. data/lib/generators/bootstrap/install/templates/assets/stylesheets/bootstrap-variables.less +498 -179
  11. data/lib/generators/bootstrap/install/templates/assets/stylesheets/bootstrap-variables.scss +620 -0
  12. data/lib/generators/bootstrap/install/templates/assets/stylesheets/{fluid.css → starter.css} +6 -6
  13. data/lib/generators/bootstrap/install/templates/assets/stylesheets/{fluid.css.less → starter.less} +7 -7
  14. data/lib/generators/bootstrap/install/templates/assets/stylesheets/{fluid.css.scss → starter.scss} +7 -8
  15. data/lib/generators/bootstrap/install/templates/form_builders/form_builder/_form.html.erb +11 -9
  16. data/lib/generators/bootstrap/install/templates/form_builders/form_builder/_form.html.haml +9 -8
  17. data/lib/generators/bootstrap/install/templates/layouts/starter.html.erb +50 -0
  18. data/lib/generators/bootstrap/install/templates/layouts/{hero.html.haml → starter.html.haml} +0 -0
  19. data/lib/generators/bootstrap/install/templates/lib/templates/erb/scaffold/edit.html.erb +3 -3
  20. data/lib/generators/bootstrap/install/templates/lib/templates/erb/scaffold/index.html.erb +25 -25
  21. data/lib/generators/bootstrap/install/templates/lib/templates/erb/scaffold/new.html.erb +2 -2
  22. data/lib/generators/bootstrap/install/templates/lib/templates/erb/scaffold/show.html.erb +5 -5
  23. data/lib/generators/bootstrap/install/templates/lib/templates/haml/scaffold/edit.html.haml +3 -3
  24. data/lib/generators/bootstrap/install/templates/lib/templates/haml/scaffold/index.html.haml +20 -19
  25. data/lib/generators/bootstrap/install/templates/lib/templates/haml/scaffold/new.html.haml +2 -2
  26. data/lib/generators/bootstrap/install/templates/lib/templates/haml/scaffold/show.html.haml +5 -5
  27. data/readme-template.md.erb +5 -48
  28. data/test/lib/generators/bootstrap/install_generator_test.rb +3 -33
  29. data/vendor/assets/fonts/glyphicons-halflings-regular.eot +0 -0
  30. data/vendor/assets/fonts/glyphicons-halflings-regular.svg +228 -0
  31. data/vendor/assets/fonts/glyphicons-halflings-regular.ttf +0 -0
  32. data/vendor/assets/fonts/glyphicons-halflings-regular.woff +0 -0
  33. data/vendor/assets/javascripts/bootstrap-ie.js +2 -0
  34. data/vendor/assets/javascripts/bootstrap-ie/html5shiv.js +8 -0
  35. data/vendor/assets/javascripts/bootstrap-ie/respond.min.js +6 -0
  36. data/vendor/assets/javascripts/bootstrap.js +12 -13
  37. data/vendor/assets/javascripts/bootstrap/affix.js +126 -0
  38. data/vendor/assets/javascripts/{bootstrap-alert.js → bootstrap/alert.js} +35 -36
  39. data/vendor/assets/javascripts/bootstrap/button.js +109 -0
  40. data/vendor/assets/javascripts/bootstrap/carousel.js +217 -0
  41. data/vendor/assets/javascripts/bootstrap/collapse.js +179 -0
  42. data/vendor/assets/javascripts/bootstrap/dropdown.js +154 -0
  43. data/vendor/assets/javascripts/bootstrap/modal.js +246 -0
  44. data/vendor/assets/javascripts/bootstrap/popover.js +117 -0
  45. data/vendor/assets/javascripts/bootstrap/scrollspy.js +158 -0
  46. data/vendor/assets/javascripts/bootstrap/tab.js +135 -0
  47. data/vendor/assets/javascripts/bootstrap/tooltip.js +386 -0
  48. data/vendor/assets/javascripts/bootstrap/transition.js +56 -0
  49. data/vendor/assets/stylesheets/bootstrap.css +4638 -4000
  50. data/vendor/twitter/bootstrap/less/alerts.less +46 -58
  51. data/vendor/twitter/bootstrap/less/badges.less +51 -0
  52. data/vendor/twitter/bootstrap/less/bootstrap.less +27 -31
  53. data/vendor/twitter/bootstrap/less/breadcrumbs.less +7 -8
  54. data/vendor/twitter/bootstrap/less/button-groups.less +173 -154
  55. data/vendor/twitter/bootstrap/less/buttons.less +97 -165
  56. data/vendor/twitter/bootstrap/less/carousel.less +115 -64
  57. data/vendor/twitter/bootstrap/less/close.less +20 -19
  58. data/vendor/twitter/bootstrap/less/code.less +17 -22
  59. data/vendor/twitter/bootstrap/less/component-animations.less +10 -3
  60. data/vendor/twitter/bootstrap/less/dropdowns.less +92 -147
  61. data/vendor/twitter/bootstrap/less/forms.less +224 -561
  62. data/vendor/twitter/bootstrap/less/glyphicons.less +232 -0
  63. data/vendor/twitter/bootstrap/less/grid.less +336 -11
  64. data/vendor/twitter/bootstrap/less/input-groups.less +127 -0
  65. data/vendor/twitter/bootstrap/less/jumbotron.less +40 -0
  66. data/vendor/twitter/bootstrap/less/labels.less +58 -0
  67. data/vendor/twitter/bootstrap/less/list-group.less +88 -0
  68. data/vendor/twitter/bootstrap/less/media.less +8 -7
  69. data/vendor/twitter/bootstrap/less/mixins.less +487 -466
  70. data/vendor/twitter/bootstrap/less/modals.less +98 -52
  71. data/vendor/twitter/bootstrap/less/navbar.less +507 -383
  72. data/vendor/twitter/bootstrap/less/navs.less +169 -349
  73. data/vendor/twitter/bootstrap/less/normalize.less +396 -0
  74. data/vendor/twitter/bootstrap/less/pager.less +45 -33
  75. data/vendor/twitter/bootstrap/less/pagination.less +65 -105
  76. data/vendor/twitter/bootstrap/less/panels.less +148 -0
  77. data/vendor/twitter/bootstrap/less/popovers.less +51 -51
  78. data/vendor/twitter/bootstrap/less/print.less +100 -0
  79. data/vendor/twitter/bootstrap/less/progress-bars.less +28 -55
  80. data/vendor/twitter/bootstrap/less/responsive-utilities.less +195 -34
  81. data/vendor/twitter/bootstrap/less/scaffolding.less +101 -24
  82. data/vendor/twitter/bootstrap/less/tables.less +170 -178
  83. data/vendor/twitter/bootstrap/less/theme.less +232 -0
  84. data/vendor/twitter/bootstrap/less/thumbnails.less +11 -33
  85. data/vendor/twitter/bootstrap/less/tooltip.less +45 -20
  86. data/vendor/twitter/bootstrap/less/type.less +100 -109
  87. data/vendor/twitter/bootstrap/less/utilities.less +19 -7
  88. data/vendor/twitter/bootstrap/less/variables.less +498 -179
  89. data/vendor/twitter/bootstrap/less/wells.less +7 -7
  90. data/vendor/twitter/bootstrap/sass/_alerts.scss +46 -58
  91. data/vendor/twitter/bootstrap/sass/_badges.scss +51 -0
  92. data/vendor/twitter/bootstrap/sass/_breadcrumbs.scss +8 -9
  93. data/vendor/twitter/bootstrap/sass/_button-groups.scss +173 -154
  94. data/vendor/twitter/bootstrap/sass/_buttons.scss +97 -165
  95. data/vendor/twitter/bootstrap/sass/_carousel.scss +116 -65
  96. data/vendor/twitter/bootstrap/sass/_close.scss +9 -8
  97. data/vendor/twitter/bootstrap/sass/_code.scss +16 -21
  98. data/vendor/twitter/bootstrap/sass/_component-animations.scss +10 -3
  99. data/vendor/twitter/bootstrap/sass/_dropdowns.scss +94 -148
  100. data/vendor/twitter/bootstrap/sass/_forms.scss +220 -559
  101. data/vendor/twitter/bootstrap/sass/_glyphicons.scss +232 -0
  102. data/vendor/twitter/bootstrap/sass/_grid.scss +336 -11
  103. data/vendor/twitter/bootstrap/sass/_input-groups.scss +127 -0
  104. data/vendor/twitter/bootstrap/sass/_jumbotron.scss +40 -0
  105. data/vendor/twitter/bootstrap/sass/_labels.scss +58 -0
  106. data/vendor/twitter/bootstrap/sass/_list-group.scss +88 -0
  107. data/vendor/twitter/bootstrap/sass/_media.scss +8 -7
  108. data/vendor/twitter/bootstrap/sass/_mixins.scss +465 -433
  109. data/vendor/twitter/bootstrap/sass/_modals.scss +102 -52
  110. data/vendor/twitter/bootstrap/sass/_navbar.scss +511 -383
  111. data/vendor/twitter/bootstrap/sass/_navs.scss +169 -349
  112. data/vendor/twitter/bootstrap/sass/_normalize.scss +396 -0
  113. data/vendor/twitter/bootstrap/sass/_pager.scss +45 -33
  114. data/vendor/twitter/bootstrap/sass/_pagination.scss +65 -105
  115. data/vendor/twitter/bootstrap/sass/_panels.scss +148 -0
  116. data/vendor/twitter/bootstrap/sass/_popovers.scss +51 -51
  117. data/vendor/twitter/bootstrap/sass/_print.scss +100 -0
  118. data/vendor/twitter/bootstrap/sass/_progress-bars.scss +28 -55
  119. data/vendor/twitter/bootstrap/sass/_responsive-utilities.scss +180 -45
  120. data/vendor/twitter/bootstrap/sass/_scaffolding.scss +101 -24
  121. data/vendor/twitter/bootstrap/sass/_tables.scss +169 -168
  122. data/vendor/twitter/bootstrap/sass/_theme.scss +232 -0
  123. data/vendor/twitter/bootstrap/sass/_thumbnails.scss +11 -33
  124. data/vendor/twitter/bootstrap/sass/_tooltip.scss +45 -20
  125. data/vendor/twitter/bootstrap/sass/_type.scss +101 -110
  126. data/vendor/twitter/bootstrap/sass/_utilities.scss +19 -22
  127. data/vendor/twitter/bootstrap/sass/_variables.scss +498 -179
  128. data/vendor/twitter/bootstrap/sass/_wells.scss +7 -7
  129. data/vendor/twitter/bootstrap/sass/bootstrap.scss +29 -33
  130. metadata +47 -56
  131. data/lib/bootstrap/generators/engine.rb +0 -14
  132. data/lib/generators/bootstrap/install/templates/assets/stylesheets/bootstrap-variables.css.scss +0 -301
  133. data/lib/generators/bootstrap/install/templates/assets/stylesheets/hero.css +0 -18
  134. data/lib/generators/bootstrap/install/templates/assets/stylesheets/hero.css.less +0 -19
  135. data/lib/generators/bootstrap/install/templates/assets/stylesheets/hero.css.scss +0 -19
  136. data/lib/generators/bootstrap/install/templates/config/initializers/simple_form.rb +0 -176
  137. data/lib/generators/bootstrap/install/templates/config/locales/simple_form.en.yml +0 -24
  138. data/lib/generators/bootstrap/install/templates/form_builders/simple_form/_form.html.erb +0 -13
  139. data/lib/generators/bootstrap/install/templates/form_builders/simple_form/_form.html.haml +0 -10
  140. data/lib/generators/bootstrap/install/templates/layouts/fluid.html.erb +0 -80
  141. data/lib/generators/bootstrap/install/templates/layouts/fluid.html.haml +0 -94
  142. data/lib/generators/bootstrap/install/templates/layouts/hero.html.erb +0 -53
  143. data/vendor/assets/images/glyphicons-halflings-white.png +0 -0
  144. data/vendor/assets/images/glyphicons-halflings.png +0 -0
  145. data/vendor/assets/javascripts/bootstrap-affix.js +0 -117
  146. data/vendor/assets/javascripts/bootstrap-button.js +0 -105
  147. data/vendor/assets/javascripts/bootstrap-carousel.js +0 -207
  148. data/vendor/assets/javascripts/bootstrap-collapse.js +0 -167
  149. data/vendor/assets/javascripts/bootstrap-dropdown.js +0 -169
  150. data/vendor/assets/javascripts/bootstrap-modal.js +0 -247
  151. data/vendor/assets/javascripts/bootstrap-popover.js +0 -114
  152. data/vendor/assets/javascripts/bootstrap-scrollspy.js +0 -162
  153. data/vendor/assets/javascripts/bootstrap-tab.js +0 -144
  154. data/vendor/assets/javascripts/bootstrap-tooltip.js +0 -361
  155. data/vendor/assets/javascripts/bootstrap-transition.js +0 -60
  156. data/vendor/assets/javascripts/bootstrap-typeahead.js +0 -335
  157. data/vendor/assets/stylesheets/bootstrap-responsive.css +0 -1109
  158. data/vendor/twitter/bootstrap/less/accordion.less +0 -34
  159. data/vendor/twitter/bootstrap/less/hero-unit.less +0 -25
  160. data/vendor/twitter/bootstrap/less/labels-badges.less +0 -84
  161. data/vendor/twitter/bootstrap/less/layouts.less +0 -16
  162. data/vendor/twitter/bootstrap/less/reset.less +0 -216
  163. data/vendor/twitter/bootstrap/less/responsive-1200px-min.less +0 -28
  164. data/vendor/twitter/bootstrap/less/responsive-767px-max.less +0 -193
  165. data/vendor/twitter/bootstrap/less/responsive-768px-979px.less +0 -19
  166. data/vendor/twitter/bootstrap/less/responsive-navbar.less +0 -189
  167. data/vendor/twitter/bootstrap/less/responsive.less +0 -48
  168. data/vendor/twitter/bootstrap/less/sprites.less +0 -197
  169. data/vendor/twitter/bootstrap/sass/_accordion.scss +0 -34
  170. data/vendor/twitter/bootstrap/sass/_hero-unit.scss +0 -25
  171. data/vendor/twitter/bootstrap/sass/_labels-badges.scss +0 -83
  172. data/vendor/twitter/bootstrap/sass/_layouts.scss +0 -16
  173. data/vendor/twitter/bootstrap/sass/_reset.scss +0 -216
  174. data/vendor/twitter/bootstrap/sass/_responsive-1200px-min.scss +0 -28
  175. data/vendor/twitter/bootstrap/sass/_responsive-767px-max.scss +0 -193
  176. data/vendor/twitter/bootstrap/sass/_responsive-768px-979px.scss +0 -19
  177. data/vendor/twitter/bootstrap/sass/_responsive-navbar.scss +0 -189
  178. data/vendor/twitter/bootstrap/sass/_sprites.scss +0 -197
  179. data/vendor/twitter/bootstrap/sass/responsive.scss +0 -48
@@ -1,16 +1,10 @@
1
1
  /*
2
2
  *= require bootstrap
3
3
  *= require_self
4
- *= require bootstrap-responsive
5
4
  */
6
5
 
7
6
  body {
8
7
  padding-top: 60px;
9
- padding-bottom: 40px;
10
- }
11
-
12
- .sidebar-nav {
13
- padding: 9px 0;
14
8
  }
15
9
 
16
10
  .page-header a.btn {
@@ -20,3 +14,9 @@ body {
20
14
  .page-header a.btn + a.btn {
21
15
  margin-right: 8px;
22
16
  }
17
+
18
+ input[type="radio"], input[type="checkbox"] {
19
+ width: initial;
20
+ height: initial;
21
+ margin-top: 7px;
22
+ }
@@ -1,17 +1,11 @@
1
1
  @import "bootstrap";
2
2
 
3
3
  body {
4
- padding-top: @navbarHeight + 20px;
5
- padding-bottom: 40px;
4
+ padding-top: @navbar-height + 10px;
6
5
  }
7
6
 
8
- @import "responsive";
9
7
  @import "bootstrap-variables";
10
8
 
11
- .sidebar-nav {
12
- padding: 9px 0;
13
- }
14
-
15
9
  .page-header {
16
10
  a.btn {
17
11
  float: right;
@@ -21,3 +15,9 @@ body {
21
15
  margin-right: 8px;
22
16
  }
23
17
  }
18
+
19
+ input[type="radio"], input[type="checkbox"] {
20
+ width: initial;
21
+ height: initial;
22
+ margin-top: 7px;
23
+ }
@@ -2,14 +2,7 @@
2
2
  @import "bootstrap.scss";
3
3
 
4
4
  body {
5
- padding-top: $navbarHeight + 20px;
6
- padding-bottom: 40px;
7
- }
8
-
9
- @import "responsive";
10
-
11
- .sidebar-nav {
12
- padding: 9px 0;
5
+ padding-top: $navbar-height + 10px;
13
6
  }
14
7
 
15
8
  .page-header {
@@ -21,3 +14,9 @@ body {
21
14
  margin-right: 8px;
22
15
  }
23
16
  }
17
+
18
+ input[type="radio"], input[type="checkbox"] {
19
+ width: initial;
20
+ height: initial;
21
+ margin-top: 7px;
22
+ }
@@ -1,8 +1,8 @@
1
1
  <%%= form_for(@<%= singular_table_name %>, :html => { :class => "form-horizontal" }) do |f| %>
2
2
  <%% if @<%= singular_table_name %>.errors.any? %>
3
- <div class="alert alert-error">
4
- <a class="close" data-dismiss="alert" href="#">×</a>
5
- <h4 class="alert-heading"><%%= pluralize(@<%= singular_table_name %>.errors.count, "error") %> prohibited this <%= singular_table_name %> from being saved:</h4>
3
+ <div class="alert alert-danger alert-dismissable">
4
+ <button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
5
+ <h4><%%= pluralize(@<%= singular_table_name %>.errors.count, "error") %> prohibited this <%= singular_table_name %> from being saved:</h4>
6
6
 
7
7
  <ul>
8
8
  <%% @<%= singular_table_name %>.errors.full_messages.each do |msg| %>
@@ -13,14 +13,16 @@
13
13
  <%% end %>
14
14
 
15
15
  <% attributes.each do |attribute| -%>
16
- <div class="control-group">
17
- <%%= f.label :<%= attribute.name %>, :class => "control-label" %>
18
- <div class="controls">
19
- <%%= f.<%= attribute.field_type %> :<%= attribute.name %>, :class => "input-xxlarge" %>
16
+ <div class="form-group">
17
+ <%%= f.label :<%= attribute.name %>, :class => "col-lg-2 control-label" %>
18
+ <div class="col-lg-10">
19
+ <%%= f.<%= attribute.field_type %> :<%= attribute.name %>, :class => "form-control" %>
20
20
  </div>
21
21
  </div>
22
22
  <% end -%>
23
- <div class="form-actions">
24
- <%%= f.submit :class => "btn btn-primary" %>
23
+ <div class="form-group">
24
+ <div class="col-lg-offset-2 col-lg-10">
25
+ <%%= f.submit :class => "btn btn-primary" %>
26
+ </div>
25
27
  </div>
26
28
  <%% end %>
@@ -1,7 +1,7 @@
1
1
  = form_for @<%= singular_table_name %>, :html => { :class => "form-horizontal" } do |f|
2
2
  -if @<%= singular_table_name %>.errors.any?
3
- .alert.alert-error
4
- %a.close{:href => "#", :"data-dismiss" => "alert"} ×
3
+ .alert.alert-danger.alert-dismissable
4
+ %button.close{"aria-hidden" => "true", "data-dismiss" => "alert", :type => "button"} &times;
5
5
  %h4= "#{pluralize(@<%= singular_table_name %>.errors.count, "error")} prohibited this <%= singular_table_name %> from being saved:"
6
6
 
7
7
  %ul
@@ -9,10 +9,11 @@
9
9
  %li= msg
10
10
 
11
11
  <% for attribute in attributes -%>
12
- .control-group
13
- = f.label :<%= attribute.name %>, :class => 'control-label'
14
- .controls
15
- = f.<%= attribute.field_type %> :<%= attribute.name %>, :class => 'input-xxlarge'
12
+ .form-group
13
+ = f.label :<%= attribute.name %>, :class => 'col-lg-2 control-label'
14
+ .col-lg-10
15
+ = f.<%= attribute.field_type %> :<%= attribute.name %>, :class => 'form-control'
16
16
  <% end -%>
17
- .actions
18
- = f.submit :class => 'btn btn-primary'
17
+ .form-group
18
+ .col-lg-offset-2 col-lg-10
19
+ = f.submit :class => 'btn btn-primary'
@@ -0,0 +1,50 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <title>Starter Template for Bootstrap</title>
6
+ <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
7
+ <meta name="description" content="">
8
+ <meta name="author" content="">
9
+
10
+ <!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
11
+ <!--[if lt IE 9]>
12
+ <%%= javascript_include_tag "bootstrap-ie" %>
13
+ <![endif]-->
14
+
15
+ <%%= stylesheet_link_tag "application", media: "all", "data-turbolinks-track" => true %>
16
+ <%%= javascript_include_tag "application", "data-turbolinks-track" => true %>
17
+ <%%= csrf_meta_tags %>
18
+ </head>
19
+ <body>
20
+ <div class="navbar navbar-inverse navbar-fixed-top">
21
+ <div class="container">
22
+ <div class="navbar-header">
23
+ <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
24
+ <span class="icon-bar"></span>
25
+ <span class="icon-bar"></span>
26
+ <span class="icon-bar"></span>
27
+ </button>
28
+ <%%= link_to "Project name", "#", :class => "navbar-brand" %>
29
+ </div>
30
+ <div class="collapse navbar-collapse">
31
+ <ul class="nav navbar-nav">
32
+ <li class="active"><a href="#">Home</a></li>
33
+ <li><a href="#about">About</a></li>
34
+ <li><a href="#contact">Contact</a></li>
35
+ </ul>
36
+ </div>
37
+ </div>
38
+ </div>
39
+ <div class="container">
40
+ <%% flash.each do |name, msg| %>
41
+ <%%= content_tag :div, :class => "alert alert-#{ name == :error ? "danger" : "success" } alert-dismissable" do %>
42
+ <button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
43
+ <%%= msg %>
44
+ <%% end %>
45
+ <%% end %>
46
+
47
+ <%%= yield %>
48
+ </div>
49
+ </body>
50
+ </html>
@@ -1,10 +1,10 @@
1
1
  <div class="page-header">
2
- <%%= link_to <%= index_helper %>_path, :class => 'btn' do %>
3
- <i class="icon-list-alt"></i>
2
+ <%%= link_to <%= index_helper %>_path, :class => 'btn btn-default' do %>
3
+ <span class="glyphicon glyphicon-list-alt"></span>
4
4
  Back
5
5
  <%% end %>
6
6
  <%%= link_to @<%= singular_table_name %>, :class => 'btn btn-primary' do %>
7
- <i class="icon-info-sign icon-white"></i>
7
+ <span class="glyphicon glyphicon-info-sign"></span>
8
8
  Show
9
9
  <%% end %>
10
10
  <h1>Editing <%= singular_table_name %></h1>
@@ -1,33 +1,33 @@
1
1
  <div class="page-header">
2
2
  <%%= link_to new_<%= singular_table_name %>_path, :class => 'btn btn-primary' do %>
3
- <i class="icon-plus icon-white"></i>
3
+ <span class="glyphicon glyphicon-plus"></span>
4
4
  New <%= human_name %>
5
5
  <%% end %>
6
6
  <h1>Listing <%= plural_table_name %></h1>
7
7
  </div>
8
8
 
9
- <table class="table table-bordered table-striped">
10
- <thead>
11
- <tr>
12
- <% attributes.each do |attribute| -%>
13
- <th><%= attribute.human_name %></th>
14
- <% end -%>
15
- <th></th>
16
- <th></th>
17
- <th></th>
18
- </tr>
19
- </thead>
9
+ <div class="table-responsive">
10
+ <table class="table table-striped table-bordered table-hover">
11
+ <thead>
12
+ <tr>
13
+ <% attributes.each do |attribute| -%>
14
+ <th><%= attribute.human_name %></th>
15
+ <% end -%>
16
+ <th></th>
17
+ <th></th>
18
+ <th></th>
19
+ </tr>
20
+ </thead>
20
21
 
21
- <tbody>
22
- <%% @<%= plural_table_name %>.each do |<%= singular_table_name %>| %>
23
- <tr>
24
- <% attributes.each do |attribute| -%>
25
- <td><%%= <%= singular_table_name %>.<%= attribute.name %> %></td>
26
- <% end -%>
27
- <td><%%= link_to 'Show', <%= singular_table_name %> %></td>
28
- <td><%%= link_to 'Edit', edit_<%= singular_table_name %>_path(<%= singular_table_name %>) %></td>
29
- <td><%%= link_to 'Destroy', <%= singular_table_name %>, data: { confirm: 'Are you sure?' }, method: :delete %></td>
30
- </tr>
31
- <%% end %>
32
- </tbody>
33
- </table>
22
+ <tbody>
23
+ <%%= content_tag_for(:tr, @<%= plural_table_name %>) do |<%= singular_table_name %>| %>
24
+ <% attributes.each do |attribute| -%>
25
+ <td><%%= <%= singular_table_name %>.<%= attribute.name %> %></td>
26
+ <% end -%>
27
+ <td><%%= link_to 'Show', <%= singular_table_name %> %></td>
28
+ <td><%%= link_to 'Edit', edit_<%= singular_table_name %>_path(<%= singular_table_name %>) %></td>
29
+ <td><%%= link_to 'Destroy', <%= singular_table_name %>, method: :delete, data: { confirm: 'Are you sure?' } %></td>
30
+ <%% end %>
31
+ </tbody>
32
+ </table>
33
+ </div>
@@ -1,6 +1,6 @@
1
1
  <div class="page-header">
2
- <%%= link_to <%= index_helper %>_path, :class => 'btn' do %>
3
- <i class="icon-list-alt"></i>
2
+ <%%= link_to <%= index_helper %>_path, :class => 'btn btn-default' do %>
3
+ <span class="glyphicon glyphicon-list-alt"></span>
4
4
  Back
5
5
  <%% end %>
6
6
  <h1>New <%= singular_table_name %></h1>
@@ -1,16 +1,16 @@
1
1
  <div class="page-header">
2
- <%%= link_to <%= index_helper %>_path, :class => 'btn' do %>
3
- <i class="icon-list-alt"></i>
2
+ <%%= link_to <%= index_helper %>_path, :class => 'btn btn-default' do %>
3
+ <span class="glyphicon glyphicon-list-alt"></span>
4
4
  Back
5
5
  <%% end %>
6
6
  <%%= link_to edit_<%= singular_table_name %>_path(@<%= singular_table_name %>), :class => 'btn btn-primary' do %>
7
- <i class="icon-pencil icon-white"></i>
7
+ <span class="glyphicon glyphicon-pencil"></span>
8
8
  Edit
9
9
  <%% end %>
10
- <h1>Listing <%= plural_table_name %></h1>
10
+ <h1>Show <%= singular_table_name %></h1>
11
11
  </div>
12
12
 
13
- <dl>
13
+ <dl class="dl-horizontal">
14
14
  <%- attributes.each do |attribute| -%>
15
15
  <dt><%= attribute.human_name %>:</dt>
16
16
  <dd><%%= @<%= singular_table_name %>.<%= attribute.name %> %></dd>
@@ -1,9 +1,9 @@
1
1
  .page-header
2
- = link_to <%= index_helper %>_path, :class => 'btn' do
3
- %i.icon-list-alt
2
+ = link_to <%= index_helper %>_path, :class => 'btn btn-default' do
3
+ %span.glyphicon.glyphicon-list-alt
4
4
  Back
5
5
  = link_to @<%= singular_table_name %>, :class => 'btn btn-primary' do
6
- %i.icon-info-sign.icon-white
6
+ %span.glyphicon.glyphicon-info-sign
7
7
  Show
8
8
  %h1 Editing <%= singular_table_name %>
9
9
 
@@ -1,25 +1,26 @@
1
1
  .page-header
2
2
  = link_to new_<%= singular_table_name %>_path, :class => 'btn btn-primary' do
3
- %i.icon-plus.icon-white
3
+ %span.glyphicon.glyphicon-plus
4
4
  New <%= human_name %>
5
5
  %h1 Listing <%= plural_table_name %>
6
6
 
7
- %table.table.table-bordered.table-striped
8
- %thead
9
- %tr
10
- <% for attribute in attributes -%>
11
- %th <%= attribute.human_name %>
12
- <% end -%>
13
- %th
14
- %th
15
- %th
16
-
17
- %tbody
18
- - @<%= plural_table_name %>.each do |<%= singular_table_name %>|
7
+ .table-responsive
8
+ %table.table.table-striped.table-bordered.table-hover
9
+ %thead
19
10
  %tr
20
- <% for attribute in attributes -%>
21
- %td= <%= singular_table_name %>.<%= attribute.name %>
22
- <% end -%>
23
- %td= link_to 'Show', <%= singular_table_name %>
24
- %td= link_to 'Edit', edit_<%= singular_table_name %>_path(<%= singular_table_name %>)
25
- %td= link_to 'Destroy', <%= singular_table_name %>, :data => { confirm: 'Are you sure?' }, :method => :delete
11
+ <% for attribute in attributes -%>
12
+ %th <%= attribute.human_name %>
13
+ <% end -%>
14
+ %th
15
+ %th
16
+ %th
17
+
18
+ %tbody
19
+ - @<%= plural_table_name %>.each do |<%= singular_table_name %>|
20
+ %tr
21
+ <% for attribute in attributes -%>
22
+ %td= <%= singular_table_name %>.<%= attribute.name %>
23
+ <% end -%>
24
+ %td= link_to 'Show', <%= singular_table_name %>
25
+ %td= link_to 'Edit', edit_<%= singular_table_name %>_path(<%= singular_table_name %>)
26
+ %td= link_to 'Destroy', <%= singular_table_name %>, :data => { confirm: 'Are you sure?' }, :method => :delete
@@ -1,6 +1,6 @@
1
1
  .page-header
2
- = link_to <%= index_helper %>_path, :class => 'btn' do
3
- %i.icon-list-alt
2
+ = link_to <%= index_helper %>_path, :class => 'btn btn-default' do
3
+ %span.glyphicon.glyphicon-list-alt
4
4
  Back
5
5
  %h1 New <%= singular_table_name %>
6
6
 
@@ -1,13 +1,13 @@
1
1
  .page-header
2
- = link_to <%= index_helper %>_path, :class => 'btn' do
3
- %i.icon-list-alt
2
+ = link_to <%= index_helper %>_path, :class => 'btn btn-default' do
3
+ %span.glyphicon.glyphicon-list-alt
4
4
  Back
5
5
  = link_to edit_<%= singular_table_name %>_path(@<%= singular_table_name %>), :class => 'btn btn-primary' do
6
- %i.icon-pencil.icon-white
6
+ %span.glyphicon.glyphicon-pencil
7
7
  Edit
8
- %h1 Listing <%= plural_table_name %>
8
+ %h1 Show <%= singular_table_name %>
9
9
 
10
- %dl
10
+ %dl.dl-horizontal
11
11
  <%- for attribute in attributes -%>
12
12
  %dt <%= attribute.human_name %>:
13
13
  %dd= @<%= singular_table_name %>.<%= attribute.name %>
@@ -2,7 +2,7 @@
2
2
 
3
3
  [![Build Status](https://travis-ci.org/decioferreira/bootstrap-generators.png?branch=master)](https://travis-ci.org/decioferreira/bootstrap-generators)
4
4
 
5
- Bootstrap-generators provides [Twitter Bootstrap](http://twitter.github.com/bootstrap/) generators for Rails 4 (supported Rails >= 3.1). Bootstrap is a toolkit from Twitter designed to kickstart development of webapps and sites.
5
+ Bootstrap-generators provides [Twitter Bootstrap](http://twitter.github.com/bootstrap/) generators for Rails 4 (supported Rails >= 3.1). Bootstrap is a toolkit from Twitter designed to kickstart development of webapps and sites. Checkout http://decioferreira.github.com/bootstrap-generators.
6
6
 
7
7
  ## Current Twitter Bootstrap version
8
8
 
@@ -18,14 +18,6 @@ Or you can install from latest build:
18
18
 
19
19
  gem 'bootstrap-generators', :git => 'git://github.com/decioferreira/bootstrap-generators.git'
20
20
 
21
- By default Bootstrap Generators requires [SimpleForm 2.0](https://github.com/plataformatec/simple_form). Add the dependency on your Gemfile:
22
-
23
- gem 'simple_form'
24
-
25
- If you don't want to use SimpleForm, just pass the `--form_builder=form_builder` option:
26
-
27
- rails generate bootstrap:install --form_builder=form_builder
28
-
29
21
  Run bundle install:
30
22
 
31
23
  bundle install
@@ -40,7 +32,7 @@ Once you've done that, any time you generate a controller or scaffold, you'll ge
40
32
 
41
33
  ### Give it a try
42
34
 
43
- rails generate scaffold post title:string body:text published:boolean
35
+ rails generate scaffold post title body:text published:boolean
44
36
 
45
37
  You can easily customize colors, grid system, fonts, and much more by editing `bootstrap-variables.[less|scss]` on your application assets folder.
46
38
 
@@ -51,10 +43,6 @@ To print the options and usage run the command `rails generate bootstrap:install
51
43
  rails generate bootstrap:install [options]
52
44
 
53
45
  Options:
54
- [--layout=LAYOUT] # Bootstrap layout templates (hero or fluid)
55
- # Default: hero
56
- [--form-builder=FORM_BUILDER] # Select your form builder (simple_form or form_builder)
57
- # Default: simple_form
58
46
  -e, [--template-engine=TEMPLATE_ENGINE] # Indicates when to generate template engine
59
47
  # Default: erb
60
48
  -se, [--stylesheet-engine=STYLESHEET_ENGINE] # Indicates when to generate stylesheet engine
@@ -70,33 +58,6 @@ To print the options and usage run the command `rails generate bootstrap:install
70
58
 
71
59
  ### Options
72
60
 
73
- #### Layouts
74
-
75
- There are the two available layouts, based on Bootstrap's quick-start examples:
76
-
77
- * [Basic marketing site](http://getbootstrap.com/<%= bootstrap_version %>/examples/hero.html) (default)
78
- * [Fluid layout](http://getbootstrap.com/<%= bootstrap_version %>/examples/fluid.html)
79
-
80
- To select one of these layouts just pass the option `--layout=LAYOUT` to the install generator.
81
-
82
- #### Form builders
83
-
84
- * SimpleForm
85
-
86
- By default Bootstrap Generators requires SimpleForm 2.0. Add the dependency on your Gemfile:
87
-
88
- gem 'simple_form'
89
-
90
- And then run:
91
-
92
- rails generate bootstrap:install --form_builder=simple_form
93
-
94
- * Default Rails form builder
95
-
96
- If you don't want to use SimpleForm, just pass the `--form_builder=form_builder` option:
97
-
98
- rails generate bootstrap:install --form_builder=form_builder
99
-
100
61
  #### Template engines
101
62
 
102
63
  Supported template engines:
@@ -104,8 +65,6 @@ Supported template engines:
104
65
  * ERB
105
66
  * Haml
106
67
 
107
- ##### Haml
108
-
109
68
  Add the dependency on your Gemfile:
110
69
 
111
70
  gem 'haml-rails'
@@ -122,8 +81,6 @@ Supported stylesheet engines:
122
81
  * SCSS
123
82
  * LESS
124
83
 
125
- ##### SCSS
126
-
127
84
  Make sure you have `sass-rails` dependency on your Gemfile:
128
85
 
129
86
  gem 'sass-rails'
@@ -134,10 +91,11 @@ And then run:
134
91
 
135
92
  Now you can customize the look and feel of Bootstrap.
136
93
 
137
- ##### LESS
94
+ * LESS
138
95
 
139
96
  Add the dependency on your Gemfile:
140
97
 
98
+ gem 'therubyracer', platforms: :ruby
141
99
  gem 'less-rails'
142
100
 
143
101
  And then run:
@@ -152,7 +110,7 @@ Now you can customize the look and feel of Bootstrap.
152
110
 
153
111
  ### Customize and extend Bootstrap
154
112
 
155
- In Rails 3.0 and above, generators don’t just look in the source root for templates, they also search for templates in other paths. And one of them is lib/templates.
113
+ If you select LESS or SCSS as your stylesheet engine, you will get an `app/assets/stylesheets/bootstrap-variables.[less|scss]` file with all of the default variables of Bootstrap. This way you can customize the look and feel of Bootstrap without having to download any extra file.
156
114
 
157
115
  ### Javascript
158
116
 
@@ -174,6 +132,5 @@ Since Bootstrap Generators installs its templates under lib/templates, you can g
174
132
 
175
133
  * [Twitter Bootstrap](http://twitter.github.com/bootstrap)
176
134
  * [Twitter Bootstrap - Sass Conversion](https://github.com/jlong/sass-twitter-bootstrap)
177
- * [SimpleForm](https://github.com/plataformatec/simple_form)
178
135
 
179
136
  [customize]: #customize