bootstrap_help 0.0.20 → 0.0.21
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f0c00ad39a316ca22dcd0af5bb3358db7093c70c
|
4
|
+
data.tar.gz: efd822dd96d5febd3ce09cbd752db4cc90d37fa3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2c47bc152ff0d17f472aac354e45e4ae40b72296db2eee82ba6833ab2b680c128ee200139341dacf8c68ff5949fb9810d88cea2058f9d0e097cafd10014b3ca1
|
7
|
+
data.tar.gz: 71bcb47e1c01bd10e5832facd8de7fc607b313bed1481387d0407df87b13965161614dbca5797ec7b7a12404c878547c6bb01ba76f1c25f1d66473199d4529f2
|
@@ -9,14 +9,17 @@ module BootstrapHelp
|
|
9
9
|
@buttons = []
|
10
10
|
block.call
|
11
11
|
content_tag :div, class: "btn-toolbar" do
|
12
|
-
|
13
|
-
|
12
|
+
content_tag :div, class: "btn-group" do
|
13
|
+
@buttons.each do |button|
|
14
|
+
concat(draw_button(button[:icon_suffix], button[:options]))
|
15
|
+
end
|
14
16
|
end
|
15
17
|
end
|
16
18
|
end
|
17
19
|
|
18
20
|
def button(icon_suffix, options)
|
19
21
|
@buttons << {icon_suffix: icon_suffix, options: options}
|
22
|
+
nil
|
20
23
|
end
|
21
24
|
|
22
25
|
private
|
@@ -10,7 +10,7 @@ describe BootstrapHelp::ButtonHelpers do
|
|
10
10
|
|
11
11
|
describe '#table_for' do
|
12
12
|
it 'returns a bootstrap table for a given collection' do
|
13
|
-
expected_result = "<div class=\"btn-toolbar\"><a class=\"btn\" href=\"/test\"><i class=\"icon-edit\"></i></a><a class=\"btn\" href=\"/test-again\"><i class=\"icon-new\"></i></a></div>"
|
13
|
+
expected_result = "<div class=\"btn-toolbar\"><div class=\"btn-group\"><a class=\"btn\" href=\"/test\"><i class=\"icon-edit\"></i></a><a class=\"btn\" href=\"/test-again\"><i class=\"icon-new\"></i></a></div></div>"
|
14
14
|
|
15
15
|
block = Proc.new {
|
16
16
|
helpers.button 'edit', "/test"
|