twitter-bootstrap-rails 2.0.2 → 2.0.3
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.
- data/README.md +16 -25
- data/lib/generators/bootstrap/install/install_generator.rb +36 -12
- data/lib/generators/bootstrap/install/templates/application.css +0 -1
- data/lib/generators/bootstrap/install/templates/bootstrap.coffee +1 -10
- data/lib/generators/bootstrap/install/templates/bootstrap_and_overrides.less +17 -0
- data/lib/generators/bootstrap/layout/templates/layout.html.erb +17 -16
- data/lib/generators/bootstrap/layout/templates/layout.html.haml +4 -4
- data/lib/generators/bootstrap/layout/templates/layout.html.slim +4 -4
- data/lib/generators/bootstrap/themed/templates/_form.html.erb +19 -12
- data/lib/generators/bootstrap/themed/templates/edit.html.erb +1 -4
- data/lib/generators/bootstrap/themed/templates/index.html.erb +24 -28
- data/lib/generators/bootstrap/themed/templates/new.html.erb +1 -3
- data/lib/generators/bootstrap/themed/templates/show.html.erb +11 -7
- data/lib/twitter/bootstrap/rails/version.rb +1 -1
- data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-alert.js +8 -5
- data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-button.js +3 -3
- data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-carousel.js +5 -2
- data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-collapse.js +2 -2
- data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-dropdown.js +2 -2
- data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-modal.js +6 -5
- data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-popover.js +2 -2
- data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-scrollspy.js +2 -2
- data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-tab.js +2 -2
- data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-tooltip.js +2 -2
- data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-transition.js +3 -3
- data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-typeahead.js +2 -2
- data/vendor/toolkit/twitter/bootstrap/bootstrap.less +1 -1
- data/vendor/toolkit/twitter/bootstrap/breadcrumbs.less +1 -1
- data/vendor/toolkit/twitter/bootstrap/button-groups.less +4 -2
- data/vendor/toolkit/twitter/bootstrap/buttons.less +25 -7
- data/vendor/toolkit/twitter/bootstrap/code.less +13 -0
- data/vendor/toolkit/twitter/bootstrap/dropdowns.less +1 -2
- data/vendor/toolkit/twitter/bootstrap/forms.less +51 -44
- data/vendor/toolkit/twitter/bootstrap/labels.less +23 -7
- data/vendor/toolkit/twitter/bootstrap/mixins.less +79 -26
- data/vendor/toolkit/twitter/bootstrap/modals.less +11 -0
- data/vendor/toolkit/twitter/bootstrap/navbar.less +13 -6
- data/vendor/toolkit/twitter/bootstrap/navs.less +21 -12
- data/vendor/toolkit/twitter/bootstrap/reset.less +1 -1
- data/vendor/toolkit/twitter/bootstrap/responsive.less +10 -6
- data/vendor/toolkit/twitter/bootstrap/sprites.less +9 -7
- data/vendor/toolkit/twitter/bootstrap/tables.less +14 -3
- data/vendor/toolkit/twitter/bootstrap/thumbnails.less +2 -2
- data/vendor/toolkit/twitter/bootstrap/type.less +3 -2
- data/vendor/toolkit/twitter/bootstrap/variables.less +15 -7
- data/vendor/toolkit/twitter/bootstrap_base.less +2 -0
- metadata +13 -14
- data/lib/generators/bootstrap/install/templates/bootstrap.less +0 -6
- data/vendor/assets/stylesheets/twitter/bootstrap.css.less +0 -1
- data/vendor/toolkit/twitter/bootstrap.less +0 -1
data/README.md
CHANGED
@@ -10,7 +10,7 @@ twitter-bootstrap-rails project integrates Bootstrap CSS toolkit for Rails 3.1 A
|
|
10
10
|
|
11
11
|
Include Bootstrap in Gemfile;
|
12
12
|
|
13
|
-
gem
|
13
|
+
gem "twitter-bootstrap-rails"
|
14
14
|
|
15
15
|
or you can install from latest build;
|
16
16
|
|
@@ -74,24 +74,20 @@ Bootstrap was built with Preboot, an open-source pack of mixins and variables to
|
|
74
74
|
|
75
75
|
## Using stylesheets with Less
|
76
76
|
|
77
|
-
You have to require Bootstrap LESS (
|
77
|
+
You have to require Bootstrap LESS (bootstrap_and_overrides.css.less) in your application.css
|
78
78
|
|
79
79
|
/*
|
80
|
-
*= require
|
81
|
-
|
80
|
+
*= require bootstrap_and_overrides
|
81
|
+
*/
|
82
82
|
|
83
83
|
/* Your stylesheets goes here... */
|
84
84
|
|
85
85
|
|
86
|
-
|
87
|
-
|
86
|
+
If you'd like to alter Bootstrap's own variables, or define your LESS
|
87
|
+
styles inheriting Bootstrap's mixins, you can do so inside bootstrap_and_overrides.css.less:
|
88
88
|
|
89
|
-
@
|
89
|
+
@linkColor: #ff0000;
|
90
90
|
|
91
|
-
// import responsive layout
|
92
|
-
@import "twitter/bootstrap/responsive";
|
93
|
-
|
94
|
-
// Your custom stylesheets goes here (override Less here)
|
95
91
|
|
96
92
|
|
97
93
|
## Using Javascripts
|
@@ -112,17 +108,9 @@ twitter-bootstrap-rails generates a "bootstrap.js.coffee" file for you
|
|
112
108
|
to /app/assets/javascripts/ folder.
|
113
109
|
|
114
110
|
jQuery ->
|
115
|
-
$("
|
116
|
-
$(".tabs").button()
|
117
|
-
$(".carousel").carousel()
|
118
|
-
$(".collapse").collapse()
|
119
|
-
$(".dropdown-toggle").dropdown()
|
120
|
-
$(".modal").modal()
|
121
|
-
$("a[rel]").popover()
|
122
|
-
$(".navbar").scrollspy()
|
123
|
-
$(".tab").tab "show"
|
111
|
+
$("a[rel=popover]").popover()
|
124
112
|
$(".tooltip").tooltip()
|
125
|
-
$("
|
113
|
+
$("a[rel=tooltip]").tooltip()
|
126
114
|
|
127
115
|
|
128
116
|
## Using Static CSS, JS (w/o Less)
|
@@ -157,6 +145,8 @@ twitter-bootstrap-rails has seperate branch (w/o Less) that just serves latest s
|
|
157
145
|
<li>Added Haml and Slim support</li>
|
158
146
|
<li>Added Responsive layout support</li>
|
159
147
|
<li>Fixes and release 2.0.0</li>
|
148
|
+
<li>Updated to v2.0.1, versioned v2.0.1.0</li>
|
149
|
+
<li>Released gem v.2.0.3</li>
|
160
150
|
</ul>
|
161
151
|
|
162
152
|
|
@@ -182,14 +172,15 @@ twitter-bootstrap-rails has seperate branch (w/o Less) that just serves latest s
|
|
182
172
|
<li>Markup Helpers (alert, tabs, pagination, breadcrumbs etc.)</li>
|
183
173
|
</ul>
|
184
174
|
|
185
|
-
|
186
175
|
## Credits
|
187
176
|
Seyhun Akyürek - seyhunak [at] gmail com
|
188
177
|
|
189
|
-
[
|
190
|
-
|
191
|
-
[Follow me on Google+](http://plus.ly/seyhunak "Google+")
|
178
|
+
[Visit My Blog](http://www.seyhunakyurek.com/ "Visit My Blog")
|
192
179
|
|
180
|
+
[Add Me On Twitter](http://twitter.com/seyhunak "Add Me On Twitter")
|
181
|
+
[Add Me On Linkedin](http://tr.linkedin.com/in/seyhunak "Add Me On Linkedin")
|
182
|
+
[Add Me On Facebook](https://www.facebook.com/seyhunak "Add Me On Facebook")
|
183
|
+
[Add Me On Google+](http://plus.ly/seyhunak "Add Me On Google+")
|
193
184
|
|
194
185
|
## Thanks
|
195
186
|
Twitter Bootstrap and all twitter-bootstrap-rails contributors
|
@@ -3,25 +3,49 @@ require 'rails/generators'
|
|
3
3
|
module Bootstrap
|
4
4
|
module Generators
|
5
5
|
class InstallGenerator < ::Rails::Generators::Base
|
6
|
+
|
6
7
|
source_root File.expand_path("../templates", __FILE__)
|
7
8
|
desc "This generator installs Twitter Bootstrap to Asset Pipeline"
|
8
9
|
|
9
10
|
def add_assets
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
11
|
+
|
12
|
+
if File.exist?('app/assets/javascripts/application.js')
|
13
|
+
insert_into_file "app/assets/javascripts/application.js", "//= require twitter/bootstrap\n", :after => "jquery_ujs\n"
|
14
|
+
else
|
15
|
+
copy_file "application.js", "app/assets/javascripts/application.js"
|
16
|
+
end
|
17
|
+
|
18
|
+
if File.exist?('app/assets/stylesheets/application.css')
|
19
|
+
# Add our own require:
|
20
|
+
content = File.read("app/assets/stylesheets/application.css")
|
21
|
+
if content.match(/require_tree\s+\./)
|
22
|
+
# Good enough - that'll include our bootstrap_and_overrides.css.less
|
23
|
+
else
|
24
|
+
style_require_block = " *= require bootstrap_and_overrides\n"
|
25
|
+
insert_into_file "app/assets/stylesheets/application.css", style_require_block, :after => "require_self\n"
|
26
|
+
end
|
27
|
+
else
|
28
|
+
copy_file "application.css", "app/assets/stylesheets/application.css"
|
29
|
+
end
|
30
|
+
|
31
|
+
end
|
21
32
|
|
22
33
|
def add_bootstrap
|
23
34
|
copy_file "bootstrap.coffee", "app/assets/javascripts/bootstrap.js.coffee"
|
24
|
-
copy_file "
|
35
|
+
copy_file "bootstrap_and_overrides.less", "app/assets/stylesheets/bootstrap_and_overrides.css.less"
|
36
|
+
end
|
37
|
+
|
38
|
+
def cleanup_legacy
|
39
|
+
# Remove old requires (if any) that included twitter/bootstrap directly:
|
40
|
+
gsub_file("app/assets/stylesheets/application.css", %r|\s*\*=\s*twitter/bootstrap\s*\n|, "")
|
41
|
+
gsub_file("app/assets/stylesheets/application.css", %r|\s*\*=\s*twitter/bootstrap_responsive\s*\n|, "")
|
42
|
+
if File.exist?('app/assets/stylesheets/bootstrap_override.css.less')
|
43
|
+
puts <<-EOM
|
44
|
+
Warning:
|
45
|
+
app/assets/stylesheets/bootstrap_override.css.less exists
|
46
|
+
It should be removed, as it has been superceded by app/assets/stylesheets/bootstrap_and_overrides.css.less
|
47
|
+
EOM
|
48
|
+
end
|
25
49
|
end
|
26
50
|
|
27
51
|
end
|
@@ -3,6 +3,5 @@
|
|
3
3
|
* and any sub-directories. You're free to add application-wide styles to this file and they'll appear at
|
4
4
|
* the top of the compiled file, but it's generally better to create a new file per style scope.
|
5
5
|
*= require_self
|
6
|
-
*= require twitter/bootstrap
|
7
6
|
*= require_tree .
|
8
7
|
*/
|
@@ -1,13 +1,4 @@
|
|
1
1
|
jQuery ->
|
2
|
-
$(".alert-message").alert()
|
3
|
-
$(".tabs").button()
|
4
|
-
$(".carousel").carousel()
|
5
|
-
$(".collapse").collapse()
|
6
|
-
$(".dropdown-toggle").dropdown()
|
7
|
-
$(".modal").modal()
|
8
2
|
$("a[rel=popover]").popover()
|
9
|
-
$(".navbar").scrollspy()
|
10
|
-
$(".tab").tab "show"
|
11
3
|
$(".tooltip").tooltip()
|
12
|
-
$("
|
13
|
-
$("a[rel=tooltip]").tooltip()
|
4
|
+
$("a[rel=tooltip]").tooltip()
|
@@ -0,0 +1,17 @@
|
|
1
|
+
@import "twitter/bootstrap/bootstrap";
|
2
|
+
@import "twitter/bootstrap/responsive";
|
3
|
+
|
4
|
+
// Set the correct sprite paths
|
5
|
+
@iconSpritePath: asset-path('twitter/bootstrap/glyphicons-halflings.png');
|
6
|
+
@iconWhiteSpritePath: asset-path('twitter/bootstrap/glyphicons-halflings-white.png');
|
7
|
+
|
8
|
+
// Your custom LESS stylesheets goes here
|
9
|
+
//
|
10
|
+
// Since bootstrap was imported above you have access to its mixins which
|
11
|
+
// you may use and inherit here
|
12
|
+
//
|
13
|
+
// If you'd like to override bootstrap's own variables, you can do so here as well
|
14
|
+
// See http://twitter.github.com/bootstrap/less.html for their names and documentation
|
15
|
+
//
|
16
|
+
// Example:
|
17
|
+
// @linkColor: #ff0000;
|
@@ -11,12 +11,12 @@
|
|
11
11
|
<![endif]-->
|
12
12
|
|
13
13
|
<!-- Le styles -->
|
14
|
-
<%%= stylesheet_link_tag "application", :media => "all" %>
|
15
14
|
<style>
|
16
15
|
body {
|
17
16
|
padding-top: 60px; /* 60px to make the container go all the way to the bottom of the topbar */
|
18
17
|
}
|
19
18
|
</style>
|
19
|
+
<%%= stylesheet_link_tag "application", :media => "all" %>
|
20
20
|
|
21
21
|
<!-- Le fav and touch icons -->
|
22
22
|
<link href="images/favicon.ico" rel="shortcut icon">
|
@@ -34,9 +34,9 @@
|
|
34
34
|
<div class="container">
|
35
35
|
<%- end -%>
|
36
36
|
<a class="btn btn-navbar" data-target=".nav-collapse" data-toggle="collapse">
|
37
|
-
<span class="
|
38
|
-
<span class="
|
39
|
-
<span class="
|
37
|
+
<span class="icon-bar"></span>
|
38
|
+
<span class="icon-bar"></span>
|
39
|
+
<span class="icon-bar"></span>
|
40
40
|
</a>
|
41
41
|
<a class="brand" href="#"><%= app_name %></a>
|
42
42
|
<div class="<%= container_class %> nav-collapse">
|
@@ -52,14 +52,14 @@
|
|
52
52
|
|
53
53
|
<div class="<%= container_class %>">
|
54
54
|
<%- if layout_type == "fluid" -%>
|
55
|
-
|
55
|
+
<div class="row-fluid">
|
56
56
|
<div class="span3">
|
57
57
|
<div class="well sidebar-nav">
|
58
58
|
<ul class="nav nav-list">
|
59
59
|
<li class="nav-header">Sidebar</li>
|
60
60
|
<%- (1..3).each do |i| -%>
|
61
|
-
|
62
|
-
|
61
|
+
<li><%%= link_to "Link<%= i %>", "/path<%= i %>" %></li>
|
62
|
+
<%- end -%>
|
63
63
|
</ul>
|
64
64
|
</div><!--/.well -->
|
65
65
|
</div><!--/span-->
|
@@ -68,25 +68,26 @@
|
|
68
68
|
</div>
|
69
69
|
</div><!--/row-->
|
70
70
|
<%- else -%>
|
71
|
-
|
72
|
-
|
73
|
-
|
71
|
+
<div class="content">
|
72
|
+
<div class="row">
|
73
|
+
<div class="span9">
|
74
74
|
<%%= yield %>
|
75
|
-
|
76
|
-
|
75
|
+
</div>
|
76
|
+
<div class="span1"> </div>
|
77
77
|
<div class="span3">
|
78
78
|
<div class="well sidebar-nav">
|
79
79
|
<h3>Sidebar</h3>
|
80
|
-
|
81
|
-
|
80
|
+
<ul class="nav nav-list">
|
81
|
+
<li class="nav-header">Sidebar</li>
|
82
82
|
<%- (1..3).each do |i| -%>
|
83
83
|
<li><%%= link_to "Link<%= i %>", "/path<%= i %>" %></li>
|
84
84
|
<%- end -%>
|
85
85
|
</ul>
|
86
|
+
</div>
|
86
87
|
</div>
|
87
|
-
</div>
|
88
88
|
</div>
|
89
|
-
</div
|
89
|
+
</div><!--/row-->
|
90
|
+
</div><!--/content-->
|
90
91
|
<%- end -%>
|
91
92
|
|
92
93
|
<footer>
|
@@ -8,11 +8,11 @@
|
|
8
8
|
/[if lt IE 9]
|
9
9
|
= javascript_include_tag "http://html5shim.googlecode.com/svn/trunk/html5.js"
|
10
10
|
/ Le styles
|
11
|
-
= stylesheet_link_tag "application"
|
12
11
|
:css
|
13
12
|
body {
|
14
13
|
padding-top: 60px; /* 60px to make the container go all the way to the bottom of the topbar */
|
15
14
|
}
|
15
|
+
= stylesheet_link_tag "application", :media => "all"
|
16
16
|
/ Le fav and touch icons
|
17
17
|
%link{:href => "images/favicon.ico", :rel => "shortcut icon"}/
|
18
18
|
%link{:href => "images/apple-touch-icon.png", :rel => "apple-touch-icon"}/
|
@@ -29,9 +29,9 @@
|
|
29
29
|
.container
|
30
30
|
<%- end -%>
|
31
31
|
%a.btn.btn-navbar{"data-target" => ".nav-collapse", "data-toggle" => "collapse"}
|
32
|
-
%span.
|
33
|
-
%span.
|
34
|
-
%span.
|
32
|
+
%span.icon-bar
|
33
|
+
%span.icon-bar
|
34
|
+
%span.icon-bar
|
35
35
|
%a.brand{:href => "#"}<%= app_name %>
|
36
36
|
.<%=container_class%>.nav-collapse
|
37
37
|
%ul.nav
|
@@ -9,11 +9,11 @@ html lang="en"
|
|
9
9
|
/[if lt IE 9]
|
10
10
|
= javascript_include_tag "http://html5shim.googlecode.com/svn/trunk/html5.js"
|
11
11
|
/! Le styles
|
12
|
-
= stylesheet_link_tag "application"
|
13
12
|
css:
|
14
13
|
body {
|
15
14
|
padding-top: 60px; /* 60px to make the container go all the way to the bottom of the topbar */
|
16
15
|
}
|
16
|
+
= stylesheet_link_tag "application", :media => "all"
|
17
17
|
/ Le fav and touch icons
|
18
18
|
link href="images/favicon.ico" rel="shortcut icon"
|
19
19
|
link href="images/apple-touch-icon.png" rel="apple-touch-icon"
|
@@ -30,9 +30,9 @@ html lang="en"
|
|
30
30
|
.container
|
31
31
|
<%- end -%>
|
32
32
|
a.btn.btn-navbar data-target=".nav-collapse" data-toggle="collapse"
|
33
|
-
span.
|
34
|
-
span.
|
35
|
-
span.
|
33
|
+
span.icon-bar
|
34
|
+
span.icon-bar
|
35
|
+
span.icon-bar
|
36
36
|
a.brand href="#"<%= app_name %>
|
37
37
|
.<%=container_class%>.nav-collapse
|
38
38
|
ul.nav
|
@@ -1,12 +1,19 @@
|
|
1
|
-
|
2
|
-
<
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
1
|
+
<%%= form_for @<%= model_name.underscore %>, :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>
|
11
|
+
</div>
|
12
|
+
|
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>
|
19
|
+
<%% end %>
|
@@ -1,4 +1 @@
|
|
1
|
-
<%%=
|
2
|
-
<input name="_method" type="hidden" value="put" />
|
3
|
-
<%%= render :partial => "form", :locals => {:f => f} %>
|
4
|
-
<%% end -%>
|
1
|
+
<%%= render :partial => 'form' %>
|
@@ -1,34 +1,30 @@
|
|
1
1
|
<h1><%= resource_name.titleize %>s</h1>
|
2
2
|
<table class="table table-striped">
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
<th>Actions</th>
|
13
|
-
</tr>
|
3
|
+
<thead>
|
4
|
+
<tr>
|
5
|
+
<th>ID</th>
|
6
|
+
<%- unless columns.empty? -%>
|
7
|
+
<th><%= columns.first.name.humanize %></th>
|
8
|
+
<%- end -%>
|
9
|
+
<th>Created at</th>
|
10
|
+
<th>Actions</th>
|
11
|
+
</tr>
|
14
12
|
</thead>
|
15
13
|
<tbody>
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
<%% end -%>
|
31
|
-
</tbody>
|
14
|
+
<%% @<%= plural_resource_name %>.each do |<%= resource_name %>| %>
|
15
|
+
<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>
|
19
|
+
<%- end -%>
|
20
|
+
<td><%%= <%= resource_name %>.created_at %></td>
|
21
|
+
<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' %>
|
24
|
+
</td>
|
25
|
+
</tr>
|
26
|
+
<%% end %>
|
27
|
+
</tbody>
|
32
28
|
</table>
|
33
29
|
|
34
|
-
<%%= link_to
|
30
|
+
<%%= link_to 'New', new_<%= singular_controller_routing_path %>_path, :class => 'btn btn-primary' %>
|
@@ -1,10 +1,14 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
1
|
+
<h1><%= model_name.titleize %></h1>
|
2
|
+
|
3
|
+
<%- columns.each do |column| -%>
|
4
|
+
<p>
|
5
|
+
<b><%= column.name.humanize %></b><br>
|
6
|
+
<%%= @<%= resource_name %>.<%= column.name %> %>
|
7
|
+
</p>
|
5
8
|
|
9
|
+
<%- end -%>
|
6
10
|
<div class="form-actions">
|
7
|
-
<%%= link_to
|
8
|
-
<%%= link_to
|
9
|
-
<%%= link_to
|
11
|
+
<%%= link_to 'Back', <%= controller_routing_path %>_path, :class => 'btn' %>
|
12
|
+
<%%= link_to 'Edit', edit_<%= singular_controller_routing_path %>_path(@<%= resource_name %>), :class => 'btn' %>
|
13
|
+
<%%= link_to 'Delete', <%= singular_controller_routing_path %>_path(@<%= resource_name %>), :method => 'delete', :confirm => 'Are you sure?', :class => 'btn btn-danger' %>
|
10
14
|
</div>
|