gaku_helpers 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +1 -0
- data/gaku_helpers.gemspec +1 -1
- data/lib/gaku_helpers/view_helpers.rb +1 -0
- data/lib/gaku_helpers/view_helpers/modal_helper.rb +40 -0
- metadata +5 -3
data/.gitignore
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
*.gem
|
data/gaku_helpers.gemspec
CHANGED
@@ -0,0 +1,40 @@
|
|
1
|
+
module GakuHelpers
|
2
|
+
module ViewHelpers
|
3
|
+
module ModalHelper
|
4
|
+
|
5
|
+
def close_button
|
6
|
+
content_tag :button, :class => 'close', :'data-dismiss' => 'modal' do
|
7
|
+
"×".html_safe
|
8
|
+
end
|
9
|
+
end
|
10
|
+
|
11
|
+
def modal_for(id, &block)
|
12
|
+
content_tag :div, class: "modal hide", id: id, wmode: "opaque" do
|
13
|
+
block.call
|
14
|
+
end
|
15
|
+
end
|
16
|
+
|
17
|
+
def modal_body(&block)
|
18
|
+
content_tag :div, class: "modal-body" do
|
19
|
+
content_tag :div, class: "row-fluid" do
|
20
|
+
content_tag :div, class: "span12 well" do
|
21
|
+
block.call
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
27
|
+
def modal_header(text)
|
28
|
+
content_tag :div, class: "modal-header" do
|
29
|
+
concat close_button
|
30
|
+
concat content_tag(:h3) { text }
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
34
|
+
def modal_form_error(id)
|
35
|
+
content_tag :div, nil, :id => id
|
36
|
+
end
|
37
|
+
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gaku_helpers
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 27
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 2
|
10
|
+
version: 0.0.2
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Vassil Kalkov
|
@@ -27,12 +27,14 @@ extensions: []
|
|
27
27
|
extra_rdoc_files: []
|
28
28
|
|
29
29
|
files:
|
30
|
+
- .gitignore
|
30
31
|
- README.md
|
31
32
|
- gaku_helpers.gemspec
|
32
33
|
- lib/gaku_helpers.rb
|
33
34
|
- lib/gaku_helpers/railtie.rb
|
34
35
|
- lib/gaku_helpers/view_helpers.rb
|
35
36
|
- lib/gaku_helpers/view_helpers/link_helper.rb
|
37
|
+
- lib/gaku_helpers/view_helpers/modal_helper.rb
|
36
38
|
- locales/en.yml
|
37
39
|
homepage: http://kalkov.github.io
|
38
40
|
licenses: []
|