modal_helper 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +7 -0
  2. data/lib/modal_helper.rb +27 -0
  3. metadata +45 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 73ad72aacc2b37b251ddfc3c85eca10d5d31c9a4
4
+ data.tar.gz: c9ee49a24aed1eec432220d963c4f08aa8afd0dc
5
+ SHA512:
6
+ metadata.gz: 86f3213c09b0191affb60cfabb0fe9c35292ebcdc02ff8853105ffc29d2aa72cc0912c7a27c925f48f46fd41187cdfcac394f7dfa077074fe48d44666fcf4231
7
+ data.tar.gz: 9d765e196d25aee05aac0db309a84a1ae663e2be746991ecf6c64e4db19d2c48a7bb676f80078e3ba43487b3c4ad6e211f305dd40fbc3074b9ea716f22fee37b
@@ -0,0 +1,27 @@
1
+ module ModalHelper
2
+
3
+ def modal_tag(options = {})
4
+ content_tag :div, class: "modal", tabIndex: "-1", role: "dialog", "aria-hidden": true do
5
+ concat(content_tag(:div, class: "modal-dialog") do
6
+ concat(content_tag(:div, class: "modal-content") do
7
+ yield
8
+ end)
9
+ end)
10
+ end
11
+ end
12
+
13
+ def modal_header
14
+ content_tag(:div, class: "modal-header") do
15
+ concat(content_tag("button", "×".html_safe, class: "close", "data-dismiss" => "modal", "aria-hidden" => "false") do
16
+ yield
17
+ end)
18
+ end
19
+ end
20
+
21
+ def modal_body
22
+ content_tag("div", class: "modal-body") do
23
+ yield
24
+ end
25
+ end
26
+
27
+ end
metadata ADDED
@@ -0,0 +1,45 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: modal_helper
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Michael Mittermayr
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2015-02-28 00:00:00.000000000 Z
12
+ dependencies: []
13
+ description: Modal helper, as the name already indicates, provides a set of helpers
14
+ for using modals.
15
+ email: michael@mittermayr.com
16
+ executables: []
17
+ extensions: []
18
+ extra_rdoc_files: []
19
+ files:
20
+ - lib/modal_helper.rb
21
+ homepage: http://rubygems.org/gems/modal_helper
22
+ licenses:
23
+ - MIT
24
+ metadata: {}
25
+ post_install_message:
26
+ rdoc_options: []
27
+ require_paths:
28
+ - lib
29
+ required_ruby_version: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ required_rubygems_version: !ruby/object:Gem::Requirement
35
+ requirements:
36
+ - - ">="
37
+ - !ruby/object:Gem::Version
38
+ version: '0'
39
+ requirements: []
40
+ rubyforge_project:
41
+ rubygems_version: 2.4.5
42
+ signing_key:
43
+ specification_version: 4
44
+ summary: Modal helper simplifies building modals.
45
+ test_files: []