From 88aca4efed41fb665da14c1967082d8852d411ed Mon Sep 17 00:00:00 2001 From: elviabth Date: Tue, 30 Apr 2024 14:56:04 +0200 Subject: [PATCH] add survey icon to code_goups view --- .../decidim/anonymous_codes/admin/code_groups/index.html.erb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/views/decidim/anonymous_codes/admin/code_groups/index.html.erb b/app/views/decidim/anonymous_codes/admin/code_groups/index.html.erb index 91835f9..ecb1d4e 100644 --- a/app/views/decidim/anonymous_codes/admin/code_groups/index.html.erb +++ b/app/views/decidim/anonymous_codes/admin/code_groups/index.html.erb @@ -34,7 +34,9 @@ <%= icon_link_to "list", code_group_codes_path(group), t("actions.list_tokens", scope: "decidim.anonymous_codes.admin"), class: "action-icon--preview#{allowed_to?(:view, :anonymous_code_token) ? '':' invisible'}" %> <%= icon_link_to "pencil", edit_code_group_path(group), t("actions.edit", scope: "decidim.anonymous_codes.admin"), class: "action-icon--edit#{allowed_to?(:update, :anonymous_code_group, code_group: group) ? '' : ' invisible'}" %> <%= icon_link_to "circle-x", code_group_path(group), t("actions.destroy", scope: "decidim.anonymous_codes.admin"), method: :delete, class: "action-icon--remove#{allowed_to?(:destroy, :anonymous_code_group, code_group: group) ? '' : ' invisible'}", data: { confirm: t("actions.confirm_destroy", scope: "decidim.anonymous_codes.admin") } %> - <%= icon_link_to "share", surveys.group[:edit_path], t("actions.survey", scope: "decidim.anonymous_codes.admin"), class: "#{group.tokens_count > 0 ? '' : ' invisible'}", target: "_blank" %> + <% surveys.each do |survey| %> + <%= icon_link_to "share", survey[:edit_path], t("actions.survey", scope: "decidim.anonymous_codes.admin"), class: "#{survey[:group].tokens_count > 0 ? '' : ' invisible'}", target: "_blank" %> + <% end %> <% end %>