bootstrap-view-helpers 0.0.6 → 0.0.7

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -31,6 +31,15 @@ compatibility will be broken until things settle down.
31
31
 
32
32
  ## Installation
33
33
 
34
+ ### Bootstrap Requirement
35
+
36
+ *Bootstrap is required in your application, but bootstrap-view-helpers does not
37
+ enforce this. You are responsible for Bootstrap being present in your application.*
38
+
39
+ There are gems for this including [bootstrap-sass](https://github.com/thomas-mcdonald/bootstrap-sass).
40
+
41
+ ### Installing bootstrap-view-helpers
42
+
34
43
  Add it to your Gemfile:
35
44
 
36
45
  ```ruby
@@ -43,6 +52,12 @@ Run bundler:
43
52
  bundle install
44
53
  ```
45
54
 
55
+ See working examples served up in your application (assuming you have Bootstrap):
56
+
57
+ ```
58
+ http://<your app>/bootstrap_view_helpers
59
+ ```
60
+
46
61
  ## API Documentation
47
62
 
48
63
  Complete [API documentation](http://rubydoc.info/gems/bootstrap-view-helpers/frames/file/README.md) at [RubyGems.org](https://rubygems.org/).
@@ -69,8 +84,8 @@ Complete [API documentation](http://rubydoc.info/gems/bootstrap-view-helpers/fra
69
84
  <%= dropdown_item('One', 'foo')%>
70
85
  <% end %>
71
86
 
72
- <% end %>
73
- <% end %>
87
+ <% end %>
88
+ <% end %>
74
89
  ```
75
90
 
76
91
  #### Navigation List (sidebar)
@@ -0,0 +1,28 @@
1
+ .bs-docs-example
2
+ {
3
+ position: relative;
4
+ margin: 15px 0;
5
+ padding: 39px 19px 14px;
6
+ background-color: white;
7
+ border: 1px solid #DDD;
8
+ -webkit-border-radius: 4px;
9
+ -moz-border-radius: 4px;
10
+ border-radius: 4px;
11
+ }
12
+
13
+ .bs-docs-example::after
14
+ {
15
+ content: "Example";
16
+ position: absolute;
17
+ top: -1px;
18
+ left: -1px;
19
+ padding: 3px 7px;
20
+ font-size: 12px;
21
+ font-weight: bold;
22
+ background-color: whiteSmoke;
23
+ border: 1px solid #DDD;
24
+ color: #9DA0A4;
25
+ -webkit-border-radius: 4px 0 4px 0;
26
+ -moz-border-radius: 4px 0 4px 0;
27
+ border-radius: 4px 0 4px 0;
28
+ }
@@ -1,6 +1,7 @@
1
- # @private
2
1
  class BootstrapViewHelpersController < ApplicationController
2
+ layout 'bootstrap_view_helpers'
3
3
 
4
4
  def index
5
5
  end
6
+
6
7
  end
@@ -44,8 +44,8 @@ module Bootstrap::AccordionHelper
44
44
  options = canonicalize_options(options)
45
45
  open = options.delete(:open)
46
46
 
47
- options = ensure_accordion_group_id(options)
48
- @accordion_group_id = options[:id]
47
+ # options = ensure_accordion_group_id(options)
48
+ @accordion_group_id = get_next_group_id
49
49
 
50
50
  options = ensure_class(options, 'accordion-group')
51
51
 
@@ -74,6 +74,8 @@ module Bootstrap::AccordionHelper
74
74
  end
75
75
 
76
76
  def ensure_accordion_id(options)
77
+ @accordion_group_number = 0
78
+
77
79
  if options.has_key?(:id)
78
80
  options
79
81
  else
@@ -84,14 +86,19 @@ module Bootstrap::AccordionHelper
84
86
  end
85
87
  end
86
88
 
87
- def ensure_accordion_group_id(options)
88
- if options.has_key?(:id)
89
- options
90
- else
91
- @accordion_group_number = @accordion_group_number.to_i + 1
92
- options.dup.tap do |h|
93
- h[:id] = "#{@accordion_id}-group-#{@accordion_group_number}"
94
- end
95
- end
89
+ def get_next_group_id
90
+ @accordion_group_number = @accordion_group_number + 1
91
+ "#{@accordion_id}-group-#{@accordion_group_number}"
96
92
  end
93
+
94
+ # def ensure_accordion_group_id(options)
95
+ # if options.has_key?(:id)
96
+ # options
97
+ # else
98
+ # @accordion_group_number = @accordion_group_number.to_i + 1
99
+ # options.dup.tap do |h|
100
+ # h[:id] = "#{@accordion_id}-group-#{@accordion_group_number}"
101
+ # end
102
+ # end
103
+ # end
97
104
  end
@@ -33,7 +33,7 @@ class Bootstrap::IconRenderer
33
33
 
34
34
  def process_icon_type
35
35
  icon_type = args.shift.presence or raise(ArgumentError, "must pass an icon type")
36
- icon_class = icon_type == 'blank' ? 'icon-search' : "icon-#{icon_type}"
36
+ icon_class = icon_type == 'blank' ? 'icon-search' : "icon-#{icon_type.gsub("_", "-")}"
37
37
  self.options = ensure_class(self.options, icon_class)
38
38
 
39
39
  if icon_type == 'blank'
@@ -0,0 +1,15 @@
1
+ module BootstrapExamples::ApplicationHelper
2
+
3
+ def bvh_show_source(path)
4
+ erb = IO.read(bvh_view_dir.join("#{path}.html.erb"))
5
+ content_tag(:pre, erb)
6
+ end
7
+
8
+ private
9
+
10
+ def bvh_view_dir
11
+ Rails.root.join('../../app/views')
12
+ end
13
+
14
+ end
15
+
@@ -0,0 +1,14 @@
1
+ <%= nav_bar do %>
2
+
3
+ <%= brand('Bootstrap View Helpers', url: bvh_path)%>
4
+
5
+ <%= nav_bar_links do %>
6
+ <%= nav_bar_link('Active', '#', active: true) %>
7
+ <%= nav_bar_link('Link1', '/link1') %>
8
+ <%= nav_bar_divider %>
9
+ <%= nav_dropdown('Foo') do %>
10
+ <%= dropdown_item('One', 'foo') %>
11
+ <% end %>
12
+ <% end %>
13
+
14
+ <% end %>
@@ -0,0 +1,11 @@
1
+ <%= nav_list do %>
2
+
3
+ <%= nav_list_header('Sidebar Header') %>
4
+
5
+ <%= dropdown_item('Icons', bvh_path('icons')) %>
6
+ <%= dropdown_item('Buttons', bvh_path('buttons')) %>
7
+ <%= dropdown_item('Labels and badges', bvh_path('labels_and_badges')) %>
8
+ <%= dropdown_item('Accordions', bvh_path('accordions')) %>
9
+ <%= dropdown_item('Form helpers', bvh_path('form_helpers')) %>
10
+
11
+ <% end %>
@@ -0,0 +1,15 @@
1
+ <%= accordion do %>
2
+
3
+ <%= accordion_group('Collapsible Group Item #1') do %>
4
+ One
5
+ <% end %>
6
+
7
+ <%= accordion_group('Collapsible Group Item #2', open: true) do %>
8
+ Two
9
+ <% end %>
10
+
11
+ <%= accordion_group('Collapsible Group Item #3') do %>
12
+ Three
13
+ <% end %>
14
+
15
+ <% end %>
@@ -0,0 +1,14 @@
1
+ <%= form_tag do %>
2
+
3
+ <p>
4
+ <label>Field
5
+ <%= text_field_tag(:fieldname) %>
6
+ </label>
7
+ </p>
8
+
9
+ <div class='form-actions'>
10
+ <%= submit_button_tag %>
11
+ <%= cancel_button_tag(url: '#') %>
12
+ </div>
13
+
14
+ <% end %>
@@ -0,0 +1,15 @@
1
+ <p>
2
+ <%= icon(:heart)%>
3
+ </p>
4
+
5
+ <p>
6
+ <%= icon(:glass, 'Glass') %>
7
+ </p>
8
+
9
+ <p>
10
+ <%= icon(:blank, '"Blank" icon') %>
11
+ </p>
12
+
13
+ <p>
14
+ <%= stamp( icon(:search, :white, 'Search') ) %>
15
+ </p>
@@ -0,0 +1,13 @@
1
+ <h1>Accordions</h1>
2
+
3
+ <p>
4
+ <%=link_to 'Bootstrap Documentation', 'http://twitter.github.io/bootstrap/javascript.html#collapse' %>
5
+ <br>
6
+ <%= link_to('API Documentation', 'http://rubydoc.info/gems/bootstrap-view-helpers/Bootstrap/AccordionHelper') %>
7
+ </p>
8
+
9
+ <h2>Example</h2>
10
+ <%= render partial: 'accordions' %>
11
+
12
+ <h2>Source</2>
13
+ <%= bvh_show_source('bootstrap_view_helpers/_accordions') %>
@@ -0,0 +1,204 @@
1
+ <h1>Buttons</h1>
2
+
3
+ <p>
4
+ <%= link_to('Bootstrap Documentation', 'http://twitter.github.io/bootstrap/base-css.html#buttons') %>
5
+ <br>
6
+ <%= link_to('API Documentation', 'http://rubydoc.info/gems/bootstrap-view-helpers/Bootstrap/ButtonHelper') %>
7
+ </p>
8
+
9
+ <h2>Default Buttons</h2>
10
+
11
+ <table class='table table-bordered table-striped'>
12
+ <thead>
13
+ <tr>
14
+ <th width="125px"> Button</th>
15
+ <th> Code</th>
16
+ </th>
17
+ </thead>
18
+ <tbody>
19
+ <tr>
20
+ <td><%= button('Default') %></td>
21
+ <td>
22
+ <code>button('Default')</code>
23
+ </td>
24
+ </tr>
25
+ <tr>
26
+ <td><%= button('Success', :success) %></td>
27
+ <td>
28
+ <code>button('Success', :success) </code>
29
+ </td>
30
+ </tr>
31
+ <tr>
32
+ <td><%= button('Warning', :warning) %></td>
33
+ <td>
34
+ <code>button('Warning', :warning)</code>
35
+ </td>
36
+ </tr>
37
+ <tr>
38
+ <td><%= button('Danger', :danger) %></td>
39
+ <td>
40
+ <code>button('Danger', :danger)</code>
41
+ </td>
42
+ </tr>
43
+ <tr>
44
+ <td><%= button('Info', :info) %></td>
45
+ <td>
46
+ <code>button('Info', :info)</code>
47
+ </td>
48
+ </tr>
49
+ <tr>
50
+ <td><%= button('Inverse', :inverse) %></td>
51
+ <td>
52
+ <code>button('Inverse', :inverse)</code>
53
+ </td>
54
+ </tr>
55
+ <tr>
56
+ <td> Options
57
+ <td>
58
+ <code>button('Success', :success, id: 'success-label', key: 'value')</code>
59
+ </td>
60
+ </tr>
61
+
62
+ <tr>
63
+ <td><%= button('Link as button', url: '/somewhere') %></td>
64
+ <td>
65
+ <code>button('Link as button', url: '/somewhere')</code>
66
+ </td>
67
+ </tr>
68
+
69
+ <tr>
70
+ <td><%= button('Button as a link', :link) %></td>
71
+ <td>
72
+ <code>button('Button as a link', :link)</code>
73
+ </td>
74
+ </tr>
75
+ </tbody>
76
+ </table>
77
+
78
+ <h2>Button Sizes</h2>
79
+
80
+ <table class='table table-bordered table-striped'>
81
+ <thead>
82
+ <tr>
83
+ <th width="125px">Button</th>
84
+ <th>Code</th>
85
+ </th>
86
+ </thead>
87
+ <tbody>
88
+ <tr>
89
+ <td><%= button('Large', :large) %></td>
90
+ <td>
91
+ <code>button('Large', :large)</code>
92
+ </td>
93
+ </tr>
94
+ <tr>
95
+ <td><%= button('Default') %></td>
96
+ <td>
97
+ <code>button('Default')</code>
98
+ </td>
99
+ </tr>
100
+ <tr>
101
+ <td><%= button('Small', :small) %></td>
102
+ <td>
103
+ <code>button('Small', :small)</code>
104
+ </td>
105
+ </tr>
106
+ <tr>
107
+ <td><%= button('Mini', :mini) %></td>
108
+ <td>
109
+ <code>button('Mini', :mini)</code>
110
+ </td>
111
+ </tr>
112
+ <tr>
113
+ <td><%= button('Block', :block) %></td>
114
+ <td>
115
+ <code>button('Block', :block) # (occupies 100% width of container)</code>
116
+ </td>
117
+ </tr>
118
+ <tr>
119
+ <td><%= button('Small Info', :small, :info) %></td>
120
+ <td>
121
+ <code>button('Small Info', :small, :info)</code>
122
+ </td>
123
+ </tr>
124
+ </tbody>
125
+ </table>
126
+
127
+ <h2>Button Bars and Button Groups</h2>
128
+
129
+ <p><%= link_to('Bootstrap Documentation', 'http://twitter.github.io/bootstrap/components.html#buttonGroups') %>
130
+
131
+ <div class="bs-docs-example">
132
+ <%= button_group do %>
133
+ <%= button('Left') %>
134
+ <%= button('Middle') %>
135
+ <%= button('Right') %>
136
+ <% end %>
137
+
138
+ <br><br>
139
+
140
+ <pre>
141
+ <%%= button_group do %>
142
+ <%%= button('Left') %>
143
+ <%%= button('Middle') %>
144
+ <%%= button('Right') %>
145
+ <%% end %>
146
+ </pre>
147
+ </div>
148
+
149
+ <br>
150
+
151
+ <div class<="bs-docs-example">
152
+ <%= button_toolbar do %>
153
+ <%= button('One', :primary) %>
154
+ <%= button_group do %>
155
+ <%= button('Two', :info) %>
156
+ <%= button('Three', :info) %>
157
+ <% end %>
158
+ <%= button('Four', :danger) %>
159
+ <% end %>
160
+
161
+ <pre>
162
+ <%%= button_toolbar do %>
163
+ <%%= button('One', :primary) %>
164
+ <%%= button_group do %>
165
+ <%%= button('Two', :info) %>
166
+ <%%= button('Three', :info) %>
167
+ <%% end>
168
+ <%%= button('Four', :danger) %>
169
+ <%% end %>
170
+ </pre>
171
+ </div>
172
+
173
+ <h2>Button Dropdowns</h2>
174
+ <p><%= link_to('Bootstrap Documentation', 'http://twitter.github.io/bootstrap/components.html#buttonDropdowns') %>
175
+
176
+ <div class="bs-docs-example">
177
+ <%= button_toolbar do %>
178
+ <%= button_dropdown('Actions', :info) do %>
179
+ <%= dropdown_item 'Button' %>
180
+ <%= dropdown_item 'Link', '/url' %>
181
+ <% end %>
182
+ <%= split_button_dropdown('Edit', url: '/edit') do %>
183
+ <%= dropdown_item 'Flag', '/flag' %>
184
+ <%= dropdown_item 'Copy', '/copy' %>
185
+ <%= dropdown_divider %>
186
+ <%= dropdown_item 'Delete', '/delete' %>
187
+ <% end %>
188
+ <% end %>
189
+
190
+ <pre>
191
+ <%%= button_toolbar do %>
192
+ <%%= button_dropdown('Actions', :info) do %>
193
+ <%%= dropdown_item 'Button' %>
194
+ <%%= dropdown_item 'Link', '/url' %>
195
+ <%% end %>
196
+ <%%= split_button_dropdown('Edit', url: '/edit') do %>
197
+ <%%= dropdown_item 'Flag', '/flag' %>
198
+ <%%= dropdown_item 'Copy', '/copy' %>
199
+ <%%= dropdown_divider %>
200
+ <%%= dropdown_item 'Delete', '/delete' %>
201
+ <%% end %>
202
+ <%% end %>
203
+ </pre>
204
+ </div>
@@ -0,0 +1,11 @@
1
+ <h1>Form Helpers</h1>
2
+
3
+ <p>
4
+ <%= link_to('API Documentation', 'http://rubydoc.info/gems/bootstrap-view-helpers/frames/file/README.md') %>
5
+ </p>
6
+
7
+ <h2>Example</h2>
8
+ <%= render partial: 'form_helper_1'%>
9
+
10
+ <h2>Source</h2>
11
+ <%= bvh_show_source('bootstrap_view_helpers/_form_helper_1') %>
@@ -0,0 +1,14 @@
1
+ <h1>Icons</h1>
2
+
3
+ <p>
4
+ <%= link_to('Bootstrap Documentation', 'http://twitter.github.io/bootstrap/base-css.html#icons') %>
5
+ <br />
6
+ <%= link_to('API Documentation', 'http://rubydoc.info/gems/bootstrap-view-helpers/Bootstrap/IconHelper') %>
7
+ </p>
8
+
9
+ <h2>Examples</h2>
10
+ <%= render partial: 'icons' %>
11
+
12
+
13
+ <h2>Source</h2>
14
+ <%= bvh_show_source('bootstrap_view_helpers/_icons') %>
@@ -1,122 +1,10 @@
1
1
  <h1>Examples</h1>
2
2
 
3
- <p>
4
- <%= icon('search') %>
5
- <%= stamp(icon('search', :white))%>
6
- <%= stamp(icon('search', 'white', 'Search'))%>
7
- </p>
8
- <p>
9
- <%= stamp(icon(:remove, :white, 'Delete'), :important)%>
10
- <br />
11
- <%= stamp(icon(:spacer, :white, 'Spacer'), :important)%>
12
- </p>
13
- <p>
14
- <%= stamp(icon(:remove, 'Delete'), :important)%>
15
- <br />
16
- <%= stamp(icon(:spacer, 'Spacer'), :important)%>
17
- </p>
18
- <%= split_button_dropdown('Default', url: '/default') do %>
19
- <%= dropdown_item('Action 1', '/action1') %>
20
- <%= dropdown_item('Action 2', '/action2') %>
21
- <% end %>
3
+ <h2>Nav Bar</h2>
4
+ <p>This is the source for the navbar on this page.</p>
5
+ <%= bvh_show_source('application/_bootstrap_view_helper_nav_bar') %>
22
6
 
23
- <%= button_dropdown('Actions foo', url: 'foo') do %>
24
- <%= dropdown_item('Action 1', '/action1') %>
25
- <%= dropdown_item('Action 2', '/action2') %>
26
- <% end %>
7
+ <h2>Sidebar</h2>
8
+ <p>This is the source for the sidebar on this page.</p>
9
+ <%= bvh_show_source('application/_bootstrap_view_helper_side_bar') %>
27
10
 
28
- <%= nav_dropdown('Admin') do %>
29
- <%= dropdown_item('Users', 'admin_users_path') %>
30
- <%= dropdown_item('Logs', 'admin_logs_path') %>
31
- <%= dropdown_divider %>
32
- <%= dropdown_item('Exceptions', 'admin_exceptions_path') %>
33
- <% end %>
34
-
35
-
36
- <%= button_group do %>
37
- <%= button("Left", url: "/left") %>
38
- <%= button("Right", id: 'right') %>
39
- <% end %>
40
-
41
- <%= button_toolbar do %>
42
- <%= button('Single Button', url: '/single') %>
43
- <%= button_group do %>
44
- <%= button('Group Button 1') %>
45
- <%= button('Group Button 2') %>
46
- <% end %>
47
- <%= button('Another Single') %>
48
- <% end %>
49
- #
50
- <div>
51
- <%= badge('Default') %>
52
- </div><div>
53
- <%= badge('Default') %>
54
- </div><div>
55
- <%= badge('Default') %>
56
- </div><div>
57
- <%= badge('Default') %>
58
- </div><div>
59
- <%= badge('Default') %>
60
- </div><div>
61
- <%= badge('Default') %>
62
- </div><div>
63
- <%= badge('Default') %>
64
- </div><div>
65
- <%= badge('Default') %>
66
- </div><div>
67
- <%= badge('Default') %>
68
- </div><div>
69
- <%= badge('Default') %>
70
- </div><div>
71
- <%= badge('Default') %>
72
- </div><div>
73
- <%= badge('Default') %>
74
- </div><div>
75
- <%= badge('Default') %>
76
- </div><div>
77
- <%= badge('Default') %>
78
- </div><div>
79
- <%= badge('Default') %>
80
- </div><div>
81
- <%= badge('Default') %>
82
- </div><div>
83
- <%= badge('Default') %>
84
- </div><div>
85
- <%= badge('Default') %>
86
- </div><div>
87
- <%= badge('Default') %>
88
- </div><div>
89
- <%= badge('Default') %>
90
- </div><div>
91
- <%= badge('Default') %>
92
- </div><div>
93
- <%= badge('Default') %>
94
- </div><div>
95
- <%= badge('Default') %>
96
- </div><div>
97
- <%= badge('Default') %>
98
- </div><div>
99
- <%= badge('Default') %>
100
- </div><div>
101
- <%= badge('Default') %>
102
- </div><div>
103
- <%= badge('Default') %>
104
- </div><div>
105
- <%= badge('Default') %>
106
- </div><div>
107
- <%= badge('Default') %>
108
- </div><div>
109
- <%= badge('Default') %>
110
- </div><div>
111
- <%= badge('Default') %>
112
- </div><div>
113
- <%= badge('Default') %>
114
- </div><div>
115
- <%= badge('Default') %>
116
- </div><div>
117
- <%= badge('Default') %>
118
- </div><div>
119
- <%= badge('Default') %>
120
- </div><div>
121
- <%= badge('Default') %>
122
- </div>
@@ -0,0 +1,116 @@
1
+ <h1>Labels and Badges</h1>
2
+ <p><%= link_to('Bootstrap Documentation', 'http://twitter.github.io/bootstrap/components.html#labels-badges') %>
3
+
4
+ <h2>Labels (Stamps)</h2>
5
+ <p><%= link_to('API Documentation', 'http://rubydoc.info/gems/bootstrap-view-helpers/Bootstrap/StampHelper') %>
6
+ <p>We use <code>stamp</code> because <code>label</code> is a Rails Helper method.</p>
7
+
8
+ <table class='table table-bordered table-striped'>
9
+ <thead>
10
+ <tr>
11
+ <th width="125px"> Label</th>
12
+ <th> Code</th>
13
+ </th>
14
+ </thead>
15
+ <tbody>
16
+ <tr>
17
+ <td><%= stamp('Default') %>
18
+ <td>
19
+ <code>stamp('Default')</code>
20
+ </td>
21
+ </tr>
22
+ <tr>
23
+ <td><%= stamp('Success', :success) %>
24
+ <td>
25
+ <code>stamp('Success', :success)</code>
26
+ </td>
27
+ </tr>
28
+ <tr>
29
+ <td><%= stamp('Warning', :warning) %>
30
+ <td>
31
+ <code>stamp('Warning', :warning)</code>
32
+ </td>
33
+ </tr>
34
+ <tr>
35
+ <td><%= stamp('Important', :important) %>
36
+ <td>
37
+ <code>stamp('Important', :important)</code>
38
+ </td>
39
+ </tr>
40
+ <tr>
41
+ <td><%= stamp('Info', :info) %>
42
+ <td>
43
+ <code>stamp('Info', :info)</code>
44
+ </td>
45
+ </tr>
46
+ <tr>
47
+ <td><%= stamp('Inverse', :inverse) %>
48
+ <td>
49
+ <code>stamp('Inverse', :inverse)</code>
50
+ </td>
51
+ </tr>
52
+ <tr>
53
+ <td> Options
54
+ <td>
55
+ <code>stamp('Success', :success, id: 'success-label', key: 'value')</code>
56
+ </td>
57
+ </tr>
58
+ </tbody>
59
+ </table>
60
+
61
+ <h2>Badges</h2>
62
+
63
+ <p><%= link_to('API Documentation', 'http://rubydoc.info/gems/bootstrap-view-helpers/Bootstrap/BadgeHelper') %></p>
64
+
65
+ <table class='table table-bordered table-striped'>
66
+ <thead>
67
+ <tr>
68
+ <th width="125px">Badge</th>
69
+ <th> Code</th>
70
+ </th>
71
+ </thead>
72
+ <tbody>
73
+ <tr>
74
+ <td><%= badge('1') %>
75
+ <td>
76
+ <code>badge('1')</code>
77
+ </td>
78
+ </tr>
79
+ <tr>
80
+ <td><%= badge('2', :success) %>
81
+ <td>
82
+ <code>badge('2', :success)</code>
83
+ </td>
84
+ </tr>
85
+ <tr>
86
+ <td><%= badge('3', :warning) %>
87
+ <td>
88
+ <code>badge('3', :warning)</code>
89
+ </td>
90
+ </tr>
91
+ <tr>
92
+ <td><%= badge('4', :important) %>
93
+ <td>
94
+ <code>badge('4', :important)</code>
95
+ </td>
96
+ </tr>
97
+ <tr>
98
+ <td><%= badge('5', :info) %>
99
+ <td>
100
+ <code>badge('5', :info)</code>
101
+ </td>
102
+ </tr>
103
+ <tr>
104
+ <td><%= badge('10', :inverse) %>
105
+ <td>
106
+ <code>badge('10', :inverse)</code>
107
+ </td>
108
+ </tr>
109
+ <tr>
110
+ <td> Options
111
+ <td>
112
+ <code>badge('Success', :success, id: 'success-badge', key: 'value')</code>
113
+ </td>
114
+ </tr>
115
+ </tbody>
116
+ </table>
@@ -0,0 +1,22 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>Bootstrap View Helpers Examples</title>
5
+ <%= stylesheet_link_tag "application", :media => "all" %>
6
+ <%= javascript_include_tag "application" %>
7
+ <%= csrf_meta_tags %>
8
+ </head>
9
+ <body>
10
+ <%= render partial: 'bootstrap_view_helper_nav_bar' %>
11
+ <div class='container-fluid'>
12
+ <div class='row-fluid'>
13
+ <div class='span3'>
14
+ <%= render partial: 'bootstrap_view_helper_side_bar' %>
15
+ </div>
16
+ <div class='span9'>
17
+ <%= yield %>
18
+ </div>
19
+ </div>
20
+ </div>
21
+ </body>
22
+ </html>
@@ -1,4 +1,4 @@
1
1
  Rails.application.routes.draw do
2
2
 
3
- match 'bootstrap_view_helpers' => 'bootstrap_view_helpers#index', :as => :bootstrap_view_helpers
3
+ match 'bootstrap_view_helpers(/:action)' => 'bootstrap_view_helpers', :as => :bvh
4
4
  end
@@ -1,3 +1,3 @@
1
1
  module BootstrapViewHelpers
2
- VERSION = "0.0.6"
2
+ VERSION = "0.0.7"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bootstrap-view-helpers
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.7
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -155,6 +155,22 @@ dependencies:
155
155
  - - ! '>='
156
156
  - !ruby/object:Gem::Version
157
157
  version: '0'
158
+ - !ruby/object:Gem::Dependency
159
+ name: better_errors
160
+ requirement: !ruby/object:Gem::Requirement
161
+ none: false
162
+ requirements:
163
+ - - ! '>='
164
+ - !ruby/object:Gem::Version
165
+ version: '0'
166
+ type: :development
167
+ prerelease: false
168
+ version_requirements: !ruby/object:Gem::Requirement
169
+ none: false
170
+ requirements:
171
+ - - ! '>='
172
+ - !ruby/object:Gem::Version
173
+ version: '0'
158
174
  - !ruby/object:Gem::Dependency
159
175
  name: yard
160
176
  requirement: !ruby/object:Gem::Requirement
@@ -187,6 +203,38 @@ dependencies:
187
203
  - - ! '>='
188
204
  - !ruby/object:Gem::Version
189
205
  version: '0'
206
+ - !ruby/object:Gem::Dependency
207
+ name: quiet_assets
208
+ requirement: !ruby/object:Gem::Requirement
209
+ none: false
210
+ requirements:
211
+ - - ! '>='
212
+ - !ruby/object:Gem::Version
213
+ version: '0'
214
+ type: :development
215
+ prerelease: false
216
+ version_requirements: !ruby/object:Gem::Requirement
217
+ none: false
218
+ requirements:
219
+ - - ! '>='
220
+ - !ruby/object:Gem::Version
221
+ version: '0'
222
+ - !ruby/object:Gem::Dependency
223
+ name: thin
224
+ requirement: !ruby/object:Gem::Requirement
225
+ none: false
226
+ requirements:
227
+ - - ! '>='
228
+ - !ruby/object:Gem::Version
229
+ version: '0'
230
+ type: :development
231
+ prerelease: false
232
+ version_requirements: !ruby/object:Gem::Requirement
233
+ none: false
234
+ requirements:
235
+ - - ! '>='
236
+ - !ruby/object:Gem::Version
237
+ version: '0'
190
238
  description: Rails view helpers for Bootstrap
191
239
  email:
192
240
  - steve.downtown@gmail.com
@@ -194,6 +242,7 @@ executables: []
194
242
  extensions: []
195
243
  extra_rdoc_files: []
196
244
  files:
245
+ - app/assets/stylesheets/bootstrap-view-helpers/bs_docs_example.css
197
246
  - app/controllers/bootstrap_view_helpers_controller.rb
198
247
  - app/helpers/bootstrap/accordion_helper.rb
199
248
  - app/helpers/bootstrap/badge_helper.rb
@@ -205,7 +254,19 @@ files:
205
254
  - app/helpers/bootstrap/icon_renderer.rb
206
255
  - app/helpers/bootstrap/nav_helper.rb
207
256
  - app/helpers/bootstrap/stamp_helper.rb
257
+ - app/helpers/bootstrap_examples/application_helper.rb
258
+ - app/views/application/_bootstrap_view_helper_nav_bar.html.erb
259
+ - app/views/application/_bootstrap_view_helper_side_bar.html.erb
260
+ - app/views/bootstrap_view_helpers/_accordions.html.erb
261
+ - app/views/bootstrap_view_helpers/_form_helper_1.html.erb
262
+ - app/views/bootstrap_view_helpers/_icons.html.erb
263
+ - app/views/bootstrap_view_helpers/accordions.html.erb
264
+ - app/views/bootstrap_view_helpers/buttons.html.erb
265
+ - app/views/bootstrap_view_helpers/form_helpers.html.erb
266
+ - app/views/bootstrap_view_helpers/icons.html.erb
208
267
  - app/views/bootstrap_view_helpers/index.html.erb
268
+ - app/views/bootstrap_view_helpers/labels_and_badges.html.erb
269
+ - app/views/layouts/bootstrap_view_helpers.html.erb
209
270
  - config/routes.rb
210
271
  - lib/bootstrap-view-helpers/engine.rb
211
272
  - lib/bootstrap-view-helpers/version.rb