diff options
Diffstat (limited to 'app/views/node_actions/_change_details.html.erb')
| -rw-r--r-- | app/views/node_actions/_change_details.html.erb | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/app/views/node_actions/_change_details.html.erb b/app/views/node_actions/_change_details.html.erb new file mode 100644 index 0000000..2583e8b --- /dev/null +++ b/app/views/node_actions/_change_details.html.erb | |||
| @@ -0,0 +1,27 @@ | |||
| 1 | <details class="node_action_details"> | ||
| 2 | <summary><%= t("node_actions.show_changes") %></summary> | ||
| 3 | <table> | ||
| 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| %> | ||
| 16 | <tr> | ||
| 17 | <th><%= locale.upcase %></th> | ||
| 18 | <td> | ||
| 19 | <%= safe_join(translation_changes(diff), ", ") %> | ||
| 20 | <% if action_entry.page && action_entry.node %> | ||
| 21 | <%= link_to t("node_actions.view_revision"), node_revision_path(action_entry.node, action_entry.page, :locale => locale) %> | ||
| 22 | <% end %> | ||
| 23 | </td> | ||
| 24 | </tr> | ||
| 25 | <% end %> | ||
| 26 | </table> | ||
| 27 | </details> | ||
