symphonia 6.0.1 → 6.0.2
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 24d7848d1bca3b518accb57564e9c07c7b4650e5a02e5bd9c3bd33fbe60c5d72
|
4
|
+
data.tar.gz: '078af52f5b5c5efe3fd4ac6bf2935250e25a83e98bfc842f8878413d21ec86a9'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 85b194d20074685cd3f206e06be37240876fd805892180e60c38060d366efeb48b662c1296f5b277042778c997588d363224697e2c545f475dc970caae447962
|
7
|
+
data.tar.gz: b23fad9e94c8d44c72feb31d42666f8bbdc610d9a598830d223a8784b32a1856464596af5ac651cc44a485bd7bf0ea341c5e310d4f9e5e86451209f4bb4fbdca
|
@@ -3,31 +3,27 @@ module Symphonia
|
|
3
3
|
|
4
4
|
include FormHelper
|
5
5
|
|
6
|
-
def
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
'alert-warning'
|
14
|
-
when :info
|
15
|
-
'alert-info'
|
16
|
-
else
|
17
|
-
flash_type.to_s
|
18
|
-
end
|
6
|
+
def bootstrap_flash_map
|
7
|
+
{
|
8
|
+
"notice" => { class_name: "alert-success", icon: "check-circle" },
|
9
|
+
"error" => { class_name: "alert-danger", icon: "circle-exclamation" },
|
10
|
+
"warning" => { class_name: "alert-warning", icon: "circle-exclamation" },
|
11
|
+
"info" => { class_name: "alert-info", icon: "info-circle" },
|
12
|
+
}
|
19
13
|
end
|
20
14
|
|
21
15
|
# Renders flash messages
|
22
16
|
def render_flash_messages(flash_messages = nil)
|
23
|
-
s =
|
17
|
+
s = ""
|
24
18
|
Array(flash_messages || flash).each do |type, message|
|
25
|
-
|
26
|
-
|
19
|
+
bootstrap_flash = bootstrap_flash_map[type]
|
20
|
+
s << tag.div(class: "d-print-none alert #{bootstrap_flash[:class_name]} alert-dismissible fade show", role: "alert") do
|
21
|
+
icon(bootstrap_flash[:icon], text: message) +
|
22
|
+
tag.button("", class: "btn-close close", data: { "bs-dismiss" => "alert" }, "aria-label" => t(:button_close))
|
27
23
|
end
|
28
24
|
end
|
29
25
|
|
30
|
-
s
|
26
|
+
s
|
31
27
|
end
|
32
28
|
|
33
29
|
def render_menu(menu, options = {})
|
data/lib/symphonia/version.rb
CHANGED
@@ -24,19 +24,19 @@ RSpec.describe Symphonia::ApplicationHelper do
|
|
24
24
|
|
25
25
|
describe "#render_flash_messages" do
|
26
26
|
it "render error" do
|
27
|
-
r = helper.render_flash_messages(error
|
27
|
+
r = helper.render_flash_messages("error" => "flash message")
|
28
28
|
expect(r).to include "danger"
|
29
29
|
end
|
30
30
|
it "render notice" do
|
31
|
-
r = helper.render_flash_messages(notice
|
31
|
+
r = helper.render_flash_messages("notice" => "flash message")
|
32
32
|
expect(r).to include "success"
|
33
33
|
end
|
34
34
|
it "render warning" do
|
35
|
-
r = helper.render_flash_messages(warning
|
35
|
+
r = helper.render_flash_messages("warning" => "flash message")
|
36
36
|
expect(r).to include "warning"
|
37
37
|
end
|
38
38
|
it "render info" do
|
39
|
-
r = helper.render_flash_messages(info
|
39
|
+
r = helper.render_flash_messages("info" => "flash message")
|
40
40
|
expect(r).to include "info"
|
41
41
|
end
|
42
42
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: symphonia
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 6.0.
|
4
|
+
version: 6.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Lukas Pokorny
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-10-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: api-pagination
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
19
|
+
version: '5.0'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '
|
26
|
+
version: '5.0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: authlogic
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|