web47core 1.0.11 → 1.0.16

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: 47a4d6b158639c596b5ed01bc73a7f163d19e8ccd9bb7d51089b640368ce9e5b
4
- data.tar.gz: 9203632b762294331dc976f61cc99eab95979d1ec58a95405286ba98ae6c58a1
3
+ metadata.gz: 9553f8bc7619223426f6de884ec71e6965eb2ca281f374bfb27ee0029912bc7b
4
+ data.tar.gz: 156d2fd7cee65365a662680779e763d38dfc0f7dcc6eaa82b08709bbf5873eee
5
5
  SHA512:
6
- metadata.gz: 41b150960174a0f848103fcbec5be7847b4115abce5ba1ee00351bb028fe1bd16bd9f84b5a58b463b0b7eb71002c6e5917028208ca09cfeedf4631adcea09ae3
7
- data.tar.gz: e67b0d44151b9e0a8aea5e55e7427ca0b527ea9f9c05e70abb65ef011ada7db91e58b11ae3fa4ba9bc88ba5bd9632d7cc5a667bb0d7771d7a5b785b5742e72bb
6
+ metadata.gz: 22158a5f95e48cc2c0b511c6b3cb8938f05f1d2f44039b4f23a3cbe72e17ebd6c6f12740d900412da2032ff8c32695d4132b5a41e3131621d9510b4e46b00ffb
7
+ data.tar.gz: 41f2923d8afb2abd12fe91385b45dcd250a2f6cbb757ffd8bc0594b6a12eab5de5e626ec33b0e4fb75fadd36251e76fa5792c97761b74407dd7ce81e4836ba83
@@ -21,12 +21,12 @@ module CoreFormHelper
21
21
  # tag_options = {class: []} # text_field_options(model, field, options)
22
22
  # tag_options[:class] += ['materialize-textarea']
23
23
  content_tag(:div, class: (%w[input-field col] + classes).join(' ')) do
24
- concat(text_area(model, field, value, options))
24
+ concat(text_area_tag(model, field, value, options))
25
25
  concat(form_label_tag(model, field, value, options))
26
26
  end
27
27
  end
28
28
 
29
- def text_area(model, field, value, options = {})
29
+ def text_area_tag(model, field, value, options = {})
30
30
  tag_options = text_field_options(model, field, options)
31
31
  tag_options[:class] += ['materialize-textarea']
32
32
  content_tag(:textarea, tag_options) do
@@ -17,8 +17,10 @@ module CoreLinkHelper
17
17
  # Setup the text as copy text
18
18
  #
19
19
  def copy_tag(copy_text, options = {})
20
+ secure = options[:secure] || false
21
+ display_text = secure ? mask_value(copy_text) : copy_text
20
22
  content_tag(:div, class: 'clipboard') do
21
- concat(content_tag(:span) { copy_text })
23
+ concat(content_tag(:span) { display_text })
22
24
  concat(copy_text_tag(copy_text, options))
23
25
  concat(download_tag(options[:download_url], options)) if options[:download_url].present?
24
26
  end
@@ -97,7 +99,8 @@ module CoreLinkHelper
97
99
  return unless can? :edit, obj
98
100
 
99
101
  icon = options[:icon] || 'edit'
100
- content_tag(:a, href: path) do
102
+ tooltip = options[:tooltip] || 'Edit'
103
+ content_tag(:a, href: path, class: 'tooltipped', data: {tooltip: tooltip}) do
101
104
  concat(content_tag(:i, class: 'material-icons') do
102
105
  icon
103
106
  end)
@@ -28,7 +28,7 @@ module Cron
28
28
  time = if item.is_a?(EmailNotification) && template?(item)
29
29
  5.years.ago.utc
30
30
  else
31
- allowed_time
31
+ allowed_time_for_item(item)
32
32
  end
33
33
  item.updated_at < time
34
34
  end
@@ -68,8 +68,10 @@ module CoreSystemConfiguration
68
68
  field :switchboard_stack_id, type: String
69
69
  field :switchboard_stack_api_token, type: String
70
70
  field :switchboard_last_sync_at, type: Time
71
- # Audit Logs TTL
71
+ # TTLs
72
72
  field :user_model_audit_log_ttl, type: Integer, default: 365
73
+ field :slack_notification_ttl, type: Integer, default: 5
74
+ field :email_notification_ttl, type: Integer, default: 180
73
75
  #
74
76
  # Validations
75
77
  #
@@ -312,6 +312,7 @@ module StandardModel
312
312
  #
313
313
  def log_deletion(user, model)
314
314
  Web47core::Config.audit_model_log_class.create!(Web47core::Config.audit_model => user,
315
+ deleted_oid: model.id,
315
316
  model: model,
316
317
  action: AuditLog::DELETE_ACTION,
317
318
  changed_values: App47Logger.clean_params(attributes).to_json)
@@ -233,6 +233,15 @@ class Notification
233
233
  result
234
234
  end
235
235
 
236
+ #
237
+ # Titleize the type of this notification as its name
238
+ #
239
+ def name
240
+ _type.titleize
241
+ rescue StandardError
242
+ _type
243
+ end
244
+
236
245
  private
237
246
 
238
247
  #
@@ -8,6 +8,7 @@ class UserModelAuditLog < UserAuditLog
8
8
  # Fields
9
9
  #
10
10
  field :changed_values, type: String
11
+ field :deleted_oid, type: BSON::ObjectId
11
12
  #
12
13
  # Relationships
13
14
  #
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Web47core
4
- VERSION = '1.0.11'
4
+ VERSION = '1.0.16'
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: 1.0.11
4
+ version: 1.0.16
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-09-25 00:00:00.000000000 Z
11
+ date: 2020-11-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport