web47core 1.1.11 → 1.1.12
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_link_helper.rb +34 -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: 8b6544eb45fefb9b028a1975ad7a7289d176dfaa730a55f2fc8025f659870f46
|
4
|
+
data.tar.gz: f0476ca81bf64ff848fbbface268cd37218d63ee5e164b736f5f5d9aa928a4a5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6e19c4219cfc0c8f8627af26ea971c038372fc47b8baaa853730424ce62422adba935ea810a087bb478ae12fd96865fd7309b7c4761197e12ab4ba11146d5fa0
|
7
|
+
data.tar.gz: cdf2ab7e1e34722c7c625efbed5498de124905adc789559cc37897e44210eea26895125a959073e98c8369749f76f4103b38345bba52efe5c6196ea86985080a
|
@@ -126,6 +126,7 @@ module CoreLinkHelper
|
|
126
126
|
return unless can? :edit, obj
|
127
127
|
|
128
128
|
data = {}
|
129
|
+
options[:icon_name] ||= 'replay'
|
129
130
|
confirmation_data(options, data, t('links.replay_confirmation', name: obj.class.to_s.underscore.humanize))
|
130
131
|
link_classes = tooltip_data(options, data)
|
131
132
|
content_tag(:a, href: path, data: data, class: link_classes.join(' ')) do
|
@@ -146,6 +147,23 @@ module CoreLinkHelper
|
|
146
147
|
end
|
147
148
|
end
|
148
149
|
|
150
|
+
#
|
151
|
+
# Restart a thingy
|
152
|
+
#
|
153
|
+
def replay_button_tag(obj, path, options = {})
|
154
|
+
return unless can? :edit, obj
|
155
|
+
|
156
|
+
data = {}
|
157
|
+
options[:icon_name] ||= 'replay'
|
158
|
+
confirmation_data(options, data, t('links.replay_confirmation', name: obj.class.to_s.underscore.humanize))
|
159
|
+
link_classes = tooltip_data(options, data)
|
160
|
+
link_classes << 'btn' unless link_classes.include?('btn')
|
161
|
+
content_tag(:a, href: path, data: data, class: link_classes) do
|
162
|
+
concat(materialize_icon(icon_name(options), options))
|
163
|
+
concat(options[:label]) if options[:label].present?
|
164
|
+
end
|
165
|
+
end
|
166
|
+
|
149
167
|
#
|
150
168
|
# Details of a thingy in a pull down list
|
151
169
|
#
|
@@ -226,6 +244,22 @@ module CoreLinkHelper
|
|
226
244
|
end
|
227
245
|
end
|
228
246
|
|
247
|
+
#
|
248
|
+
# Delete an thingy
|
249
|
+
#
|
250
|
+
def delete_button_tag(obj, path, options = {})
|
251
|
+
return unless can? :destroy, obj
|
252
|
+
|
253
|
+
data = { method: :delete }
|
254
|
+
confirmation_data(options, data, t('links.deletion_confirmation', name: obj.class.to_s.underscore.humanize))
|
255
|
+
link_classes = tooltip_data(options, data)
|
256
|
+
%w[btn red].each { |c| link_classes << c unless link_classes.include?(c) }
|
257
|
+
content_tag(:a, class: link_classes, href: path, data: data) do
|
258
|
+
concat(materialize_icon(icon_name(options, 'delete'), options))
|
259
|
+
concat(options[:label]) if options[:label].present?
|
260
|
+
end
|
261
|
+
end
|
262
|
+
|
229
263
|
#
|
230
264
|
# Create a thingy in a pull-down list
|
231
265
|
#
|
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: 1.1.
|
4
|
+
version: 1.1.12
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chris Schroeder
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-03-
|
11
|
+
date: 2021-03-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|