card-mod-history 0.16.0 → 0.17.0

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: f0eadd287d28611d17a7e670cc86f530020f3fb1a033f3caa4669d98ae890799
4
- data.tar.gz: 21fbfc6e2a38807ebed7e1d40b47d2382c8195298bcf394e3f5b484363d16255
3
+ metadata.gz: ef26bb3f54e291b305c04d313dc3f5718606a2f447af31ec01594e950545a64e
4
+ data.tar.gz: 3edd2f398f989a2b1a22989f60103bd9fd1307f13ef1d248e8db66a4ff058f8a
5
5
  SHA512:
6
- metadata.gz: 6df8845d3cd17b190f7512f39e2e49d52ef8fbe17f56b29795d04d37ed9032f923f3e281049ca0cfcefad4951d15e20e3ebe8401941e8c03275f1ae8cc3c08bd
7
- data.tar.gz: 5135f6f03178e172430558b00e99841fa236be5c833c11d59a4d95dd5dc21c58ec92846bb5fca23a6c4cb8947f7303b4d7445fb843205a8fc4dbaf960999ffa2
6
+ metadata.gz: 0e4c06ce4757f5c61351538ee99c2763bd1f9e15285f4046dd4a4060bc8fd3d5116c06abbd3b8e6542754885dd58ec7734b5fa81343e9a0191b92e5d0969be22
7
+ data.tar.gz: 7686879a8ac1ff5be965861c48b134c373d32e123a6c880247d2a5bbdad8580884d9aefcdbea7d615a2e414d905b9d4da2c25c57000646aef42ae13a177a1eb3
data/config/admin.yml ADDED
@@ -0,0 +1,3 @@
1
+ views:
2
+ - creator_credit
3
+ - updated_by
@@ -9,10 +9,14 @@ class Card
9
9
  %(<span class="nr">##{@args[:act_seq]}</span> #{actor_and_ago})
10
10
  end
11
11
 
12
+ def relative_title
13
+ @act_card.name.from @card.name
14
+ end
15
+
12
16
  def subtitle
13
17
  return "" unless @act.card_id != @format.card.id
14
18
 
15
- wrap_with :small, "act on #{absolute_title}"
19
+ wrap_with :small, "act on #{relative_title}"
16
20
  end
17
21
 
18
22
  def act_links
@@ -107,7 +107,8 @@ class Card
107
107
  "#{time_ago_in_words(@act.acted_at)} ago"
108
108
  end
109
109
 
110
- def accordion_item
110
+ def
111
+ accordion_item
111
112
  # context = @act.main_action&.draft ? :warning : :default
112
113
  @format.accordion_item header,
113
114
  subheader: act_links,
data/lib/card/act.rb CHANGED
@@ -122,7 +122,7 @@ class Card
122
122
  def actions_affecting card
123
123
  actions.select do |action|
124
124
  (card.id == action.card_id) ||
125
- card.nestee_ids.include?(action.card_id)
125
+ card.history_card_ids.include?(action.card_id)
126
126
  end
127
127
  end
128
128
 
@@ -53,19 +53,29 @@ class Card
53
53
  end
54
54
  end
55
55
 
56
+ def relative_name
57
+ @action.card.name.from @format.card.name
58
+ end
59
+
56
60
  def name_diff
57
- return @action.card.name if @action.card.name.compound?
61
+ return relative_name if @action.card.name.compound?
58
62
  # TODO: handle compound names better
59
63
 
60
- if @action.card == @format.card
61
- name_changes
62
- else
63
- link_to_view(
64
- :related, name_changes,
65
- path: { slot: { items: { view: "history", nest_name: @action.card.name } } }
66
- # "data-slot-selector" => ".card-slot.history-view"
67
- )
68
- end
64
+ # if @action.card == @format.card
65
+ name_changes
66
+
67
+ # I commented out the following because it's hard to imagine it working; there
68
+ # no "related" view! But perhaps we do still need handling for this case, which
69
+ # is evidently for when there is a change involving a simple card that is not the
70
+ # act card??
71
+ #
72
+ # else
73
+ # link_to_view(
74
+ # :related, name_changes,
75
+ # path: { slot: { items: { view: "history", nest_name: @action.card.name } } }
76
+ # # "data-slot-selector" => ".card-slot.history-view"
77
+ # )
78
+ # end
69
79
  end
70
80
 
71
81
  def content_diff
data/set/all/history.rb CHANGED
@@ -3,6 +3,10 @@ def history?
3
3
  true
4
4
  end
5
5
 
6
+ def no_history?
7
+ !history?
8
+ end
9
+
6
10
  # all cards whose acts are considered part of this card's history
7
11
  def history_card_ids
8
12
  nestee_ids << id
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: card-mod-history
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.16.0
4
+ version: 0.17.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ethan McCutchen
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2023-11-18 00:00:00.000000000 Z
13
+ date: 2024-06-12 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: card
@@ -18,14 +18,14 @@ dependencies:
18
18
  requirements:
19
19
  - - '='
20
20
  - !ruby/object:Gem::Version
21
- version: 1.106.0
21
+ version: 1.107.0
22
22
  type: :runtime
23
23
  prerelease: false
24
24
  version_requirements: !ruby/object:Gem::Requirement
25
25
  requirements:
26
26
  - - '='
27
27
  - !ruby/object:Gem::Version
28
- version: 1.106.0
28
+ version: 1.107.0
29
29
  description: ''
30
30
  email:
31
31
  - info@decko.org
@@ -36,6 +36,7 @@ files:
36
36
  - LICENSE
37
37
  - README.md
38
38
  - assets/style/history.scss
39
+ - config/admin.yml
39
40
  - config/locales/de.yml
40
41
  - config/locales/en.yml
41
42
  - data/test.yml
@@ -81,14 +82,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
81
82
  requirements:
82
83
  - - ">="
83
84
  - !ruby/object:Gem::Version
84
- version: '2.5'
85
+ version: '3.0'
85
86
  required_rubygems_version: !ruby/object:Gem::Requirement
86
87
  requirements:
87
88
  - - ">="
88
89
  - !ruby/object:Gem::Version
89
90
  version: '0'
90
91
  requirements: []
91
- rubygems_version: 3.4.10
92
+ rubygems_version: 3.5.10
92
93
  signing_key:
93
94
  specification_version: 4
94
95
  summary: Revision histories in acts, actions, and changes