diff options
| author | erdgeist <erdgeist@erdgeist.org> | 2026-07-23 17:49:18 +0200 |
|---|---|---|
| committer | erdgeist <erdgeist@erdgeist.org> | 2026-07-23 17:49:18 +0200 |
| commit | f993853db3e233f05a55de5ba2a87b77acf041aa (patch) | |
| tree | 0a28289ff471ab5853b22c2a68ed21ce4e0eb4ac /app/helpers | |
| parent | 932d4a4be40587fa6d489eca16a1ef6d6f2936d1 (diff) | |
Record asset deltas at publish, with changed assets as participants
Diffstat (limited to 'app/helpers')
| -rw-r--r-- | app/helpers/node_actions_helper.rb | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/app/helpers/node_actions_helper.rb b/app/helpers/node_actions_helper.rb index ed8d0407..4041ffa9 100644 --- a/app/helpers/node_actions_helper.rb +++ b/app/helpers/node_actions_helper.rb | |||
| @@ -49,7 +49,7 @@ module NodeActionsHelper | |||
| 49 | m = action.metadata | 49 | m = action.metadata |
| 50 | return true if m["translation_diff"].present? | 50 | return true if m["translation_diff"].present? |
| 51 | return true if m["title"].is_a?(Hash) && m.dig("title", "from") != m.dig("title", "to") | 51 | return true if m["title"].is_a?(Hash) && m.dig("title", "from") != m.dig("title", "to") |
| 52 | %w[author tags template_changed assets_changed | 52 | %w[author tags template_changed assets assets_changed assets_reordered |
| 53 | abstract_changed body_changed].any? { |key| m[key].present? } | 53 | abstract_changed body_changed].any? { |key| m[key].present? } |
| 54 | end | 54 | end |
| 55 | 55 | ||
| @@ -69,6 +69,13 @@ module NodeActionsHelper | |||
| 69 | items << t("node_actions.abstract_changed") if m["abstract_changed"] | 69 | items << t("node_actions.abstract_changed") if m["abstract_changed"] |
| 70 | items << t("node_actions.body_changed") if m["body_changed"] | 70 | items << t("node_actions.body_changed") if m["body_changed"] |
| 71 | items << t("node_actions.template_changed") if m["template_changed"] | 71 | items << t("node_actions.template_changed") if m["template_changed"] |
| 72 | if m["assets"] | ||
| 73 | items << t("node_actions.detail_assets_added", | ||
| 74 | :names => Array(m.dig("assets", "added")).join(", ")) if m.dig("assets", "added") | ||
| 75 | items << t("node_actions.detail_assets_removed", | ||
| 76 | :names => Array(m.dig("assets", "removed")).join(", ")) if m.dig("assets", "removed") | ||
| 77 | end | ||
| 78 | items << t("node_actions.assets_reordered") if m["assets_reordered"] | ||
| 72 | items << t("node_actions.assets_changed") if m["assets_changed"] | 79 | items << t("node_actions.assets_changed") if m["assets_changed"] |
| 73 | items | 80 | items |
| 74 | end | 81 | end |
