web47core 0.4.3 → 0.4.4

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 89cffd10d3be30ecbf86349ec79ac8f7677f8707a17346974d9b9aa487d763c6
4
- data.tar.gz: 85a88d48c9edad7722c3b55848568529c250eeb521c6baecc0846f572ed7d5e7
3
+ metadata.gz: 8d30e029bb9f3e3a7697c025b5c475a684756e834b2d6789e79aaf20a25f984e
4
+ data.tar.gz: ec1b0b8ae678de7053396618a607bb8b4057b534ec09e0844d10b6a59a57e36c
5
5
  SHA512:
6
- metadata.gz: 52ede132c5e9e3d60006a3491268ce716e5293389551a6da6a1dcfc1a179341c505c47a0b5ef47e03dce3ddc1be573d610a941d06f0da2f332149c13bb1a9661
7
- data.tar.gz: 05f36ef9ba68f2e2006c7bab6539ddd5565214cba406769bb4223f01a1c620dfa6659be086e1e3d4fc7824d90d96099c03cd164e27a9df4c3289d748b4dee55e
6
+ metadata.gz: 250b8a3e1ed44c0c3229de3415efe6e103bcb698fc52c90f79c5b30c68e76cd439170c3fda155e86cc6f3b0b136a22fc47e582085a273a689e0f59d0399ed60a
7
+ data.tar.gz: ed89442fd4b8cb578dd3f664cca063d64e40f5ed9c69d7a000216d8c58a350d2f491a188104da9b61837b77f8f7a89828f4bbb014b448aa03dd830c3c1746948
@@ -63,6 +63,6 @@ module CoreHelper
63
63
  end
64
64
 
65
65
  def current_user
66
- @current_user || User.new
66
+ User.new
67
67
  end
68
68
  end
@@ -99,9 +99,8 @@ module CoreLinkHelper
99
99
  return unless can? :edit, obj
100
100
 
101
101
  icon_name = options[:icon_name] || 'replay'
102
- data = {}
103
- data[:confirm] = options[:confirm] if options[:confirm].present?
104
- content_tag(:a, href: path, data: data) do
102
+ data = { confirm: options[:confirm] || t('links.replay_confirmation', name: obj.class.to_s.underscore.humanize) }
103
+ content_tag(:a, href: path, data: data, class: options[:link_classes]) do
105
104
  concat(content_tag(:i, class: 'material-icons') do
106
105
  icon_name
107
106
  end)
@@ -137,7 +136,7 @@ module CoreLinkHelper
137
136
  def info_link_tag(obj, path, options = {})
138
137
  return unless can? :read, obj
139
138
 
140
- content_tag(:a, href: path) do
139
+ content_tag(:a, href: path, class: options[:link_classes]) do
141
140
  concat(content_tag(:i, class: 'material-icons') do
142
141
  'info'
143
142
  end)
@@ -163,7 +162,7 @@ module CoreLinkHelper
163
162
  def action_link_tag(condition, path, options = {})
164
163
  return unless condition
165
164
 
166
- content_tag(:a, href: path) do
165
+ content_tag(:a, href: path, class: options[:link_classes]) do
167
166
  concat(content_tag(:i, class: 'material-icons') do
168
167
  options[:icon_name] || 'info'
169
168
  end)
@@ -189,8 +188,9 @@ module CoreLinkHelper
189
188
  def delete_link_tag(obj, path, options = {})
190
189
  return unless can? :delete, obj
191
190
 
192
- confirmation = options[:confirmation] || t('links.deletion_confirmation', name: obj.class.to_s.underscore.humanize)
193
- content_tag(:a, href: path, data: { method: :delete, confirm: confirmation }) do
191
+ data = { method: :delete,
192
+ confirm: options[:confirm] || t('links.deletion_confirmation', name: obj.class.to_s.underscore.humanize) }
193
+ content_tag(:a, href: path, data: data) do
194
194
  concat(content_tag(:i, class: 'material-icons') do
195
195
  options[:icon_name] || 'delete'
196
196
  end)
@@ -198,32 +198,6 @@ module CoreLinkHelper
198
198
  end
199
199
  end
200
200
 
201
- #
202
- # Send notification in a pull down list
203
- #
204
- def notification_list_tag(obj, path, options = {})
205
- return unless can? :manage, obj
206
-
207
- options[:label] ||= I18n.t('customer_account_users.index.reset_password')
208
- content_tag(:li) do
209
- notification_link_tag(obj, path, options)
210
- end
211
- end
212
-
213
- #
214
- # Send notification
215
- #
216
- def notification_link_tag(obj, path, options = {})
217
- return unless can? :manage, obj
218
-
219
- content_tag(:a, href: path) do
220
- concat(content_tag(:i, class: 'material-icons') do
221
- options[:icon_name] || 'email'
222
- end)
223
- concat(options[:label]) if options[:label].present?
224
- end
225
- end
226
-
227
201
  #
228
202
  # Edit a page
229
203
  #
@@ -1,6 +1,7 @@
1
1
  en:
2
2
  links:
3
3
  deletion_confirmation: 'Are you sure you want to delete this %{name}?'
4
+ replay_confirmation: 'Are you sure you want to replay %{name}?'
4
5
  invalid_access: 'Unauthorized access attempting to access %{action} / %{name}'
5
6
  forms:
6
7
  actions:
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Web47core
4
- VERSION = '0.4.3'
4
+ VERSION = '0.4.4'
5
5
  end
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: 0.4.3
4
+ version: 0.4.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Schroeder
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-04-01 00:00:00.000000000 Z
11
+ date: 2020-04-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport