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.
- checksums.yaml +5 -5
- data/.travis.yml +9 -0
- data/CHANGELOG.md +48 -5
- data/Gemfile +4 -1
- data/Gemfile.lock +147 -87
- data/README.md +142 -34
- data/Rakefile +11 -1
- data/app/helpers/badge_helper.rb +13 -0
- data/app/helpers/bootstrap_flash_helper.rb +18 -10
- data/app/helpers/bootstrap_viewport_meta_helper.rb +27 -0
- data/app/helpers/glyph_helper.rb +10 -7
- data/app/helpers/modal_helper.rb +19 -15
- data/app/helpers/nav_helper.rb +40 -0
- data/app/helpers/twitter_breadcrumbs_helper.rb +8 -2
- data/app/helpers/url_helper.rb +28 -0
- data/app/views/bootstrap_sass_extras/_breadcrumbs.html.erb +6 -0
- data/bootstrap-sass-extras.gemspec +1 -0
- data/lib/bootstrap-sass-extras/breadcrumbs.rb +57 -0
- data/lib/bootstrap-sass-extras/engine.rb +6 -0
- data/lib/bootstrap-sass-extras/version.rb +1 -1
- data/lib/generators/bootstrap/install/templates/en.bootstrap.yml +1 -0
- data/lib/generators/bootstrap/layout/layout_generator.rb +1 -4
- data/lib/generators/bootstrap/layout/templates/layout.html.erb +39 -57
- data/lib/generators/bootstrap/layout/templates/layout.html.haml +27 -45
- data/lib/generators/bootstrap/layout/templates/layout.html.slim +27 -46
- data/lib/generators/bootstrap/partial/templates/_login.html.erb +6 -6
- data/lib/generators/bootstrap/themed/templates/_form.html.erb +11 -9
- data/lib/generators/bootstrap/themed/templates/_form.html.haml +9 -8
- data/lib/generators/bootstrap/themed/templates/_form.html.slim +9 -9
- data/lib/generators/bootstrap/themed/templates/edit.html.erb +2 -2
- data/lib/generators/bootstrap/themed/templates/edit.html.haml +2 -2
- data/lib/generators/bootstrap/themed/templates/edit.html.slim +2 -2
- data/lib/generators/bootstrap/themed/templates/index.html.erb +16 -14
- data/lib/generators/bootstrap/themed/templates/index.html.haml +11 -7
- data/lib/generators/bootstrap/themed/templates/index.html.slim +13 -11
- data/lib/generators/bootstrap/themed/templates/new.html.erb +2 -2
- data/lib/generators/bootstrap/themed/templates/new.html.haml +2 -2
- data/lib/generators/bootstrap/themed/templates/new.html.slim +3 -3
- data/lib/generators/bootstrap/themed/templates/show.html.erb +19 -17
- data/lib/generators/bootstrap/themed/templates/show.html.haml +12 -12
- data/lib/generators/bootstrap/themed/templates/show.html.slim +12 -11
- data/lib/generators/bootstrap/themed/templates/simple_form/_form.html.erb +9 -7
- data/lib/generators/bootstrap/themed/templates/simple_form/_form.html.haml +6 -5
- data/lib/generators/bootstrap/themed/templates/simple_form/_form.html.slim +6 -6
- data/spec/dummy/README.rdoc +15 -248
- data/spec/dummy/Rakefile +1 -2
- data/spec/dummy/app/assets/config/manifest.js +3 -0
- data/spec/dummy/app/{mailers/.gitkeep → assets/images/.keep} +0 -0
- data/spec/dummy/app/assets/javascripts/application.js +4 -6
- data/spec/dummy/app/assets/stylesheets/application.css +6 -4
- data/spec/dummy/app/controllers/application_controller.rb +3 -1
- data/spec/dummy/app/{models/.gitkeep → controllers/concerns/.keep} +0 -0
- data/spec/dummy/{lib/assets/.gitkeep → app/mailers/.keep} +0 -0
- data/spec/dummy/{log/.gitkeep → app/models/.keep} +0 -0
- data/spec/dummy/app/models/concerns/.keep +0 -0
- data/spec/dummy/app/views/application/_custom_breadcrumbs.html.erb +1 -0
- data/spec/dummy/app/views/layouts/application.html.erb +2 -2
- data/spec/dummy/bin/bundle +3 -0
- data/spec/dummy/bin/rails +4 -0
- data/spec/dummy/bin/rake +4 -0
- data/spec/dummy/bin/setup +29 -0
- data/spec/dummy/config.ru +2 -2
- data/spec/dummy/config/application.rb +1 -37
- data/spec/dummy/config/boot.rb +4 -9
- data/spec/dummy/config/database.yml +8 -8
- data/spec/dummy/config/environment.rb +3 -3
- data/spec/dummy/config/environments/development.rb +22 -18
- data/spec/dummy/config/environments/production.rb +46 -34
- data/spec/dummy/config/environments/test.rb +19 -14
- data/spec/dummy/config/initializers/assets.rb +11 -0
- data/spec/dummy/config/initializers/cookies_serializer.rb +3 -0
- data/spec/dummy/config/initializers/filter_parameter_logging.rb +4 -0
- data/spec/dummy/config/initializers/inflections.rb +6 -5
- data/spec/dummy/config/initializers/mime_types.rb +0 -1
- data/spec/dummy/config/initializers/session_store.rb +1 -6
- data/spec/dummy/config/initializers/wrap_parameters.rb +6 -6
- data/spec/dummy/config/locales/en.yml +20 -2
- data/spec/dummy/config/routes.rb +23 -25
- data/spec/dummy/config/secrets.yml +22 -0
- data/spec/dummy/lib/assets/.keep +0 -0
- data/spec/dummy/log/.keep +0 -0
- data/spec/dummy/public/404.html +54 -13
- data/spec/dummy/public/422.html +54 -13
- data/spec/dummy/public/500.html +53 -12
- data/spec/helpers/badge_helper_spec.rb +16 -0
- data/spec/helpers/bootstrap_flash_helper_spec.rb +52 -12
- data/spec/helpers/bootstrap_viewport_meta_helper_spec.rb +17 -0
- data/spec/helpers/button_to_helper_spec.rb +33 -0
- data/spec/helpers/glyph_helper_spec.rb +15 -0
- data/spec/helpers/nav_helper_spec.rb +79 -0
- data/spec/helpers/twitter_breadcrumbs_helper_spec.rb +161 -0
- data/spec/spec_helper.rb +1 -1
- metadata +69 -30
- data/app/views/twitter-bootstrap/_breadcrumbs.html.erb +0 -14
- data/spec/dummy/config/initializers/secret_token.rb +0 -7
- 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
|
-
|
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
|
-
|
13
|
-
=
|
14
|
-
= favicon_link_tag 'apple-touch-icon-
|
15
|
-
= favicon_link_tag 'apple-touch-icon-
|
16
|
-
= favicon_link_tag 'apple-touch-icon-precomposed.png', :
|
17
|
-
= favicon_link_tag '
|
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
|
22
|
-
.
|
23
|
-
|
24
|
-
%
|
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
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
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
|
-
|
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
|
-
.
|
39
|
+
.col-md-9
|
52
40
|
= bootstrap_flash
|
53
41
|
= yield
|
54
|
-
.
|
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", "
|
60
|
-
%li= link_to "Link 2", "
|
61
|
-
%li= link_to "Link 3", "
|
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 © Company
|
65
|
-
/
|
66
|
-
Javascripts
|
67
|
-
\==================================================
|
68
|
-
/ Placed at the end of the document so the pages load faster
|
69
|
-
= javascript_include_tag "application"
|
51
|
+
%p © 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
|
-
|
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
|
-
|
14
|
-
=
|
15
|
-
= favicon_link_tag 'apple-touch-icon-
|
16
|
-
= favicon_link_tag 'apple-touch-icon-
|
17
|
-
= favicon_link_tag 'apple-touch-icon-precomposed.png', :
|
18
|
-
= favicon_link_tag '
|
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
|
24
|
-
.
|
25
|
-
|
26
|
-
|
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
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
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
|
-
|
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
|
-
.
|
39
|
+
.col-md-9
|
54
40
|
= bootstrap_flash
|
55
41
|
= yield
|
56
|
-
.
|
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", "
|
62
|
-
li= link_to "Link 2", "
|
63
|
-
li= link_to "Link 3", "
|
64
|
-
|
47
|
+
li= link_to "Link 1", "#"
|
48
|
+
li= link_to "Link 2", "#"
|
49
|
+
li= link_to "Link 3", "#"
|
50
|
+
|
65
51
|
footer
|
66
|
-
p © Company
|
67
|
-
/!
|
68
|
-
Javascripts
|
69
|
-
\==================================================
|
70
|
-
/! Placed at the end of the document so the pages load faster
|
71
|
-
= javascript_include_tag "application"
|
52
|
+
p © Company <%= Date.today.year %>
|
@@ -1,14 +1,14 @@
|
|
1
1
|
<h2>Sign in</h2>
|
2
2
|
|
3
|
-
<%= form_for(resource, :
|
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, :
|
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, :
|
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, :
|
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", :
|
25
|
+
<%= f.submit "Sign in", class: 'btn' %>
|
26
26
|
</div>
|
27
27
|
<% end %>
|
28
28
|
|
29
|
-
<%= render :
|
29
|
+
<%= render partial: "devise/shared/links" %>
|
@@ -1,16 +1,18 @@
|
|
1
|
-
<%%= form_for @<%= resource_name %>, :
|
1
|
+
<%%= form_for @<%= resource_name %>, html: { class: 'form-horizontal' } do |f| %>
|
2
2
|
<%- columns.each do |column| -%>
|
3
|
-
<div class="
|
4
|
-
<%%= f.label :<%= column.name %>, :
|
5
|
-
<div class="
|
6
|
-
<%%= f.<%= column.field_type %> :<%= column.name %>, :
|
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-
|
12
|
-
|
13
|
-
|
14
|
-
|
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 %>, :
|
1
|
+
= form_for @<%= resource_name %>, html: { class: 'form-horizontal' } do |f|
|
2
2
|
<%- columns.each do |column| -%>
|
3
|
-
.
|
4
|
-
= f.label :<%= column.name %>, :
|
5
|
-
.
|
6
|
-
= f.<%= column.field_type %> :<%= column.name %>, :
|
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-
|
9
|
-
|
10
|
-
|
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 %>, :
|
1
|
+
= form_for @<%= resource_name %>, html: { class: "form-horizontal" } do |f|
|
2
2
|
<%- columns.each do |column| -%>
|
3
|
-
.
|
4
|
-
= f.label :<%= column.name %>, :
|
5
|
-
.
|
6
|
-
= f.<%= column.field_type %> :<%= column.name %>, :
|
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-
|
9
|
-
|
10
|
-
|
11
|
-
|
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', :
|
3
|
+
<h1><%%=t '.title', default: [:'helpers.titles.edit', 'Edit %{model}'], model: model_class.model_name.human.titleize %></h1>
|
4
4
|
</div>
|
5
|
-
<%%= render :
|
5
|
+
<%%= render partial: 'form' %>
|
@@ -1,4 +1,4 @@
|
|
1
1
|
- model_class = <%= resource_name.classify %>
|
2
2
|
.page-header
|
3
|
-
%h1=t '.title', :
|
4
|
-
= render :
|
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', :
|
4
|
-
= render :
|
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', :
|
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', :
|
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><%%=
|
19
|
+
<td><%%= <%= resource_name %>.id %></td>
|
20
20
|
<%- columns.each do |column| -%>
|
21
|
-
|
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('.
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
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', :
|
40
|
+
<%%= link_to t('.new', default: t("helpers.links.new")),
|
39
41
|
new_<%= singular_controller_routing_path %>_path,
|
40
|
-
:
|
42
|
+
class: 'btn btn-primary' %>
|
@@ -1,6 +1,6 @@
|
|
1
1
|
- model_class = <%= resource_name.classify %>
|
2
2
|
.page-header
|
3
|
-
%h1=t '.title', :
|
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', :
|
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=
|
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
|
23
|
-
|
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', :
|
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
|
-
|
3
|
-
h1=t '.title', :
|
4
|
-
table
|
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', :
|
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=
|
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
|
23
|
-
|
24
|
-
= link_to
|
25
|
-
|
26
|
-
= link_to t('.
|
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'
|