twitter_bootstrap_helper 0.0.4 → 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
data/README.rdoc CHANGED
@@ -1,5 +1,42 @@
1
1
  = TwitterBootstrapHelper
2
2
 
3
- Refer to the rdoc documentation for this helper.
3
+ Refer to the rdoc documentation for this helper. I'm working on more examples.
4
4
 
5
- This project rocks and uses MIT-LICENSE.
5
+ This project rocks and uses MIT-LICENSE.
6
+
7
+ == Navs
8
+
9
+ Navs require a bit of HTML to create. These helpers make it a little easier.
10
+
11
+ <%= tb_nav do %>
12
+ <%= tb_nav_item(:dropdown => "Options", :html => {:id => "options-dropdown-button"}) do %>
13
+ <%= tb_nav(:dropdown_menu, :html => {:id => "options-dropdown"}) do %>
14
+ <%= tb_nav_item tb_link("Option 1", "#")) %>
15
+ <%= tb_nav_item tb_link("Option 2", "#")) %>
16
+ <%= tb_nav_item :divider %>
17
+ <%= tb_nav_item tb_link(" Option 3", "#", :icon => "icon-ok")) %>
18
+ <% end %>
19
+ <% end %>
20
+ <span class="btn-group pull-left">
21
+ <%= tb_link("", "#", :icon => "icon-minus", :class => "btn", :id => "zoom-out-button") %>
22
+ <%= tb_link("", "#", :icon => "icon-plus", :class => "btn", :id => "zoom-in-button") %>
23
+ </span>
24
+ <% end %>
25
+
26
+ == Modals
27
+
28
+ There are a couple of helpers to assist with creating and activating modals. One to create a button to activate a modal, and one to create the modal and the content itself.
29
+
30
+ The tb_modal_button helper takes the same options as tb_link
31
+
32
+ <%= tb_modal_button " Edit", "editModal", :class => "btn btn-success", :icon => "icon-edit" %>
33
+
34
+ For the actual modal, use tb_modal
35
+
36
+ <%= tb_modal "editModal", "Content of the modal", title: "Edit", ok_id: "submit-button", ok_label: "Save", ok_link: edit_object_path(@object), ok_class: "btn btn-success" %>
37
+
38
+ You can also use it as a block:
39
+
40
+ <%= tb_modal "editModal", title: "Edit", ok_id: "submit-button", ok_label: "Save", ok_link: edit_object_path(@object), ok_class: "btn btn-success" do %>
41
+ Modal Content
42
+ <% end %>
@@ -1,3 +1,3 @@
1
1
  module TwitterBootstrapHelper
2
- VERSION = "0.0.4"
2
+ VERSION = "0.0.5"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: twitter_bootstrap_helper
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-09-12 00:00:00.000000000 Z
12
+ date: 2012-11-30 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
@@ -18,7 +18,7 @@ dependencies:
18
18
  requirements:
19
19
  - - ~>
20
20
  - !ruby/object:Gem::Version
21
- version: 3.2.8
21
+ version: '3.1'
22
22
  type: :runtime
23
23
  prerelease: false
24
24
  version_requirements: !ruby/object:Gem::Requirement
@@ -26,7 +26,7 @@ dependencies:
26
26
  requirements:
27
27
  - - ~>
28
28
  - !ruby/object:Gem::Version
29
- version: 3.2.8
29
+ version: '3.1'
30
30
  - !ruby/object:Gem::Dependency
31
31
  name: sqlite3
32
32
  requirement: !ruby/object:Gem::Requirement
@@ -71,7 +71,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
71
71
  version: '0'
72
72
  segments:
73
73
  - 0
74
- hash: 4565783246642340892
74
+ hash: 4248848813758808582
75
75
  required_rubygems_version: !ruby/object:Gem::Requirement
76
76
  none: false
77
77
  requirements:
@@ -80,7 +80,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
80
80
  version: '0'
81
81
  segments:
82
82
  - 0
83
- hash: 4565783246642340892
83
+ hash: 4248848813758808582
84
84
  requirements: []
85
85
  rubyforge_project:
86
86
  rubygems_version: 1.8.24