<% add_decidim_page_title(t("assembly_members_title", scope: "decidim.admin.assembly_members.index")) %>

<%= t("assembly_members_title", scope: "decidim.admin.assembly_members.index") %> <% if allowed_to? :create, :assembly_member %> <%= link_to t("actions.new_assembly_member", scope: "decidim.admin"), new_assembly_member_path(current_assembly), class: "button button__sm button__secondary new" %> <% end %>

<%= admin_filter_selector %>
<% @assembly_members.each do |member| %> <% member_presenter = Decidim::Admin::AssemblyMemberPresenter.new(member) %> <% end %>
<%= t("models.assembly_member.fields.full_name", scope: "decidim.admin") %> <%= t("models.assembly_member.fields.position", scope: "decidim.admin") %> <%= t("models.assembly_member.fields.designation_date", scope: "decidim.admin") %> <%= t("models.assembly_member.fields.ceased_date", scope: "decidim.admin") %>
<%= member_presenter.name %> <%= member_presenter.position %> <%= l member.designation_date, format: :decidim_short %> <%= member.ceased_date ? l(member.ceased_date, format: :decidim_short) : nil %> <% if allowed_to? :update, :assembly_member, member: member %> <%= icon_link_to "pencil-line", edit_assembly_member_path(current_assembly, member), t("actions.edit", scope: "decidim.admin"), class: "action-icon--edit" %> <% end %> <% if allowed_to? :destroy, :assembly_member, member: member %> <%= icon_link_to "delete-bin-line", assembly_member_path(current_assembly, member), t("actions.destroy", scope: "decidim.admin"), class: "action-icon--remove", method: :delete, data: { confirm: t("actions.confirm_destroy", scope: "decidim.admin") } %> <% end %>
<%= decidim_paginate @assembly_members %>