leather 0.2.1 → 0.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,13 +1,4 @@
|
|
1
1
|
.modal.fade{ id: id }
|
2
2
|
.modal-dialog
|
3
3
|
.modal-content
|
4
|
-
|
5
|
-
%button.close{ data: { dismiss: "modal" }, type: "button" }
|
6
|
-
%span{ aria: { hidden: "true" } } ×
|
7
|
-
%span.sr-only Close
|
8
|
-
%h4.modal-title= title
|
9
|
-
.modal-body
|
10
|
-
= block
|
11
|
-
.modal-footer
|
12
|
-
%button.btn.btn-default{ data: { dismiss: "modal" }, type: "button" }= close_text
|
13
|
-
%button.btn.btn-primary{ type: "button" } Save changes
|
4
|
+
= block
|
@@ -4,8 +4,20 @@ module Leather
|
|
4
4
|
link_to text, "##{id}", data: { toggle: "modal" }, class: html_options[:class]
|
5
5
|
end
|
6
6
|
|
7
|
-
def modal(
|
8
|
-
render partial: 'leather/modal', locals: { id: id,
|
7
|
+
def modal(id = 'modal', html_options = {}, &block)
|
8
|
+
render partial: 'leather/modal', locals: { id: id, block: capture(&block), html_options: html_options }
|
9
|
+
end
|
10
|
+
|
11
|
+
def modal_header(title = '', &block)
|
12
|
+
render partial: 'leather/modal_header', locals: { title: title }
|
13
|
+
end
|
14
|
+
|
15
|
+
def modal_body(&block)
|
16
|
+
render partial: 'leather/modal_body', locals: { block: capture(&block) }
|
17
|
+
end
|
18
|
+
|
19
|
+
def modal_footer(close_text = '')
|
20
|
+
render partial: 'leather/modal_footer', locals: { close_text: close_text }
|
9
21
|
end
|
10
22
|
|
11
23
|
def nav_item(text, href, options = {})
|
data/lib/leather/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: leather
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -157,6 +157,9 @@ files:
|
|
157
157
|
- app/views/devise/shared/_welcome.html.erb
|
158
158
|
- app/views/leather/_dropdown_nav_item.html.haml
|
159
159
|
- app/views/leather/_modal.html.haml
|
160
|
+
- app/views/leather/_modal_body.html.haml
|
161
|
+
- app/views/leather/_modal_footer.html.haml
|
162
|
+
- app/views/leather/_modal_header.html.haml
|
160
163
|
- app/views/leather/_nav_item.html.haml
|
161
164
|
- app/views/leather/_nav_list.html.haml
|
162
165
|
- app/views/leather/_navbar.html.haml
|
@@ -185,7 +188,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
185
188
|
version: '0'
|
186
189
|
segments:
|
187
190
|
- 0
|
188
|
-
hash:
|
191
|
+
hash: 2858582222601974244
|
189
192
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
190
193
|
none: false
|
191
194
|
requirements:
|
@@ -194,7 +197,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
194
197
|
version: '0'
|
195
198
|
segments:
|
196
199
|
- 0
|
197
|
-
hash:
|
200
|
+
hash: 2858582222601974244
|
198
201
|
requirements: []
|
199
202
|
rubyforge_project:
|
200
203
|
rubygems_version: 1.8.24
|