twitter-bootstrap-rails 2.2.8 → 3.2.2
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.
- checksums.yaml +7 -0
- data/README.md +160 -228
- data/Rakefile +4 -6
- data/app/assets/fonts/fontawesome-webfont.eot +0 -0
- data/app/assets/fonts/fontawesome-webfont.svg +279 -38
- data/app/assets/fonts/fontawesome-webfont.ttf +0 -0
- data/app/assets/fonts/fontawesome-webfont.woff +0 -0
- data/app/assets/fonts/glyphicons-halflings-regular.eot +0 -0
- data/app/assets/fonts/glyphicons-halflings-regular.svg +229 -0
- data/app/assets/fonts/glyphicons-halflings-regular.ttf +0 -0
- data/app/assets/fonts/glyphicons-halflings-regular.woff +0 -0
- data/app/assets/javascripts/twitter/bootstrap/affix.js +142 -0
- data/app/assets/javascripts/twitter/bootstrap/alert.js +92 -0
- data/app/assets/javascripts/twitter/bootstrap/button.js +110 -0
- data/app/assets/javascripts/twitter/bootstrap/carousel.js +223 -0
- data/app/assets/javascripts/twitter/bootstrap/collapse.js +170 -0
- data/app/assets/javascripts/twitter/bootstrap/dropdown.js +151 -0
- data/app/assets/javascripts/twitter/bootstrap/modal.js +280 -0
- data/app/assets/javascripts/twitter/bootstrap/popover.js +113 -0
- data/app/assets/javascripts/twitter/bootstrap/scrollspy.js +170 -0
- data/app/assets/javascripts/twitter/bootstrap/tab.js +128 -0
- data/app/assets/javascripts/twitter/bootstrap/tooltip.js +457 -0
- data/app/assets/javascripts/twitter/bootstrap/transition.js +59 -0
- data/app/assets/javascripts/twitter/bootstrap.js +12 -13
- data/app/assets/stylesheets/twitter-bootstrap-static/bootstrap.css.erb +1 -890
- data/app/assets/stylesheets/twitter-bootstrap-static/fontawesome.css.erb +2026 -787
- data/app/assets/stylesheets/twitter-bootstrap-static/sprites.css.erb +1 -146
- data/app/helpers/bootstrap_flash_helper.rb +14 -7
- data/app/helpers/form_errors_helper.rb +22 -0
- data/app/helpers/glyph_helper.rb +8 -5
- data/app/helpers/modal_helper.rb +26 -22
- data/app/helpers/navbar_helper.rb +47 -32
- data/app/helpers/twitter_breadcrumbs_helper.rb +6 -2
- data/app/views/twitter-bootstrap/_breadcrumbs.html.erb +8 -8
- data/lib/generators/bootstrap/install/install_generator.rb +3 -2
- data/lib/generators/bootstrap/install/templates/bootstrap_and_overrides.less +13 -11
- data/lib/generators/bootstrap/install/templates/en.bootstrap.yml +5 -0
- data/lib/generators/bootstrap/layout/layout_generator.rb +1 -4
- data/lib/generators/bootstrap/layout/templates/layout.html.erb +27 -48
- data/lib/generators/bootstrap/layout/templates/layout.html.haml +19 -34
- data/lib/generators/bootstrap/layout/templates/layout.html.slim +13 -30
- data/lib/generators/bootstrap/partial/templates/_login.html.erb +2 -3
- data/lib/generators/bootstrap/themed/templates/_form.html.erb +30 -10
- data/lib/generators/bootstrap/themed/templates/_form.html.haml +10 -8
- data/lib/generators/bootstrap/themed/templates/_form.html.slim +11 -9
- data/lib/generators/bootstrap/themed/templates/edit.html.slim +1 -1
- data/lib/generators/bootstrap/themed/templates/index.html.erb +2 -2
- data/lib/generators/bootstrap/themed/templates/index.html.haml +2 -2
- data/lib/generators/bootstrap/themed/templates/index.html.slim +4 -5
- data/lib/generators/bootstrap/themed/templates/new.html.slim +1 -1
- data/lib/generators/bootstrap/themed/templates/show.html.erb +5 -7
- data/lib/generators/bootstrap/themed/templates/show.html.haml +4 -4
- data/lib/generators/bootstrap/themed/templates/show.html.slim +6 -7
- data/lib/generators/bootstrap/themed/templates/simple_form/_form.html.erb +5 -5
- data/lib/generators/bootstrap/themed/templates/simple_form/_form.html.haml +3 -3
- data/lib/generators/bootstrap/themed/templates/simple_form/_form.html.slim +4 -4
- data/lib/generators/bootstrap/themed/themed_generator.rb +2 -2
- data/lib/twitter/bootstrap/rails/breadcrumbs.rb +69 -0
- data/lib/twitter/bootstrap/rails/engine.rb +17 -10
- data/lib/twitter/bootstrap/rails/version.rb +2 -2
- data/spec/lib/breadcrumbs_spec.rb +99 -0
- data/spec/lib/twitter_bootstrap_rails/badge_label_helper_spec.rb +12 -4
- data/spec/lib/twitter_bootstrap_rails/bootstrap_flash_helper_spec.rb +128 -0
- data/spec/lib/twitter_bootstrap_rails/form_errors_helper_spec.rb +148 -0
- data/spec/lib/twitter_bootstrap_rails/glyph_helper_spec.rb +24 -0
- data/spec/lib/twitter_bootstrap_rails/modal_helper_spec.rb +15 -15
- data/spec/lib/twitter_bootstrap_rails/navbar_helper_spec.rb +207 -173
- data/spec/lib/twitter_bootstrap_rails/uri_state_spec.rb +18 -16
- data/spec/spec_helper.rb +11 -1
- data/vendor/assets/stylesheets/twitter-bootstrap-static/bootstrap.css.erb +5796 -1
- data/vendor/static-source/bootstrap.less +0 -1
- data/vendor/static-source/fontawesome.less +0 -1
- data/vendor/static-source/sprites.less +1 -1
- data/vendor/toolkit/fontawesome/bordered-pulled.less +16 -0
- data/vendor/toolkit/fontawesome/core.less +8 -126
- data/vendor/toolkit/fontawesome/fixed-width.less +6 -0
- data/vendor/toolkit/fontawesome/font-awesome.less +9 -25
- data/vendor/toolkit/fontawesome/icons.less +549 -378
- data/vendor/toolkit/fontawesome/larger.less +13 -0
- data/vendor/toolkit/fontawesome/list.less +19 -0
- data/vendor/toolkit/fontawesome/mixins.less +16 -39
- data/vendor/toolkit/fontawesome/path.less +5 -5
- data/vendor/toolkit/fontawesome/rotated-flipped.less +20 -0
- data/vendor/toolkit/fontawesome/spinning.less +29 -0
- data/vendor/toolkit/fontawesome/stacked.less +20 -0
- data/vendor/toolkit/fontawesome/variables.less +557 -731
- data/vendor/toolkit/twitter/bootstrap/alerts.less +47 -58
- data/vendor/toolkit/twitter/bootstrap/badges.less +55 -0
- data/vendor/toolkit/twitter/bootstrap/bootstrap.less +26 -39
- data/vendor/toolkit/twitter/bootstrap/breadcrumbs.less +11 -9
- data/vendor/toolkit/twitter/bootstrap/button-groups.less +168 -152
- data/vendor/toolkit/twitter/bootstrap/buttons.less +101 -170
- data/vendor/toolkit/twitter/bootstrap/carousel.less +150 -65
- data/vendor/toolkit/twitter/bootstrap/close.less +20 -19
- data/vendor/toolkit/twitter/bootstrap/code.less +38 -30
- data/vendor/toolkit/twitter/bootstrap/component-animations.less +12 -3
- data/vendor/toolkit/twitter/bootstrap/dropdowns.less +115 -148
- data/vendor/toolkit/twitter/bootstrap/forms.less +401 -547
- data/vendor/toolkit/twitter/bootstrap/glyphicons.less +234 -0
- data/vendor/toolkit/twitter/bootstrap/grid.less +74 -11
- data/vendor/toolkit/twitter/bootstrap/input-groups.less +166 -0
- data/vendor/toolkit/twitter/bootstrap/jumbotron.less +48 -0
- data/vendor/toolkit/twitter/bootstrap/labels.less +64 -0
- data/vendor/toolkit/twitter/bootstrap/list-group.less +132 -0
- data/vendor/toolkit/twitter/bootstrap/media.less +8 -7
- data/vendor/toolkit/twitter/bootstrap/mixins/alerts.less +14 -0
- data/vendor/toolkit/twitter/bootstrap/mixins/background-variant.less +8 -0
- data/vendor/toolkit/twitter/bootstrap/mixins/border-radius.less +18 -0
- data/vendor/toolkit/twitter/bootstrap/mixins/buttons.less +52 -0
- data/vendor/toolkit/twitter/bootstrap/mixins/center-block.less +7 -0
- data/vendor/toolkit/twitter/bootstrap/mixins/clearfix.less +22 -0
- data/vendor/toolkit/twitter/bootstrap/mixins/forms.less +85 -0
- data/vendor/toolkit/twitter/bootstrap/mixins/gradients.less +59 -0
- data/vendor/toolkit/twitter/bootstrap/mixins/grid-framework.less +91 -0
- data/vendor/toolkit/twitter/bootstrap/mixins/grid.less +122 -0
- data/vendor/toolkit/twitter/bootstrap/mixins/hide-text.less +21 -0
- data/vendor/toolkit/twitter/bootstrap/mixins/image.less +33 -0
- data/vendor/toolkit/twitter/bootstrap/mixins/labels.less +12 -0
- data/vendor/toolkit/twitter/bootstrap/mixins/list-group.less +29 -0
- data/vendor/toolkit/twitter/bootstrap/mixins/nav-divider.less +10 -0
- data/vendor/toolkit/twitter/bootstrap/mixins/nav-vertical-align.less +9 -0
- data/vendor/toolkit/twitter/bootstrap/mixins/opacity.less +8 -0
- data/vendor/toolkit/twitter/bootstrap/mixins/pagination.less +23 -0
- data/vendor/toolkit/twitter/bootstrap/mixins/panels.less +24 -0
- data/vendor/toolkit/twitter/bootstrap/mixins/progress-bar.less +10 -0
- data/vendor/toolkit/twitter/bootstrap/mixins/reset-filter.less +8 -0
- data/vendor/toolkit/twitter/bootstrap/mixins/resize.less +6 -0
- data/vendor/toolkit/twitter/bootstrap/mixins/responsive-visibility.less +15 -0
- data/vendor/toolkit/twitter/bootstrap/mixins/size.less +10 -0
- data/vendor/toolkit/twitter/bootstrap/mixins/tab-focus.less +9 -0
- data/vendor/toolkit/twitter/bootstrap/mixins/table-row.less +28 -0
- data/vendor/toolkit/twitter/bootstrap/mixins/text-emphasis.less +8 -0
- data/vendor/toolkit/twitter/bootstrap/mixins/text-overflow.less +8 -0
- data/vendor/toolkit/twitter/bootstrap/mixins/vendor-prefixes.less +224 -0
- data/vendor/toolkit/twitter/bootstrap/mixins.less +36 -699
- data/vendor/toolkit/twitter/bootstrap/modals.less +109 -54
- data/vendor/toolkit/twitter/bootstrap/navbar.less +542 -384
- data/vendor/toolkit/twitter/bootstrap/navs.less +192 -359
- data/vendor/toolkit/twitter/bootstrap/normalize.less +425 -0
- data/vendor/toolkit/twitter/bootstrap/pager.less +46 -34
- data/vendor/toolkit/twitter/bootstrap/pagination.less +70 -105
- data/vendor/toolkit/twitter/bootstrap/panels.less +248 -0
- data/vendor/toolkit/twitter/bootstrap/popovers.less +61 -61
- data/vendor/toolkit/twitter/bootstrap/print.less +101 -0
- data/vendor/toolkit/twitter/bootstrap/progress-bars.less +51 -73
- data/vendor/toolkit/twitter/bootstrap/responsive-embed.less +34 -0
- data/vendor/toolkit/twitter/bootstrap/responsive-utilities.less +177 -42
- data/vendor/toolkit/twitter/bootstrap/scaffolding.less +120 -23
- data/vendor/toolkit/twitter/bootstrap/tables.less +171 -182
- data/vendor/toolkit/twitter/bootstrap/theme.less +260 -0
- data/vendor/toolkit/twitter/bootstrap/thumbnails.less +26 -43
- data/vendor/toolkit/twitter/bootstrap/tooltip.less +49 -24
- data/vendor/toolkit/twitter/bootstrap/type.less +208 -147
- data/vendor/toolkit/twitter/bootstrap/utilities.less +33 -7
- data/vendor/toolkit/twitter/bootstrap/variables.less +761 -215
- data/vendor/toolkit/twitter/bootstrap/wells.less +7 -7
- metadata +156 -130
- data/app/assets/images/twitter/bootstrap/glyphicons-halflings-white.png +0 -0
- data/app/assets/images/twitter/bootstrap/glyphicons-halflings.png +0 -0
- data/app/assets/javascripts/twitter/bootstrap/bootstrap-affix.js +0 -117
- data/app/assets/javascripts/twitter/bootstrap/bootstrap-alert.js +0 -99
- data/app/assets/javascripts/twitter/bootstrap/bootstrap-button.js +0 -105
- data/app/assets/javascripts/twitter/bootstrap/bootstrap-carousel.js +0 -207
- data/app/assets/javascripts/twitter/bootstrap/bootstrap-collapse.js +0 -167
- data/app/assets/javascripts/twitter/bootstrap/bootstrap-dropdown.js +0 -169
- data/app/assets/javascripts/twitter/bootstrap/bootstrap-modal.js +0 -247
- data/app/assets/javascripts/twitter/bootstrap/bootstrap-popover.js +0 -114
- data/app/assets/javascripts/twitter/bootstrap/bootstrap-scrollspy.js +0 -162
- data/app/assets/javascripts/twitter/bootstrap/bootstrap-tab.js +0 -144
- data/app/assets/javascripts/twitter/bootstrap/bootstrap-tooltip.js +0 -361
- data/app/assets/javascripts/twitter/bootstrap/bootstrap-transition.js +0 -60
- data/app/assets/javascripts/twitter/bootstrap/bootstrap-typeahead.js +0 -335
- data/lib/twitter/bootstrap/rails/twitter-bootstrap-breadcrumbs.rb +0 -42
- data/test/lib/breadcrumbs_test.rb +0 -75
- data/test/test_helper.rb +0 -11
- data/vendor/toolkit/fontawesome/bootstrap.less +0 -84
- data/vendor/toolkit/fontawesome/extras.less +0 -93
- data/vendor/toolkit/fontawesome/font-awesome-ie7.less +0 -1953
- data/vendor/toolkit/twitter/bootstrap/accordion.less +0 -34
- data/vendor/toolkit/twitter/bootstrap/hero-unit.less +0 -25
- data/vendor/toolkit/twitter/bootstrap/labels-badges.less +0 -84
- data/vendor/toolkit/twitter/bootstrap/layouts.less +0 -16
- data/vendor/toolkit/twitter/bootstrap/reset.less +0 -216
- data/vendor/toolkit/twitter/bootstrap/responsive-1200px-min.less +0 -28
- data/vendor/toolkit/twitter/bootstrap/responsive-767px-max.less +0 -193
- data/vendor/toolkit/twitter/bootstrap/responsive-768px-979px.less +0 -19
- data/vendor/toolkit/twitter/bootstrap/responsive-navbar.less +0 -189
- data/vendor/toolkit/twitter/bootstrap/responsive.less +0 -48
- data/vendor/toolkit/twitter/bootstrap/sprites.less +0 -197
@@ -7,11 +7,6 @@
|
|
7
7
|
<title><%%= content_for?(:title) ? yield(:title) : "<%= app_name %>" %></title>
|
8
8
|
<%%= csrf_meta_tags %>
|
9
9
|
|
10
|
-
<!-- Le HTML5 shim, for IE6-8 support of HTML elements -->
|
11
|
-
<!--[if lt IE 9]>
|
12
|
-
<script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.6.1/html5shiv.js" type="text/javascript"></script>
|
13
|
-
<![endif]-->
|
14
|
-
|
15
10
|
<%%= stylesheet_link_tag "application", :media => "all" %>
|
16
11
|
|
17
12
|
<!-- For third-generation iPad with high-resolution Retina display: -->
|
@@ -35,34 +30,41 @@
|
|
35
30
|
<%%= favicon_link_tag 'favicon.ico', :rel => 'shortcut icon' %>
|
36
31
|
|
37
32
|
<%%= javascript_include_tag "application" %>
|
33
|
+
|
34
|
+
<!-- Le HTML5 shim, for IE6-8 support of HTML elements -->
|
35
|
+
<!--[if lt IE 9]>
|
36
|
+
<script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.2/html5shiv.min.js" type="text/javascript"></script>
|
37
|
+
<![endif]-->
|
38
38
|
</head>
|
39
39
|
<body>
|
40
40
|
|
41
|
-
<div class="navbar navbar
|
42
|
-
<div class="
|
43
|
-
<
|
44
|
-
<
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
<
|
51
|
-
<
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
</ul>
|
56
|
-
</div><!--/.nav-collapse -->
|
41
|
+
<div class="navbar navbar-default navbar-static-top">
|
42
|
+
<div class="container">
|
43
|
+
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-responsive-collapse">
|
44
|
+
<span class="icon-bar"></span>
|
45
|
+
<span class="icon-bar"></span>
|
46
|
+
<span class="icon-bar"></span>
|
47
|
+
</button>
|
48
|
+
<a class="navbar-brand" href="#"><%= app_name %></a>
|
49
|
+
<div class="navbar-collapse collapse navbar-responsive-collapse">
|
50
|
+
<ul class="nav navbar-nav">
|
51
|
+
<li><%%= link_to "Link1", "/path1" %></li>
|
52
|
+
<li><%%= link_to "Link2", "/path2" %></li>
|
53
|
+
<li><%%= link_to "Link3", "/path3" %></li>
|
54
|
+
</ul>
|
57
55
|
</div>
|
58
56
|
</div>
|
59
57
|
</div>
|
60
58
|
|
61
|
-
<div class="
|
62
|
-
|
63
|
-
|
64
|
-
|
59
|
+
<div class="container">
|
60
|
+
<div class="row">
|
61
|
+
<div class="col-lg-9">
|
62
|
+
<%%= bootstrap_flash %>
|
63
|
+
<%%= yield %>
|
64
|
+
</div>
|
65
|
+
<div class="col-lg-3">
|
65
66
|
<div class="well sidebar-nav">
|
67
|
+
<h3>Sidebar</h3>
|
66
68
|
<ul class="nav nav-list">
|
67
69
|
<li class="nav-header">Sidebar</li>
|
68
70
|
<li><%%= link_to "Link1", "/path1" %></li>
|
@@ -71,30 +73,7 @@
|
|
71
73
|
</ul>
|
72
74
|
</div><!--/.well -->
|
73
75
|
</div><!--/span-->
|
74
|
-
<div class="span9">
|
75
|
-
<%%= bootstrap_flash %>
|
76
|
-
<%%= yield %>
|
77
|
-
</div>
|
78
76
|
</div><!--/row-->
|
79
|
-
<%- else -%>
|
80
|
-
<div class="row">
|
81
|
-
<div class="span9">
|
82
|
-
<%%= bootstrap_flash %>
|
83
|
-
<%%= yield %>
|
84
|
-
</div>
|
85
|
-
<div class="span3">
|
86
|
-
<div class="well sidebar-nav">
|
87
|
-
<h3>Sidebar</h3>
|
88
|
-
<ul class="nav nav-list">
|
89
|
-
<li class="nav-header">Sidebar</li>
|
90
|
-
<li><%%= link_to "Link1", "/path1" %></li>
|
91
|
-
<li><%%= link_to "Link2", "/path2" %></li>
|
92
|
-
<li><%%= link_to "Link3", "/path3" %></li>
|
93
|
-
</ul>
|
94
|
-
</div><!--/.well -->
|
95
|
-
</div><!--/span-->
|
96
|
-
</div><!--/row-->
|
97
|
-
<%- end -%>
|
98
77
|
|
99
78
|
<footer>
|
100
79
|
<p>© Company <%= Date.today.year %></p>
|
@@ -6,9 +6,6 @@
|
|
6
6
|
%meta(name="viewport" content="width=device-width, initial-scale=1.0")
|
7
7
|
%title= content_for?(:title) ? yield(:title) : "<%= app_name %>"
|
8
8
|
= csrf_meta_tags
|
9
|
-
/ Le HTML5 shim, for IE6-8 support of HTML elements
|
10
|
-
/[if lt IE 9]
|
11
|
-
= javascript_include_tag "//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.6.1/html5shiv.js"
|
12
9
|
= stylesheet_link_tag "application", :media => "all"
|
13
10
|
= favicon_link_tag 'apple-touch-icon-144x144-precomposed.png', :rel => 'apple-touch-icon-precomposed', :type => 'image/png', :sizes => '144x144'
|
14
11
|
= favicon_link_tag 'apple-touch-icon-114x114-precomposed.png', :rel => 'apple-touch-icon-precomposed', :type => 'image/png', :sizes => '114x114'
|
@@ -16,43 +13,32 @@
|
|
16
13
|
= favicon_link_tag 'apple-touch-icon-precomposed.png', :rel => 'apple-touch-icon-precomposed', :type => 'image/png'
|
17
14
|
= favicon_link_tag 'favicon.ico', :rel => 'shortcut icon'
|
18
15
|
= javascript_include_tag "application"
|
16
|
+
/ Le HTML5 shim, for IE6-8 support of HTML elements
|
17
|
+
/[if lt IE 9]
|
18
|
+
= javascript_include_tag "//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.2/html5shiv.min.js"
|
19
19
|
|
20
20
|
|
21
21
|
%body
|
22
|
-
.navbar.navbar
|
23
|
-
.
|
24
|
-
|
25
|
-
%
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
.
|
31
|
-
%
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
.<%= container_class %>
|
37
|
-
<%- if layout_type == "fluid" -%>
|
22
|
+
.navbar.navbar-default.navbar-static-top
|
23
|
+
.container
|
24
|
+
%button.navbar-toggle(type="button" data-toggle="collapse" data-target=".navbar-responsive-collapse")
|
25
|
+
%span.icon-bar
|
26
|
+
%span.icon-bar
|
27
|
+
%span.icon-bar
|
28
|
+
%a.navbar-brand(href="#") <%= app_name %>
|
29
|
+
.navbar-collapse.collapse.navbar-responsive-collapse
|
30
|
+
%ul.nav.navbar-nav
|
31
|
+
%li= link_to "Link 1", "/path1"
|
32
|
+
%li= link_to "Link 2", "/path2"
|
33
|
+
%li= link_to "Link 3", "/path3"
|
34
|
+
%li= link_to "Link 3", "/path3"
|
38
35
|
|
39
|
-
|
40
|
-
.span3
|
41
|
-
.well.sidebar-nav
|
42
|
-
%ul.nav.nav-list
|
43
|
-
%li.nav-header Sidebar
|
44
|
-
%li= link_to "Link 1", "/path1"
|
45
|
-
%li= link_to "Link 2", "/path2"
|
46
|
-
%li= link_to "Link 3", "/path3"
|
47
|
-
.span9
|
48
|
-
= bootstrap_flash
|
49
|
-
= yield
|
50
|
-
<% else %>
|
36
|
+
.container
|
51
37
|
.row
|
52
|
-
.
|
38
|
+
.col-lg-9
|
53
39
|
= bootstrap_flash
|
54
40
|
= yield
|
55
|
-
.
|
41
|
+
.col-lg-3
|
56
42
|
.well.sidebar-nav
|
57
43
|
%h3 Sidebar
|
58
44
|
%ul.nav.nav-list
|
@@ -60,6 +46,5 @@
|
|
60
46
|
%li= link_to "Link 1", "/path1"
|
61
47
|
%li= link_to "Link 2", "/path2"
|
62
48
|
%li= link_to "Link 3", "/path3"
|
63
|
-
<% end %>
|
64
49
|
%footer
|
65
50
|
%p © Company <%= Date.today.year %>
|
@@ -6,10 +6,6 @@ html lang="en"
|
|
6
6
|
meta name="viewport" content="width=device-width, initial-scale=1.0"
|
7
7
|
title= content_for?(:title) ? yield(:title) : "<%= app_name %>"
|
8
8
|
= csrf_meta_tags
|
9
|
-
|
10
|
-
/! Le HTML5 shim, for IE6-8 support of HTML elements
|
11
|
-
/[if lt IE 9]
|
12
|
-
= javascript_include_tag "//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.6.1/html5shiv.js"
|
13
9
|
= stylesheet_link_tag "application", :media => "all"
|
14
10
|
= favicon_link_tag 'apple-touch-icon-144x144-precomposed.png', :rel => 'apple-touch-icon-precomposed', :type => 'image/png', :sizes => '144x144'
|
15
11
|
= favicon_link_tag 'apple-touch-icon-114x114-precomposed.png', :rel => 'apple-touch-icon-precomposed', :type => 'image/png', :sizes => '114x114'
|
@@ -17,44 +13,31 @@ html lang="en"
|
|
17
13
|
= favicon_link_tag 'apple-touch-icon-precomposed.png', :rel => 'apple-touch-icon-precomposed', :type => 'image/png'
|
18
14
|
= favicon_link_tag 'favicon.ico', :rel => 'shortcut icon'
|
19
15
|
= javascript_include_tag "application"
|
20
|
-
|
16
|
+
/! Le HTML5 shim, for IE6-8 support of HTML elements
|
17
|
+
/[if lt IE 9]
|
18
|
+
= javascript_include_tag "//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.2/html5shiv.min.js"
|
21
19
|
|
22
20
|
|
23
21
|
body
|
24
|
-
.navbar.navbar
|
25
|
-
|
26
|
-
|
27
|
-
a.btn.btn-navbar data-target=".nav-collapse" data-toggle="collapse"
|
22
|
+
.navbar.navbar-default.navbar-static-top
|
23
|
+
.container
|
24
|
+
button.navbar-toggle type="button" data-toggle="collapse" data-target=".navbar-responsive-collapse"
|
28
25
|
span.icon-bar
|
29
26
|
span.icon-bar
|
30
27
|
span.icon-bar
|
31
|
-
a.brand href="#"<%= app_name %>
|
32
|
-
|
33
|
-
ul.nav
|
28
|
+
a.navbar-brand href="#"<%= app_name %>
|
29
|
+
.navbar-collapse.collapse.navbar-responsive-collapse
|
30
|
+
ul.nav.navbar-nav
|
34
31
|
li= link_to "Link 1", "/path1"
|
35
32
|
li= link_to "Link 2", "/path2"
|
36
33
|
li= link_to "Link 3", "/path3"
|
37
34
|
|
38
|
-
|
39
|
-
<%- if layout_type == "fluid" -%>
|
40
|
-
|
41
|
-
.row-fluid
|
42
|
-
.span3
|
43
|
-
.well.sidebar-nav
|
44
|
-
ul.nav.nav-list
|
45
|
-
li.nav-header Sidebar
|
46
|
-
li= link_to "Link 1", "/path1"
|
47
|
-
li= link_to "Link 2", "/path2"
|
48
|
-
li= link_to "Link 3", "/path3"
|
49
|
-
.span9
|
50
|
-
= bootstrap_flash
|
51
|
-
= yield
|
52
|
-
<% else %>
|
35
|
+
.container
|
53
36
|
.row
|
54
|
-
.
|
37
|
+
.col-lg-9
|
55
38
|
= bootstrap_flash
|
56
39
|
= yield
|
57
|
-
.
|
40
|
+
.col-lg-3
|
58
41
|
.well.sidebar-nav
|
59
42
|
h3 Sidebar
|
60
43
|
ul.nav.nav-list
|
@@ -62,6 +45,6 @@ html lang="en"
|
|
62
45
|
li= link_to "Link 1", "/path1"
|
63
46
|
li= link_to "Link 2", "/path2"
|
64
47
|
li= link_to "Link 3", "/path3"
|
65
|
-
|
48
|
+
|
66
49
|
footer
|
67
50
|
p © Company <%= Date.today.year %>
|
@@ -1,16 +1,36 @@
|
|
1
|
-
<%%= form_for @<%= resource_name %>, :html => { :class =>
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
1
|
+
<%%= form_for @<%= resource_name %>, :html => { :class => "form-horizontal <%= resource_name %>" } do |f| %>
|
2
|
+
|
3
|
+
<%% if @<%= resource_name %>.errors.any? %>
|
4
|
+
<div id="error_expl" class="panel panel-danger">
|
5
|
+
<div class="panel-heading">
|
6
|
+
<h3 class="panel-title"><%%= pluralize(@<%= resource_name %>.errors.count, "error") %> prohibited this <%= resource_name %> from being saved:</h3>
|
7
|
+
</div>
|
8
|
+
<div class="panel-body">
|
9
|
+
<ul>
|
10
|
+
<%% @<%= resource_name %>.errors.full_messages.each do |msg| %>
|
11
|
+
<li><%%= msg %></li>
|
12
|
+
<%% end %>
|
13
|
+
</ul>
|
14
|
+
</div>
|
15
|
+
</div>
|
16
|
+
<%% end %>
|
17
|
+
|
18
|
+
<%- columns.each do |column| -%>
|
19
|
+
<div class="form-group">
|
20
|
+
<%%= f.label :<%= column.name %>, :class => 'control-label col-lg-2' %>
|
21
|
+
<div class="col-lg-10">
|
22
|
+
<%%= f.<%= column.field_type %> :<%= column.name %>, :class => 'form-control' %>
|
7
23
|
</div>
|
24
|
+
<%%=f.error_span(:<%= column.name %>) %>
|
8
25
|
</div>
|
9
26
|
<%- end -%>
|
10
27
|
|
11
|
-
<div class="form-
|
12
|
-
|
13
|
-
|
14
|
-
|
28
|
+
<div class="form-group">
|
29
|
+
<div class="col-lg-offset-2 col-lg-10">
|
30
|
+
<%%= f.submit nil, :class => 'btn btn-primary' %>
|
31
|
+
<%%= link_to t('.cancel', :default => t("helpers.links.cancel")),
|
32
|
+
<%= controller_routing_path %>_path, :class => 'btn btn-default' %>
|
33
|
+
</div>
|
15
34
|
</div>
|
35
|
+
|
16
36
|
<%% end %>
|
@@ -1,10 +1,12 @@
|
|
1
|
-
= form_for @<%= resource_name %>, :
|
1
|
+
= form_for @<%= resource_name %>, html: { class: "form form-horizontal <%= resource_name %>" } 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-lg-2'
|
5
|
+
.col-lg-10
|
6
|
+
= f.<%= column.field_type %> :<%= column.name %>, class: 'form-control', required: true
|
7
|
+
= f.error_span(:<%= column.name %>)
|
7
8
|
<%- end -%>
|
8
|
-
.form-
|
9
|
-
|
10
|
-
|
9
|
+
.form-group
|
10
|
+
.col-lg-offset-2.col-lg-10
|
11
|
+
= f.submit nil,class: 'btn btn-primary'
|
12
|
+
= link_to t('.cancel', :default => t("helpers.links.cancel")), <%= controller_routing_path %>_path, :class => 'btn btn-default'
|
@@ -1,11 +1,13 @@
|
|
1
|
-
= form_for @<%= resource_name %>, :
|
1
|
+
= form_for @<%= resource_name %>, html: { class: "form form-horizontal <%= resource_name %>" } do |f|
|
2
2
|
<%- columns.each do |column| -%>
|
3
|
-
.
|
4
|
-
= f.label :<%= column.name %>, :class => 'control-label'
|
5
|
-
.
|
6
|
-
= f.<%= column.field_type %> :<%= column.name %>, :class => '
|
3
|
+
.form-group
|
4
|
+
= f.label :<%= column.name %>, :class => 'control-label col-lg-2'
|
5
|
+
.col-lg-10
|
6
|
+
= f.<%= column.field_type %> :<%= column.name %>, :class => 'form-control'
|
7
|
+
= f.error_span(:<%= column.name %>)
|
7
8
|
<%- end -%>
|
8
|
-
.form-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
.form-group
|
10
|
+
.col-lg-offset-2.col-lg-10
|
11
|
+
= f.submit nil, :class => 'btn btn-primary'
|
12
|
+
'
|
13
|
+
= link_to t('.cancel', :default => t("helpers.links.cancel")), <%= controller_routing_path %>_path, :class => 'btn'
|
@@ -23,12 +23,12 @@
|
|
23
23
|
<td><%%=l <%= resource_name %>.created_at %></td>
|
24
24
|
<td>
|
25
25
|
<%%= link_to t('.edit', :default => t("helpers.links.edit")),
|
26
|
-
edit_<%= singular_controller_routing_path %>_path(<%= resource_name %>), :class => 'btn btn-
|
26
|
+
edit_<%= singular_controller_routing_path %>_path(<%= resource_name %>), :class => 'btn btn-default btn-xs' %>
|
27
27
|
<%%= link_to t('.destroy', :default => t("helpers.links.destroy")),
|
28
28
|
<%= singular_controller_routing_path %>_path(<%= resource_name %>),
|
29
29
|
:method => :delete,
|
30
30
|
:data => { :confirm => t('.confirm', :default => t("helpers.links.confirm", :default => 'Are you sure?')) },
|
31
|
-
:class => 'btn btn-
|
31
|
+
:class => 'btn btn-xs btn-danger' %>
|
32
32
|
</td>
|
33
33
|
</tr>
|
34
34
|
<%% end %>
|
@@ -19,7 +19,7 @@
|
|
19
19
|
<%- end -%>
|
20
20
|
%td=l <%= resource_name %>.created_at
|
21
21
|
%td
|
22
|
-
= link_to t('.edit', :default => t("helpers.links.edit")), edit_<%= singular_controller_routing_path %>_path(<%= resource_name %>), :class => 'btn btn-
|
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-
|
22
|
+
= link_to t('.edit', :default => t("helpers.links.edit")), edit_<%= singular_controller_routing_path %>_path(<%= resource_name %>), :class => 'btn btn-default btn-xs'
|
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-xs btn-danger'
|
24
24
|
|
25
25
|
= 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
|
-
|
2
|
+
.page-header
|
3
3
|
h1=t '.title', :default => model_class.model_name.human.pluralize.titleize
|
4
|
-
table
|
4
|
+
table.table.table-striped
|
5
5
|
thead
|
6
6
|
tr
|
7
7
|
th= model_class.human_attribute_name(:id)
|
@@ -19,9 +19,8 @@ table class="table table-striped"
|
|
19
19
|
<%- end -%>
|
20
20
|
td=l <%= resource_name %>.created_at
|
21
21
|
td
|
22
|
-
= link_to t('.edit', :default => t("helpers.links.edit")), edit_<%= singular_controller_routing_path %>_path(<%= resource_name %>), :class => 'btn btn-
|
22
|
+
= link_to t('.edit', :default => t("helpers.links.edit")), edit_<%= singular_controller_routing_path %>_path(<%= resource_name %>), :class => 'btn btn-default btn-xs'
|
23
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-
|
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-xs btn-danger'
|
25
25
|
|
26
26
|
= link_to t('.new', :default => t("helpers.links.new")), new_<%= singular_controller_routing_path %>_path, :class => 'btn btn-primary'
|
27
|
-
|
@@ -10,14 +10,12 @@
|
|
10
10
|
<%- end -%>
|
11
11
|
</dl>
|
12
12
|
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
<%%= link_to t('.destroy', :default => t("helpers.links.destroy")),
|
13
|
+
<%%= link_to t('.back', :default => t("helpers.links.back")),
|
14
|
+
<%= controller_routing_path %>_path, :class => 'btn btn-default' %>
|
15
|
+
<%%= link_to t('.edit', :default => t("helpers.links.edit")),
|
16
|
+
edit_<%= singular_controller_routing_path %>_path(@<%= resource_name %>), :class => 'btn btn-default' %>
|
17
|
+
<%%= link_to t('.destroy', :default => t("helpers.links.destroy")),
|
19
18
|
<%= singular_controller_routing_path %>_path(@<%= resource_name %>),
|
20
19
|
:method => 'delete',
|
21
20
|
:data => { :confirm => t('.confirm', :default => t("helpers.links.confirm", :default => 'Are you sure?')) },
|
22
21
|
:class => 'btn btn-danger' %>
|
23
|
-
</div>
|
@@ -9,7 +9,7 @@
|
|
9
9
|
= @<%= resource_name %>.<%= column.name %>
|
10
10
|
<%- end -%>
|
11
11
|
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
12
|
+
|
13
|
+
= link_to t('.back', :default => t("helpers.links.back")), <%= controller_routing_path %>_path, :class => 'btn btn-default'
|
14
|
+
= link_to t('.edit', :default => t("helpers.links.edit")), edit_<%= singular_controller_routing_path %>_path(@<%= resource_name %>), :class => 'btn btn-default'
|
15
|
+
= 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-danger'
|
@@ -1,5 +1,5 @@
|
|
1
1
|
- model_class = <%= resource_name.classify %>
|
2
|
-
|
2
|
+
.page-header
|
3
3
|
h1=t '.title', :default => model_class.model_name.human.titleize
|
4
4
|
|
5
5
|
<%- columns.each do |column| -%>
|
@@ -9,9 +9,8 @@ p
|
|
9
9
|
= @<%= resource_name %>.<%= column.name %>
|
10
10
|
<%- end -%>
|
11
11
|
|
12
|
-
.
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
= 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-danger'
|
12
|
+
= link_to t('.back', :default => t("helpers.links.back")), <%= controller_routing_path %>_path, :class => 'btn btn-default'
|
13
|
+
'
|
14
|
+
= link_to t('.edit', :default => t("helpers.links.edit")), edit_<%= singular_controller_routing_path %>_path(@<%= resource_name %>), :class => 'btn btn-default'
|
15
|
+
'
|
16
|
+
= 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-danger'
|
@@ -1,14 +1,14 @@
|
|
1
1
|
<%%= simple_form_for @<%= resource_name %>, :html => { :class => 'form-horizontal' } do |f| %>
|
2
2
|
<%- columns.each do |column| -%>
|
3
3
|
<%%= f.input :<%= column.name %> %>
|
4
|
+
<%%= error_span(@<%= resource_name %>[:<%= column.name %>]) %>
|
4
5
|
<%- end -%>
|
5
6
|
<%- if ::SimpleForm::FormBuilder.instance_methods.include?(:wrapped_button) -%>
|
6
7
|
<%%= f.button :wrapped, :cancel => <%= controller_routing_path %>_path %>
|
7
8
|
<%- else -%>
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
<%= controller_routing_path %>_path, :class => 'btn' %>
|
12
|
-
</div>
|
9
|
+
|
10
|
+
<%%= f.button :submit, :class => 'btn-primary' %>
|
11
|
+
<%%= link_to t('.cancel', :default => t("helpers.links.cancel")),
|
12
|
+
<%= controller_routing_path %>_path, :class => 'btn btn-default' %>
|
13
13
|
<%- end -%>
|
14
14
|
<%% end %>
|
@@ -1,11 +1,11 @@
|
|
1
1
|
= simple_form_for @<%= resource_name %>, :html => { :class => 'form-horizontal' } do |f|
|
2
2
|
<%- columns.each do |column| -%>
|
3
3
|
= f.input :<%= column.name %>
|
4
|
+
= f.error_span :<%= column.name %>
|
4
5
|
<%- end -%>
|
5
6
|
<%- if ::SimpleForm::FormBuilder.instance_methods.include?(:wrapped_button) -%>
|
6
7
|
= f.button :wrapped, :cancel => <%= controller_routing_path %>_path
|
7
8
|
<%- else -%>
|
8
|
-
.
|
9
|
-
|
10
|
-
= link_to t('.cancel', :default => t("helpers.links.cancel")), <%= controller_routing_path %>_path, :class => 'btn'
|
9
|
+
= f.button :submit, :class => 'btn-primary'
|
10
|
+
= link_to t('.cancel', :default => t("helpers.links.cancel")), <%= controller_routing_path %>_path, :class => 'btn btn-default'
|
11
11
|
<%- end -%>
|
@@ -1,12 +1,12 @@
|
|
1
1
|
= simple_form_for @<%= resource_name %>, :html => { :class => "form-horizontal" } do |f|
|
2
2
|
<%- columns.each do |column| -%>
|
3
3
|
= f.input :<%= column.name %>
|
4
|
+
= error_span(@<%= resource_name %>[:<%= column.name %>])
|
4
5
|
<%- end -%>
|
5
6
|
<%- if ::SimpleForm::FormBuilder.instance_methods.include?(:wrapped_button) -%>
|
6
7
|
= f.button :wrapped, :cancel => <%= controller_routing_path %>_path
|
7
8
|
<%- else -%>
|
8
|
-
.
|
9
|
-
|
10
|
-
|
11
|
-
= link_to t('.cancel', :default => t("helpers.links.cancel")), <%= controller_routing_path %>_path, :class => 'btn'
|
9
|
+
= f.button :submit, :class => 'btn-primary'
|
10
|
+
'
|
11
|
+
= link_to t('.cancel', :default => t("helpers.links.cancel")), <%= controller_routing_path %>_path, :class => 'btn btn-default'
|
12
12
|
<%- end -%>
|
@@ -31,11 +31,11 @@ module Bootstrap
|
|
31
31
|
end
|
32
32
|
|
33
33
|
def controller_routing_path
|
34
|
-
@
|
34
|
+
ActiveModel::Naming.route_key(@model_name.constantize)
|
35
35
|
end
|
36
36
|
|
37
37
|
def singular_controller_routing_path
|
38
|
-
@
|
38
|
+
ActiveModel::Naming.singular_route_key(@model_name.constantize)
|
39
39
|
end
|
40
40
|
|
41
41
|
def model_name
|
@@ -0,0 +1,69 @@
|
|
1
|
+
module Twitter
|
2
|
+
module Bootstrap
|
3
|
+
|
4
|
+
# Keep current method calls as is using aliases
|
5
|
+
module Breadcrumbs
|
6
|
+
extend ActiveSupport::Concern
|
7
|
+
included do
|
8
|
+
# Used to provide compatibility with breadcrumbs-on-rails gem, if detected
|
9
|
+
# breadcrumbs controller methods won't be overridden.
|
10
|
+
if defined?(::BreadcrumbsOnRails)
|
11
|
+
::Rails.logger.info <<-EOT.squish
|
12
|
+
BreadcrumbsOnRails detected it won't be overridden. To use methods from this gem you need to call them
|
13
|
+
using bootstrap prefix i.e. add_bootstrap_breadcrumb and render_bootstrap_breadcrumbs.
|
14
|
+
EOT
|
15
|
+
else
|
16
|
+
# Provide backward compatibility with existing code
|
17
|
+
alias_method :add_breadcrumb, :add_bootstrap_breadcrumb
|
18
|
+
class << self
|
19
|
+
alias_method :add_breadcrumb, :add_bootstrap_breadcrumb
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
module ClassMethods
|
25
|
+
def add_bootstrap_breadcrumb(name, url = '', options = {})
|
26
|
+
options.merge! :klass => self.name
|
27
|
+
before_filter options do |controller|
|
28
|
+
controller.send :add_bootstrap_breadcrumb, name, url, options
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
|
33
|
+
protected
|
34
|
+
|
35
|
+
def add_bootstrap_breadcrumb(name, url = '', options = {})
|
36
|
+
@__bs_breadcrumbs ||= []
|
37
|
+
|
38
|
+
class_name = options.delete(:klass) || self.class.name
|
39
|
+
|
40
|
+
if name.is_a? Symbol
|
41
|
+
if url.blank?
|
42
|
+
url_helper = :"#{name}_path"
|
43
|
+
url = url_helper if respond_to?(url_helper)
|
44
|
+
end
|
45
|
+
|
46
|
+
name = translate_breadcrumb name, class_name
|
47
|
+
end
|
48
|
+
|
49
|
+
unless name.is_a? String
|
50
|
+
url = polymorphic_path name if url.blank?
|
51
|
+
name = name.to_s
|
52
|
+
end
|
53
|
+
|
54
|
+
url = eval(url.to_s) if url.is_a?(Symbol) && url =~ /_path|_url|@/
|
55
|
+
|
56
|
+
@__bs_breadcrumbs << {:name => name, :url => url, :options => options}
|
57
|
+
end
|
58
|
+
|
59
|
+
def translate_breadcrumb(name, class_name)
|
60
|
+
scope = [:breadcrumbs]
|
61
|
+
namespace = class_name.underscore.split('/')
|
62
|
+
namespace.last.sub!('_controller', '')
|
63
|
+
scope += namespace
|
64
|
+
|
65
|
+
I18n.t name, :scope => scope
|
66
|
+
end
|
67
|
+
end
|
68
|
+
end
|
69
|
+
end
|