<%= t("assembly_user_roles.index.assembly_admins_title", scope: "decidim.admin") %> <% if allowed_to? :create, :assembly_user_role %> <%= link_to t("actions.new", scope: "decidim.admin", name: t("models.assembly_user_role.name", scope: "decidim.admin")), new_assembly_user_role_path(current_assembly), class: "button tiny button--title new" %> <% end %>

<% @assembly_user_roles.each do |role| %> <% end %>
<%= t("models.assembly_user_role.fields.name", scope: "decidim.admin") %> <%= t("models.assembly_user_role.fields.email", scope: "decidim.admin") %> <%= t("models.user.fields.invitation_sent_at", scope: "decidim.admin") %> <%= t("models.user.fields.invitation_accepted_at", scope: "decidim.admin") %> <%= t("models.assembly_user_role.fields.role", scope: "decidim.admin") %>
<%= role.user.name %>
<%= role.user.email %>
<% if role.user.invitation_sent_at %> <%= l role.user.invitation_sent_at, format: :short %> <% end %> <% if role.user.invitation_accepted_at %> <%= l role.user.invitation_accepted_at, format: :short %> <% end %> <%= t("#{role.role}", scope: "decidim.admin.models.assembly_user_role.roles") %>
<% if allowed_to?(:invite, :assembly_user_role, user_role: role) && role.user.invited_to_sign_up? %> <%= icon_link_to "reload", resend_invitation_assembly_user_role_path(current_assembly, role), t("actions.resend_invitation", scope: "decidim.admin"), class: "resend-invitation", method: :post %> <% end %> <% if allowed_to? :update, :assembly_user_role, user_role: role %> <%= icon_link_to "pencil", edit_assembly_user_role_path(current_assembly, role), t("actions.edit", scope: "decidim.admin"), class: "action-icon--edit" %> <% end %> <% if allowed_to? :destroy, :assembly_user_role, user_role: role %> <%= icon_link_to "circle-x", assembly_user_role_path(current_assembly, role), t("actions.destroy", scope: "decidim.admin"), class: "action-icon--remove", method: :delete, data: { confirm: t("actions.confirm_destroy", scope: "decidim.admin") } %> <% end %>