semantic-rails-ui 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/helpers/semantic_rails_ui/ui_helper.rb +20 -1
- data/lib/semantic-rails-ui/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 58ca5b1b5fcbfd401eba23d722f93d04321d8dca
|
4
|
+
data.tar.gz: 4cd8edc27229b3d9cb22d8021dcb6ee621e33840
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 65eebce97e2bcfe5b3c5c884bd2381c11034f816e0ba5220f7f628dfd9ac1d46f4ba3cc671ece8207a8ea6c5e5cb6ccf92ac25cdb498f5c1fb944ff019f23c18
|
7
|
+
data.tar.gz: d35c91b6398438e00cad638b16e7a2cbeacd58fefb5c5634b3faa30c655fd15d2c08f6f9320590aa33bbf744e924b13953f5c8ca46fb774f0adadcb742de9af6
|
@@ -6,8 +6,27 @@ module SemanticRailsUi
|
|
6
6
|
# </h1>
|
7
7
|
def ui_icon_header(title, icon_name)
|
8
8
|
content_tag :h1, class: "ui header" do
|
9
|
-
|
9
|
+
ui_icon(icon_name) + content_tag(:div, title, class: "content")
|
10
10
|
end
|
11
11
|
end
|
12
|
+
|
13
|
+
def ui_flash_messages
|
14
|
+
content_tag :div, class: "messages" do
|
15
|
+
messages = ""
|
16
|
+
flash.each do |name, msg|
|
17
|
+
messages += content_tag :div, class: "ui #{name} message" do
|
18
|
+
ui_icon("close") + content_tag(:div, class: "ui header") do
|
19
|
+
icon_name = name == 'error' || name == 'warning' ? :warning : :info
|
20
|
+
ui_icon("#{icon_name} circle") + content_tag(:div, msg, class: "content")
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
messages.html_safe
|
25
|
+
end
|
26
|
+
end
|
27
|
+
|
28
|
+
def ui_icon(icon_name)
|
29
|
+
content_tag(:i, '', class: "#{icon_name} icon")
|
30
|
+
end
|
12
31
|
end
|
13
32
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: semantic-rails-ui
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Igor Jancev
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-05-
|
11
|
+
date: 2016-05-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|