diff options
| author | erdgeist <erdgeist@erdgeist.org> | 2026-08-08 02:46:06 +0200 |
|---|---|---|
| committer | erdgeist <erdgeist@erdgeist.org> | 2026-08-08 02:46:06 +0200 |
| commit | 1a037ac6fab34c5f65ed0f37ed603b88e7b02fd1 (patch) | |
| tree | 48af0eab79ea64c9ca92833d415483773e665305 /app/helpers | |
| parent | 5699572861085bfb0b375f44e2f35ee8eee3f8c6 (diff) | |
Move the external homepage onto the draft
Diffstat (limited to 'app/helpers')
| -rw-r--r-- | app/helpers/node_actions_helper.rb | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/app/helpers/node_actions_helper.rb b/app/helpers/node_actions_helper.rb index 19385543..f21fee61 100644 --- a/app/helpers/node_actions_helper.rb +++ b/app/helpers/node_actions_helper.rb | |||
| @@ -28,8 +28,7 @@ module NodeActionsHelper | |||
| 28 | "admin_revoke" => "shield-minus", | 28 | "admin_revoke" => "shield-minus", |
| 29 | "event_create" => "calendar-plus", | 29 | "event_create" => "calendar-plus", |
| 30 | "event_update" => "calendar-event", | 30 | "event_update" => "calendar-event", |
| 31 | "event_destroy" => "calendar-x", | 31 | "event_destroy" => "calendar-x" |
| 32 | "node_external_url" => "world" | ||
| 33 | }.freeze | 32 | }.freeze |
| 34 | 33 | ||
| 35 | def verb_icon action | 34 | def verb_icon action |
| @@ -67,7 +66,7 @@ module NodeActionsHelper | |||
| 67 | return true if m["title"].is_a?(Hash) && m.dig("title", "from") != m.dig("title", "to") | 66 | return true if m["title"].is_a?(Hash) && m.dig("title", "from") != m.dig("title", "to") |
| 68 | return true if m["external_url"].present? | 67 | return true if m["external_url"].present? |
| 69 | %w[author tags template_changed assets assets_changed assets_reordered | 68 | %w[author tags template_changed assets assets_changed assets_reordered |
| 70 | abstract_changed body_changed].any? { |key| m[key].present? } | 69 | abstract_changed body_changed external_url].any? { |key| m[key].present? } |
| 71 | end | 70 | end |
| 72 | 71 | ||
| 73 | def default_locale_changes action | 72 | def default_locale_changes action |
| @@ -95,6 +94,11 @@ module NodeActionsHelper | |||
| 95 | :names => linked_asset_names(action, names)).html_safe | 94 | :names => linked_asset_names(action, names)).html_safe |
| 96 | end | 95 | end |
| 97 | end | 96 | end |
| 97 | if m["external_url"] | ||
| 98 | items << t("node_actions.detail_external_url", | ||
| 99 | :from => m.dig("external_url", "from").presence || t("node_actions.event_none"), | ||
| 100 | :to => m.dig("external_url", "to").presence || t("node_actions.event_none")) | ||
| 101 | end | ||
| 98 | items << t("node_actions.assets_reordered") if m["assets_reordered"] | 102 | items << t("node_actions.assets_reordered") if m["assets_reordered"] |
| 99 | items << t("node_actions.assets_changed") if m["assets_changed"] | 103 | items << t("node_actions.assets_changed") if m["assets_changed"] |
| 100 | items << t("node_actions.detail_external_url", | 104 | items << t("node_actions.detail_external_url", |
| @@ -405,11 +409,6 @@ module NodeActionsHelper | |||
| 405 | event_sentence(action, "event_destroy") | 409 | event_sentence(action, "event_destroy") |
| 406 | end | 410 | end |
| 407 | 411 | ||
| 408 | def summarize_node_external_url action | ||
| 409 | t("node_actions.node_external_url", :actor => actor_ref(action), | ||
| 410 | :subject => subject_ref(action)).html_safe | ||
| 411 | end | ||
| 412 | |||
| 413 | def event_sentence action, key | 412 | def event_sentence action, key |
| 414 | if action.node | 413 | if action.node |
| 415 | t("node_actions.#{key}_on", :actor => actor_ref(action), | 414 | t("node_actions.#{key}_on", :actor => actor_ref(action), |
