diff options
Diffstat (limited to 'app/helpers/node_actions_helper.rb')
| -rw-r--r-- | app/helpers/node_actions_helper.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/app/helpers/node_actions_helper.rb b/app/helpers/node_actions_helper.rb index fd8cc36e..02d1ba83 100644 --- a/app/helpers/node_actions_helper.rb +++ b/app/helpers/node_actions_helper.rb | |||
| @@ -180,4 +180,15 @@ module NodeActionsHelper | |||
| 180 | t("node_actions.destroy", :actor => actor_ref(action), :subject => subject_ref(action), | 180 | t("node_actions.destroy", :actor => actor_ref(action), :subject => subject_ref(action), |
| 181 | :path => h(action.metadata["path"])).html_safe | 181 | :path => h(action.metadata["path"])).html_safe |
| 182 | end | 182 | end |
| 183 | |||
| 184 | def summarize_asset_destroy action | ||
| 185 | m = action.metadata | ||
| 186 | parts = [t("node_actions.asset_destroy", :actor => actor_ref(action), | ||
| 187 | :asset => h(m["asset_name"].presence || m["path"]))] | ||
| 188 | parts << t("node_actions.asset_destroy_detached", | ||
| 189 | :paths => h(Array(m["detached_from"]).join(", "))) if m["detached_from"].present? | ||
| 190 | parts << t("node_actions.asset_destroy_headlines", | ||
| 191 | :paths => h(Array(m["headline_removed_from"]).join(", "))) if m["headline_removed_from"].present? | ||
| 192 | safe_join(parts, " ") | ||
| 193 | end | ||
| 183 | end | 194 | end |
