web47core 3.2.69 → 3.2.70
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.
- checksums.yaml +4 -4
- data/app/helpers/core_table_helper.rb +0 -26
- data/app/helpers/svg_icon_helper.rb +13 -0
- data/lib/app/models/concerns/standard_model.rb +3 -0
- data/lib/web47core/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ae74d84462d581b2bbff31b62a7fbff2c8e9d1435ed381811ce912778d4c257b
|
4
|
+
data.tar.gz: 5332def0a4b4ff1d483332ddebbdd80be8e702514239d4b5d69d0fcc3d6f56a8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 733000ca4cab74c06bc5037c5e633711a75d529f462048112aee288666b781d83269e1fc3a2a3018eb6c7a09a8f97840d5b9ff60d1ce3179fa4b54872d8c796b
|
7
|
+
data.tar.gz: f6f33d41802054c6e55bdb8761a97c98f05464ca01b65b17af22971e5779a900a1dcbdbc60caed6f94169d7536bcc440fefe98286ce7a91dd6cefe2c244c91de
|
@@ -69,32 +69,6 @@ module CoreTableHelper
|
|
69
69
|
name
|
70
70
|
end
|
71
71
|
|
72
|
-
def dynamic_custom_modal(anchor, label, title, view_endpoint, _options = {})
|
73
|
-
datum = { view_url: view_endpoint }
|
74
|
-
content_tag(:span) do
|
75
|
-
concat(content_tag(:a, href: "##{anchor}", class: 'modal-trigger') do
|
76
|
-
concat(materialize_icon(label))
|
77
|
-
end)
|
78
|
-
concat(content_tag(:div, id: anchor, class: 'modal modal-fixed-footer', data: datum) do
|
79
|
-
concat(content_tag(:div, class: 'modal-content') do
|
80
|
-
concat(content_tag(:h2, class: 'center') do
|
81
|
-
concat(content_tag(:span, title))
|
82
|
-
end)
|
83
|
-
concat(content_tag(:div, class: 'center-align') do
|
84
|
-
concat(content_tag(:div, class: 'progress red lighten-4') do
|
85
|
-
tag(:div, class: 'indeterminate red')
|
86
|
-
end)
|
87
|
-
end)
|
88
|
-
end)
|
89
|
-
concat(content_tag(:div, class: 'modal-footer') do
|
90
|
-
concat(content_tag(:a, href: '#', class: 'modal-action modal-close btn btn-flat') do
|
91
|
-
concat('Close')
|
92
|
-
end)
|
93
|
-
end)
|
94
|
-
end)
|
95
|
-
end
|
96
|
-
end
|
97
|
-
|
98
72
|
# @abstract Return a table data cell with a boolean value
|
99
73
|
# @param value [Boolean] - The value to display
|
100
74
|
# @return [String] - The HTML for the cell
|
@@ -5,6 +5,15 @@ module SvgIconHelper
|
|
5
5
|
def svg_icon(name, size: 24, type: :outline, classes: [], color: 'currentColor', stroke_width: 2)
|
6
6
|
return if name.blank?
|
7
7
|
|
8
|
+
key = ['svg_icon', name, size.to_s, type.to_s, classes.to_s, color, stroke_width.to_s].join(':')
|
9
|
+
Rails.cache.fetch(key, expires_in: SystemConfiguration.long_cache) do
|
10
|
+
fetch_svg_icon(name, size: size, type: type, classes: classes, color: color, stroke_width: stroke_width)
|
11
|
+
end
|
12
|
+
end
|
13
|
+
|
14
|
+
def fetch_svg_icon(name, size: 24, type: :outline, classes: [], color: 'currentColor', stroke_width: 2)
|
15
|
+
return if name.blank?
|
16
|
+
|
8
17
|
classes = if size <= 24
|
9
18
|
['icon', classes].flatten.compact.join(' ')
|
10
19
|
else
|
@@ -20,6 +29,10 @@ module SvgIconHelper
|
|
20
29
|
[preferred_path, color] if lookup_context.exists?(path, [], true)
|
21
30
|
end.compact.first
|
22
31
|
end
|
32
|
+
if partial.blank?
|
33
|
+
partial = 'icons/outline/bug'
|
34
|
+
stroke = 'red'
|
35
|
+
end
|
23
36
|
|
24
37
|
tag.svg(xmlns: "http://www.w3.org/2000/svg",
|
25
38
|
viewBox: "0 0 24 24",
|
data/lib/web47core/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: web47core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.2.
|
4
|
+
version: 3.2.70
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chris Schroeder
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-08-
|
11
|
+
date: 2025-08-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activemodel
|