diff options
Diffstat (limited to 'app/views/node_actions/_change_details.html.erb')
| -rw-r--r-- | app/views/node_actions/_change_details.html.erb | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/app/views/node_actions/_change_details.html.erb b/app/views/node_actions/_change_details.html.erb index 383f53ad..2583e8bb 100644 --- a/app/views/node_actions/_change_details.html.erb +++ b/app/views/node_actions/_change_details.html.erb | |||
| @@ -1,27 +1,27 @@ | |||
| 1 | <details class="node_action_details"> | 1 | <details class="node_action_details"> |
| 2 | <summary><%= t("node_actions.show_changes") %></summary> | 2 | <summary><%= t("node_actions.show_changes") %></summary> |
| 3 | <table> | 3 | <table> |
| 4 | <% action_entry.metadata["translation_diff"].each do |locale, diff| %> | 4 | <% if (default_items = default_locale_changes(action_entry)).any? %> |
| 5 | <tr> | ||
| 6 | <th><%= I18n.default_locale.to_s.upcase %></th> | ||
| 7 | <td> | ||
| 8 | <%= safe_join(default_items, ", ") %> | ||
| 9 | <% if action_entry.page && action_entry.node %> | ||
| 10 | <%= link_to t("node_actions.view_revision"), node_revision_path(action_entry.node, action_entry.page) %> | ||
| 11 | <% end %> | ||
| 12 | </td> | ||
| 13 | </tr> | ||
| 14 | <% end %> | ||
| 15 | <% (action_entry.metadata["translation_diff"] || {}).each do |locale, diff| %> | ||
| 5 | <tr> | 16 | <tr> |
| 6 | <th><%= locale.upcase %></th> | 17 | <th><%= locale.upcase %></th> |
| 7 | <td> | 18 | <td> |
| 8 | <% case diff["status"] %> | 19 | <%= safe_join(translation_changes(diff), ", ") %> |
| 9 | <% when "added" %> | 20 | <% if action_entry.page && action_entry.node %> |
| 10 | <%= t("node_actions.locale_added", :title => diff.dig("title", "to")) %> | 21 | <%= link_to t("node_actions.view_revision"), node_revision_path(action_entry.node, action_entry.page, :locale => locale) %> |
| 11 | <% when "removed" %> | ||
| 12 | <%= t("node_actions.locale_removed", :title => diff.dig("title", "from")) %> | ||
| 13 | <% else %> | ||
| 14 | <% if diff["title"] %> | ||
| 15 | <%= diff.dig("title", "from") %> → <%= diff.dig("title", "to") %> | ||
| 16 | <% end %> | ||
| 17 | <%= t("node_actions.abstract_changed") if diff["abstract_changed"] %> | ||
| 18 | <%= t("node_actions.body_changed") if diff["body_changed"] %> | ||
| 19 | <% end %> | 22 | <% end %> |
| 20 | </td> | 23 | </td> |
| 21 | </tr> | 24 | </tr> |
| 22 | <% end %> | 25 | <% end %> |
| 23 | </table> | 26 | </table> |
| 24 | <% if action_entry.page && action_entry.node %> | ||
| 25 | <%= link_to t("node_actions.view_revision"), node_revision_path(action_entry.node, action_entry.page) %> | ||
| 26 | <% end %> | ||
| 27 | </details> | 27 | </details> |
