twitter-bootstrap-rails 2.0 → 2.0.1.0
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 +31 -37
- data/Rakefile +11 -0
- data/lib/generators/bootstrap/install/install_generator.rb +37 -13
- data/lib/generators/bootstrap/install/templates/application.css +0 -1
- data/lib/generators/bootstrap/install/templates/bootstrap.coffee +6 -15
- data/lib/generators/bootstrap/install/templates/bootstrap_and_overrides.less +13 -0
- data/lib/generators/bootstrap/layout/layout_generator.rb +4 -4
- data/lib/generators/bootstrap/layout/templates/layout.html.erb +96 -49
- data/lib/generators/bootstrap/layout/templates/layout.html.haml +76 -0
- data/lib/generators/bootstrap/layout/templates/layout.html.slim +77 -0
- data/lib/generators/bootstrap/themed/templates/_form.html.erb +5 -4
- data/lib/generators/bootstrap/themed/templates/_form.html.haml +11 -0
- data/lib/generators/bootstrap/themed/templates/_form.html.slim +11 -0
- data/lib/generators/bootstrap/themed/templates/edit.html.erb +1 -2
- data/lib/generators/bootstrap/themed/templates/edit.html.haml +3 -0
- data/lib/generators/bootstrap/themed/templates/edit.html.slim +3 -0
- data/lib/generators/bootstrap/themed/templates/index.html.erb +27 -28
- data/lib/generators/bootstrap/themed/templates/index.html.haml +25 -0
- data/lib/generators/bootstrap/themed/templates/index.html.slim +25 -0
- data/lib/generators/bootstrap/themed/templates/new.html.haml +2 -0
- data/lib/generators/bootstrap/themed/templates/new.html.slim +2 -0
- data/lib/generators/bootstrap/themed/templates/show.html.erb +5 -4
- data/lib/generators/bootstrap/themed/templates/show.html.haml +9 -0
- data/lib/generators/bootstrap/themed/templates/show.html.slim +9 -0
- data/lib/generators/bootstrap/themed/themed_generator.rb +13 -13
- data/lib/twitter/bootstrap/rails/version.rb +1 -1
- data/vendor/assets/images/twitter/bootstrap/glyphicons-halflings-white.png +0 -0
- data/vendor/assets/images/twitter/bootstrap/glyphicons-halflings.png +0 -0
- data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-alert.js +16 -7
- data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-button.js +3 -3
- data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-carousel.js +7 -4
- data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-collapse.js +7 -5
- data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-dropdown.js +16 -7
- data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-modal.js +12 -7
- data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-popover.js +5 -5
- data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-scrollspy.js +4 -3
- data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-tab.js +11 -6
- 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 +40 -21
- data/vendor/toolkit/twitter/bootstrap/accordion.less +5 -4
- data/vendor/toolkit/twitter/bootstrap/alerts.less +1 -0
- data/vendor/toolkit/twitter/bootstrap/bootstrap.less +10 -8
- data/vendor/toolkit/twitter/bootstrap/breadcrumbs.less +1 -1
- data/vendor/toolkit/twitter/bootstrap/button-groups.less +49 -17
- data/vendor/toolkit/twitter/bootstrap/buttons.less +156 -89
- data/vendor/toolkit/twitter/bootstrap/carousel.less +12 -5
- data/vendor/toolkit/twitter/bootstrap/code.less +57 -0
- data/vendor/toolkit/twitter/bootstrap/dropdowns.less +24 -4
- data/vendor/toolkit/twitter/bootstrap/forms.less +117 -91
- data/vendor/toolkit/twitter/bootstrap/grid.less +8 -0
- data/vendor/toolkit/twitter/bootstrap/hero-unit.less +20 -0
- data/vendor/toolkit/twitter/bootstrap/labels.less +23 -7
- data/vendor/toolkit/twitter/bootstrap/layouts.less +17 -0
- data/vendor/toolkit/twitter/bootstrap/mixins.less +253 -36
- data/vendor/toolkit/twitter/bootstrap/modals.less +20 -2
- data/vendor/toolkit/twitter/bootstrap/navbar.less +82 -34
- data/vendor/toolkit/twitter/bootstrap/navs.less +87 -72
- data/vendor/toolkit/twitter/bootstrap/pager.less +7 -2
- data/vendor/toolkit/twitter/bootstrap/pagination.less +1 -0
- data/vendor/toolkit/twitter/bootstrap/popovers.less +25 -25
- data/vendor/toolkit/twitter/bootstrap/progress-bars.less +14 -18
- data/vendor/toolkit/twitter/bootstrap/reset.less +3 -4
- data/vendor/toolkit/twitter/bootstrap/responsive.less +224 -165
- data/vendor/toolkit/twitter/bootstrap/scaffolding.less +6 -89
- data/vendor/toolkit/twitter/bootstrap/sprites.less +139 -99
- data/vendor/toolkit/twitter/bootstrap/tables.less +15 -57
- data/vendor/toolkit/twitter/bootstrap/thumbnails.less +4 -2
- data/vendor/toolkit/twitter/bootstrap/type.less +15 -44
- data/vendor/toolkit/twitter/bootstrap/variables.less +38 -21
- data/vendor/toolkit/twitter/bootstrap_base.less +2 -0
- metadata +36 -21
- data/lib/generators/bootstrap/install/templates/bootstrap.less +0 -5
- data/vendor/assets/stylesheets/twitter/bootstrap.css.less +0 -1
- data/vendor/toolkit/twitter/bootstrap.less +0 -1
- data/vendor/toolkit/twitter/bootstrap/patterns.less +0 -30
- data/vendor/toolkit/twitter/bootstrap/print.less +0 -18
data/README.md
CHANGED
@@ -1,9 +1,10 @@
|
|
1
|
-
# Twitter Bootstrap for Rails 3.
|
1
|
+
# Twitter Bootstrap for Rails 3.1 Asset Pipeline
|
2
2
|
Bootstrap is a toolkit from Twitter designed to kickstart development of webapps and sites. It includes base CSS and HTML for typography, forms, buttons, tables, grids, navigation, and more.
|
3
3
|
|
4
|
+
twitter-bootstrap-rails project integrates Bootstrap CSS toolkit for Rails 3.1 Asset Pipeline (Rails 3.2 supported)
|
4
5
|
|
5
|
-
twitter-bootstrap-rails
|
6
|
-
|
6
|
+
[![Build Status](https://secure.travis-ci.org/seyhunak/twitter-bootstrap-rails.png)](http://travis-ci.org/seyhunak/twitter-bootstrap-rails)
|
7
|
+
[![Dependency Status](https://gemnasium.com/seyhunak/twitter-bootstrap-rails.png)](https://gemnasium.com/seyhunak/twitter-bootstrap-rails)
|
7
8
|
|
8
9
|
## Installing Gem
|
9
10
|
|
@@ -20,6 +21,10 @@ You can run bundle from command line
|
|
20
21
|
bundle install
|
21
22
|
|
22
23
|
|
24
|
+
## Gem Version
|
25
|
+
twitter-bootstrap-rails v2.0.1.0 (Gem Version 0 with Twitter Bootstrap V.2.0.1)
|
26
|
+
|
27
|
+
|
23
28
|
## Installing to App (using Generators)
|
24
29
|
|
25
30
|
You can run following generators to get started with Twitter Bootstrap quickly.
|
@@ -34,13 +39,13 @@ Usage:
|
|
34
39
|
rails g bootstrap:install
|
35
40
|
|
36
41
|
|
37
|
-
Layout (generates Twitter Bootstrap compatible layout
|
42
|
+
Layout (generates Twitter Bootstrap compatible layout) - (Haml and Slim supported)
|
38
43
|
|
39
44
|
|
40
45
|
Usage:
|
41
46
|
|
42
47
|
|
43
|
-
rails g bootstrap:layout [LAYOUT_NAME] [*fixed or fluid]
|
48
|
+
rails g bootstrap:layout [LAYOUT_NAME] [*fixed or fluid]
|
44
49
|
|
45
50
|
|
46
51
|
Example:
|
@@ -49,19 +54,20 @@ Example:
|
|
49
54
|
rails g bootstrap:layout application fixed
|
50
55
|
|
51
56
|
|
52
|
-
Themed (generates Twitter Bootstrap compatible scaffold views.)
|
57
|
+
Themed (generates Twitter Bootstrap compatible scaffold views.) - (Haml and Slim supported)
|
53
58
|
|
54
59
|
|
55
60
|
Usage:
|
56
61
|
|
57
62
|
|
58
|
-
rails g bootstrap:themed [RESOURCE_NAME]
|
63
|
+
rails g bootstrap:themed [RESOURCE_NAME]
|
59
64
|
|
60
65
|
|
61
66
|
Example:
|
62
67
|
|
63
68
|
|
64
69
|
rails g scaffold post title:string description:text
|
70
|
+
rake db:migrate
|
65
71
|
rails g bootstrap:themed posts
|
66
72
|
|
67
73
|
|
@@ -72,22 +78,20 @@ Bootstrap was built with Preboot, an open-source pack of mixins and variables to
|
|
72
78
|
|
73
79
|
## Using stylesheets with Less
|
74
80
|
|
75
|
-
You have to require Bootstrap LESS (
|
81
|
+
You have to require Bootstrap LESS (bootstrap_and_overrides.css.less) in your application.css
|
76
82
|
|
77
83
|
/*
|
78
|
-
*= require
|
79
|
-
|
84
|
+
*= require bootstrap_and_overrides
|
85
|
+
*/
|
80
86
|
|
81
87
|
/* Your stylesheets goes here... */
|
82
88
|
|
83
89
|
|
84
|
-
|
90
|
+
If you'd like to alter Bootstrap's own variables, or define your LESS
|
91
|
+
styles inheriting Bootstrap's mixins, you can do so inside bootstrap_and_overrides.css.less:
|
85
92
|
|
86
|
-
|
93
|
+
@linkColor: #ff0000;
|
87
94
|
|
88
|
-
// Baseline grid
|
89
|
-
@basefont: 13px;
|
90
|
-
@baseline: 18px;
|
91
95
|
|
92
96
|
|
93
97
|
## Using Javascripts
|
@@ -107,28 +111,10 @@ Using Twitter Bootstrap with the CoffeeScript is easy.
|
|
107
111
|
twitter-bootstrap-rails generates a "bootstrap.js.coffee" file for you
|
108
112
|
to /app/assets/javascripts/ folder.
|
109
113
|
|
110
|
-
|
111
|
-
$("
|
112
|
-
|
113
|
-
$("
|
114
|
-
$ ->
|
115
|
-
$(".carousel").carousel()
|
116
|
-
$ ->
|
117
|
-
$(".collapse").collapse()
|
118
|
-
$ ->
|
119
|
-
$(".dropdown-toggle").dropdown()
|
120
|
-
$ ->
|
121
|
-
$("#myModal").modal options
|
122
|
-
$ ->
|
123
|
-
$("#example").popover options
|
124
|
-
$ ->
|
125
|
-
$("#navbar").scrollspy()
|
126
|
-
$ ->
|
127
|
-
$("#myTab").tab "show"
|
128
|
-
$ ->
|
129
|
-
$("#example").tooltip options
|
130
|
-
$ ->
|
131
|
-
$(".typeahead").typeahead()
|
114
|
+
jQuery ->
|
115
|
+
$("a[rel=popover]").popover()
|
116
|
+
$(".tooltip").tooltip()
|
117
|
+
$("a[rel=tooltip]").tooltip()
|
132
118
|
|
133
119
|
|
134
120
|
## Using Static CSS, JS (w/o Less)
|
@@ -159,6 +145,11 @@ twitter-bootstrap-rails has seperate branch (w/o Less) that just serves latest s
|
|
159
145
|
<li>Added new generators (install, layout and themed)</li>
|
160
146
|
<li>Compability to Rails 3.2</li>
|
161
147
|
<li>Transitioning to 2.0</li>
|
148
|
+
<li>Released gem v.2.0rc0</li>
|
149
|
+
<li>Added Haml and Slim support</li>
|
150
|
+
<li>Added Responsive layout support</li>
|
151
|
+
<li>Fixes and release 2.0.0</li>
|
152
|
+
<li>Updated to v2.0.1, versioned v2.0.1.0</li>
|
162
153
|
</ul>
|
163
154
|
|
164
155
|
|
@@ -173,6 +164,8 @@ twitter-bootstrap-rails has seperate branch (w/o Less) that just serves latest s
|
|
173
164
|
<li>Colin Warren</li>
|
174
165
|
<li>Giovanni Cappellotto</li>
|
175
166
|
<li>Masakuni Kato</li>
|
167
|
+
<li>Gudleik Rasch</li>
|
168
|
+
<li>Thomas Volkmar Worm</li>
|
176
169
|
</ul>
|
177
170
|
|
178
171
|
|
@@ -187,6 +180,7 @@ twitter-bootstrap-rails has seperate branch (w/o Less) that just serves latest s
|
|
187
180
|
Seyhun Akyürek - seyhunak [at] gmail com
|
188
181
|
|
189
182
|
[Follow me on Twitter](http://twitter.com/seyhunak "Twitter")
|
183
|
+
|
190
184
|
[Follow me on Google+](http://plus.ly/seyhunak "Google+")
|
191
185
|
|
192
186
|
|
data/Rakefile
CHANGED
@@ -1,3 +1,14 @@
|
|
1
|
+
#!/usr/bin/env rake
|
1
2
|
require 'bundler'
|
2
3
|
Bundler::GemHelper.install_tasks
|
3
4
|
|
5
|
+
desc "Bundle the gem"
|
6
|
+
task :bundle do
|
7
|
+
sh('bundle install')
|
8
|
+
sh 'gem build *.gemspec'
|
9
|
+
sh 'gem install *.gem'
|
10
|
+
sh 'rm *.gem'
|
11
|
+
end
|
12
|
+
|
13
|
+
task(:default).clear
|
14
|
+
task :default => :bundle
|
@@ -2,26 +2,50 @@ require 'rails/generators'
|
|
2
2
|
|
3
3
|
module Bootstrap
|
4
4
|
module Generators
|
5
|
-
class InstallGenerator < Rails::Generators::Base
|
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,22 +1,13 @@
|
|
1
|
-
|
1
|
+
jQuery ->
|
2
2
|
$(".alert-message").alert()
|
3
|
-
$ ->
|
4
3
|
$(".tabs").button()
|
5
|
-
$ ->
|
6
4
|
$(".carousel").carousel()
|
7
|
-
$ ->
|
8
5
|
$(".collapse").collapse()
|
9
|
-
$ ->
|
10
6
|
$(".dropdown-toggle").dropdown()
|
11
|
-
$
|
12
|
-
$("
|
13
|
-
$ ->
|
14
|
-
$("a[rel]").popover
|
15
|
-
$ ->
|
7
|
+
$(".modal").modal()
|
8
|
+
$("a[rel=popover]").popover()
|
16
9
|
$(".navbar").scrollspy()
|
17
|
-
$ ->
|
18
10
|
$(".tab").tab "show"
|
19
|
-
$
|
20
|
-
$(".
|
21
|
-
$
|
22
|
-
$(".typeahead").typeahead()
|
11
|
+
$(".tooltip").tooltip()
|
12
|
+
$(".typeahead").typeahead()
|
13
|
+
$("a[rel=tooltip]").tooltip()
|
@@ -0,0 +1,13 @@
|
|
1
|
+
@import "twitter/bootstrap/bootstrap";
|
2
|
+
@import "twitter/bootstrap/responsive";
|
3
|
+
|
4
|
+
// Your custom LESS stylesheets goes here
|
5
|
+
//
|
6
|
+
// Since bootstrap was imported above you have access to its mixins which
|
7
|
+
// you may use and inherit here
|
8
|
+
//
|
9
|
+
// If you'd like to override bootstrap's own variables, you can do so here as well
|
10
|
+
// See http://twitter.github.com/bootstrap/less.html for their names and documentation
|
11
|
+
//
|
12
|
+
// Example:
|
13
|
+
// @linkColor: #ff0000;
|
@@ -2,9 +2,9 @@ require 'rails/generators'
|
|
2
2
|
|
3
3
|
module Bootstrap
|
4
4
|
module Generators
|
5
|
-
class LayoutGenerator < Rails::Generators::Base
|
5
|
+
class LayoutGenerator < ::Rails::Generators::Base
|
6
6
|
source_root File.expand_path("../templates", __FILE__)
|
7
|
-
desc "This generator
|
7
|
+
desc "This generator generates layout file with navigation."
|
8
8
|
argument :layout_name, :type => :string, :default => "application"
|
9
9
|
argument :layout_type, :type => :string, :default => "fixed",
|
10
10
|
:banner => "*fixed or fluid"
|
@@ -12,11 +12,11 @@ module Bootstrap
|
|
12
12
|
attr_reader :app_name, :container_class
|
13
13
|
|
14
14
|
def generate_layout
|
15
|
-
app = Rails.application
|
15
|
+
app = ::Rails.application
|
16
16
|
@app_name = app.class.to_s.split("::").first
|
17
17
|
@container_class = layout_type == "fluid" ? "container-fluid" : "container"
|
18
18
|
ext = app.config.generators.options[:rails][:template_engine] || :erb
|
19
|
-
template "layout.html
|
19
|
+
template "layout.html.#{ext}", "app/views/layouts/#{layout_name}.html.#{ext}"
|
20
20
|
end
|
21
21
|
end
|
22
22
|
end
|
@@ -1,57 +1,104 @@
|
|
1
1
|
<!DOCTYPE html>
|
2
|
-
<html>
|
3
|
-
<head>
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
2
|
+
<html lang="en">
|
3
|
+
<head>
|
4
|
+
<meta charset="utf-8">
|
5
|
+
<title><%= app_name %></title>
|
6
|
+
<%%= csrf_meta_tags %>
|
7
|
+
|
8
|
+
<!-- Le HTML5 shim, for IE6-8 support of HTML elements -->
|
9
|
+
<!--[if lt IE 9]>
|
10
|
+
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js" type="text/javascript"></script>
|
11
|
+
<![endif]-->
|
12
|
+
|
13
|
+
<!-- Le styles -->
|
14
|
+
<style>
|
15
|
+
body {
|
16
|
+
padding-top: 60px; /* 60px to make the container go all the way to the bottom of the topbar */
|
17
|
+
}
|
18
|
+
</style>
|
19
|
+
<%%= stylesheet_link_tag "application", :media => "all" %>
|
20
|
+
|
21
|
+
<!-- Le fav and touch icons -->
|
22
|
+
<link href="images/favicon.ico" rel="shortcut icon">
|
23
|
+
<link href="images/apple-touch-icon.png" rel="apple-touch-icon">
|
24
|
+
<link href="images/apple-touch-icon-72x72.png" rel="apple-touch-icon" sizes="72x72">
|
25
|
+
<link href="images/apple-touch-icon-114x114.png" rel="apple-touch-icon" sizes="114x114">
|
26
|
+
</head>
|
27
|
+
<body>
|
28
|
+
|
29
|
+
<div class="navbar navbar-fixed-top">
|
30
|
+
<div class="navbar-inner">
|
31
|
+
<%- if layout_type == "fluid" -%>
|
32
|
+
<div class="container-fluid">
|
33
|
+
<%- else -%>
|
34
|
+
<div class="container">
|
17
35
|
<%- end -%>
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
</
|
36
|
+
<a class="btn btn-navbar" data-target=".nav-collapse" data-toggle="collapse">
|
37
|
+
<span class="icon-bar"></span>
|
38
|
+
<span class="icon-bar"></span>
|
39
|
+
<span class="icon-bar"></span>
|
40
|
+
</a>
|
41
|
+
<a class="brand" href="#"><%= app_name %></a>
|
42
|
+
<div class="<%= container_class %> nav-collapse">
|
43
|
+
<ul class="nav">
|
44
|
+
<%- (1..3).each do |i| -%>
|
45
|
+
<li><%%= link_to "Link<%= i %>", "/path<%= i %>" %></li>
|
46
|
+
<%- end -%>
|
47
|
+
</ul>
|
48
|
+
</div><!--/.nav-collapse -->
|
49
|
+
</div>
|
32
50
|
</div>
|
33
51
|
</div>
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
52
|
+
|
53
|
+
<div class="<%= container_class %>">
|
54
|
+
<%- if layout_type == "fluid" -%>
|
55
|
+
<div class="row-fluid">
|
56
|
+
<div class="span3">
|
57
|
+
<div class="well sidebar-nav">
|
58
|
+
<ul class="nav nav-list">
|
59
|
+
<li class="nav-header">Sidebar</li>
|
60
|
+
<%- (1..3).each do |i| -%>
|
61
|
+
<li><%%= link_to "Link<%= i %>", "/path<%= i %>" %></li>
|
62
|
+
<%- end -%>
|
63
|
+
</ul>
|
64
|
+
</div><!--/.well -->
|
65
|
+
</div><!--/span-->
|
66
|
+
<div class="span9">
|
41
67
|
<%%= yield %>
|
42
68
|
</div>
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
<
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
69
|
+
</div><!--/row-->
|
70
|
+
<%- else -%>
|
71
|
+
<div class="content">
|
72
|
+
<div class="row">
|
73
|
+
<div class="span9">
|
74
|
+
<%%= yield %>
|
75
|
+
</div>
|
76
|
+
<div class="span1"> </div>
|
77
|
+
<div class="span3">
|
78
|
+
<div class="well sidebar-nav">
|
79
|
+
<h3>Sidebar</h3>
|
80
|
+
<ul class="nav nav-list">
|
81
|
+
<li class="nav-header">Sidebar</li>
|
82
|
+
<%- (1..3).each do |i| -%>
|
83
|
+
<li><%%= link_to "Link<%= i %>", "/path<%= i %>" %></li>
|
84
|
+
<%- end -%>
|
85
|
+
</ul>
|
86
|
+
</div>
|
87
|
+
</div>
|
88
|
+
</div>
|
51
89
|
</div>
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
</
|
90
|
+
<%- end -%>
|
91
|
+
|
92
|
+
<footer>
|
93
|
+
<p>© Company 2012</p>
|
94
|
+
</footer>
|
95
|
+
|
96
|
+
</div> <!-- /container -->
|
97
|
+
|
98
|
+
<!-- Le javascript
|
99
|
+
================================================== -->
|
100
|
+
<!-- Placed at the end of the document so the pages load faster -->
|
101
|
+
<%%= javascript_include_tag "application" %>
|
102
|
+
|
103
|
+
</body>
|
57
104
|
</html>
|