Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@
<thead>
<tr>
<th><%= t("models.translation_sets.fields.name", scope: "decidim.term_customizer.admin") %></th>
<th><%= t("models.translation_sets.fields.keys", scope: "decidim.term_customizer.admin") %></th>
<th><%= t("models.translation_sets.fields.total", scope: "decidim.term_customizer.admin") %>
Comment thread
ElviaBth marked this conversation as resolved.
Outdated
<th class="actions"><%= t("actions.title", scope: "decidim.term_customizer.admin") %></th>
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Outdated
</tr>
</thead>
Expand All @@ -34,6 +36,11 @@
<%= translated_attribute(set.name) %>
<% end %>
</td>
<td>
<% preview_keys = set.translations.limit(4).pluck(:key) %>
<%= preview_keys.first(3).join(", ") %><%= "..." if preview_keys.size > 3 %>
</td>
<td><%= set.translations.count %></td>
Comment thread
ElviaBth marked this conversation as resolved.
Comment thread
ElviaBth marked this conversation as resolved.
<td class="table-list__actions large-3">
<% if allowed_to? :read, :translation %>
<%= icon_link_to "eye-line", translation_set_translations_path(set), t("actions.view", scope: "decidim.term_customizer.admin"), class: "action-icon--show" %>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
</div>

<div class="flex items-center gap-x-4">

<%= render partial: "decidim/term_customizer/admin/translations/bulk_actions/dropdown" %>
<% if allowed_to? :create, :translation %>
<%= link_to t("actions.add_multiple_translations", scope: "decidim.term_customizer.admin"), translation_set_add_translations_path(set), class: "button button__sm button__secondary" %>
Expand All @@ -21,6 +22,9 @@
<% if set.translations.count > 0 && allowed_to?(:export, :translation_set, translation_set: set) %>
<%= render partial: "export_dropdown" %>
<% end %>
<% if allowed_to? :update, :organization %>
<%= link_to t("actions.clear_cache", scope: "decidim.term_customizer.admin"), clear_caches_path, method: :delete, class: "imports-example tiny button button__sm button__secondary button--simple mr-2", data: { confirm: t("actions.confirm_destroy", scope: "decidim.admin") } %>
Comment thread
ElviaBth marked this conversation as resolved.
Outdated
<% end %>
Comment thread
ElviaBth marked this conversation as resolved.
</div>

<%= render partial: "decidim/term_customizer/admin/translations/bulk_actions/destroy" %>
Expand Down
2 changes: 2 additions & 0 deletions config/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ en:
translation_sets:
fields:
name: Name
keys: Keys
total: Total translations
Comment thread
ElviaBth marked this conversation as resolved.
translations:
fields:
key: Translation key
Expand Down
Loading