web47core 3.2.3.15 → 3.2.3.17

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: a0caf08ce39f250131aa035b33f0661a4bddee995a1ff900f92182efc1ca1b4c
4
- data.tar.gz: c43f9ba346f3e6ef08213377b9a91b41cb4a8aa4a51ad877ae7e0ad6d531540d
3
+ metadata.gz: 8aeda1bb816c71062bed0c04345274790bed2bb1d7f379407efc2097c6c16293
4
+ data.tar.gz: 66f84a16916557df8eed33c4956c47ad92df47f11d1bd16d90f3f2945dcf6429
5
5
  SHA512:
6
- metadata.gz: d69e9a7b40859efd7134e7dd82daf3fb23728b3c7122dcd1f8678ca03b0a4e67fc08db22ab4e2d02161d2ba80a23bb5380c937bfad4d8741724fe8ddfee094a2
7
- data.tar.gz: 764604776ae06e34a16291d3cf66e168f9b26156a3db5816a8b1bcd1c42ac95e51e7f32b9a03580326f684462932ccd72202c54eebb61a9e51b0f6cfd91f5802
6
+ metadata.gz: 640b515e5e7f3cc13ac93b41c78b302cefe2023e2fa7c0f79bdf81e49eb721201231d140ad273236a5395c14ac46290638bfdd881d8bc76313872b222b2e4d8b
7
+ data.tar.gz: 8e76f708a1fc1c74c0b656b841b290f75921adb641bdb8a92aa7d60b462afa20450ff11a103a80fc88a094936c08d109ed0b143d488860f1d1c92e6b5067c829
@@ -54,6 +54,12 @@ class CardNavBuilder
54
54
  item_link(path, title, icon_name)
55
55
  end
56
56
 
57
+ def duplicate_link(path, title: 'Duplicate', icon_name: :duplicate)
58
+ return unless can?(:create, @obj)
59
+
60
+ item_link(path, title, icon_name)
61
+ end
62
+
57
63
  def delete_link(path, confirm: nil, title: 'Delete')
58
64
  return unless can?(:manage, @obj)
59
65
 
@@ -176,7 +176,7 @@ module ModelModalHelper
176
176
 
177
177
  def model_modal_fields(model, _options = {})
178
178
  content_tag(:div, class: 'datagrid m-2') do
179
- field_names = ((model.class.allowed_param_names) + %w(description name)).uniq.sort
179
+ field_names = ((model.class.allowed_param_names) + %w(description name display_value)).uniq.sort
180
180
  field_names.each do |field_name|
181
181
  concat(model_modal_field(model, field_name)) if model.respond_to?(field_name) && model.send(field_name).present?
182
182
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Web47core
4
- VERSION = '3.2.3.15'
4
+ VERSION = '3.2.3.17'
5
5
  end
data/lib/web47core.rb CHANGED
@@ -25,7 +25,6 @@ require 'app/models/concerns/switchboard_able'
25
25
  require 'app/models/concerns/switchboard_configuration'
26
26
  require 'app/models/concerns/secure_fields'
27
27
  require 'app/models/concerns/twilio_configuration'
28
- require 'app/models/concerns/tag_able'
29
28
  require 'app/models/concerns/zendesk_configuration'
30
29
  require 'app/models/command_job'
31
30
  require 'app/models/command_job_log'
@@ -48,7 +47,6 @@ require 'app/models/notification_template'
48
47
  require 'app/models/slack_notification'
49
48
  require 'app/models/sms_notification'
50
49
  require 'app/models/smtp_configuration'
51
- require 'app/models/tag'
52
50
  #
53
51
  # Cron
54
52
  #
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.3.15
4
+ version: 3.2.3.17
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-10-20 00:00:00.000000000 Z
11
+ date: 2025-11-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activemodel
@@ -6599,7 +6599,6 @@ files:
6599
6599
  - lib/app/models/concerns/standard_model.rb
6600
6600
  - lib/app/models/concerns/switchboard_able.rb
6601
6601
  - lib/app/models/concerns/switchboard_configuration.rb
6602
- - lib/app/models/concerns/tag_able.rb
6603
6602
  - lib/app/models/concerns/time_zone_able.rb
6604
6603
  - lib/app/models/concerns/twilio_configuration.rb
6605
6604
  - lib/app/models/concerns/zendesk_configuration.rb
@@ -6617,7 +6616,6 @@ files:
6617
6616
  - lib/app/models/slack_notification.rb
6618
6617
  - lib/app/models/sms_notification.rb
6619
6618
  - lib/app/models/smtp_configuration.rb
6620
- - lib/app/models/tag.rb
6621
6619
  - lib/app/models/template.rb
6622
6620
  - lib/app/models/user_action_audit_log.rb
6623
6621
  - lib/app/models/user_audit_log.rb
@@ -1,34 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- #
4
- # Public: Support taggable entities
5
- #
6
- module TagAble
7
- extend ActiveSupport::Concern
8
-
9
- included do
10
- #
11
- # Fields
12
- #
13
- has_many :tags, dependent: :destroy, inverse_of: :model, class_name: 'Tag', foreign_key: :model_id
14
- end
15
-
16
- # @abstract Update the tags associated with the model
17
- # First update what is from the updated tags
18
- # Then delete any that are no longer associated with them
19
- # @param updated_tags Array<Types::Tag> - tags to update with
20
- def sync_tags(updated_tags)
21
- updated_tags.each do |t|
22
- tag = tags.where(key: t.key).first_or_initialize(key: t.key, model: self)
23
- tag.update! value: t.value
24
- end
25
- keys = updated_tags.map(&:key)
26
- tags.each { |t| t.destroy unless keys.include?(t.key) }
27
- end
28
-
29
- def tag_value(key, default = nil)
30
- tags.find_by(key: key.to_s).value
31
- rescue StandardError
32
- default
33
- end
34
- end
@@ -1,21 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- #
4
- # Represents a volume.
5
- #
6
- class Tag
7
- include StandardModel
8
- #
9
- # Fields
10
- #
11
- field :key, type: String
12
- field :value, type: String
13
- #
14
- # Validations
15
- #
16
- validates :key, presence: true, uniqueness: { scope: :model_id }
17
- #
18
- # Relationships
19
- #
20
- belongs_to :model, polymorphic: true
21
- end