<% if attribute.resources.any? %> <% order = attribute.order_from_params(params.fetch(attribute.name, {})) %> <% page_number = params.fetch(attribute.name, {}).fetch(:page, nil) %> <% attribute.associated_collection(order).attribute_types.select{ |attr_name, attr_type| [:id, :user].include?(attr_name) }.each do |attr_name, attr_type| %> <% end %> <% [false && existing_action?(attribute.associated_collection(order).resource_name, :edit), existing_action?(attribute.associated_collection(order).resource_name, :destroy)].count(true).times do %> <% end %> <% attribute.resources(page_number, order).each do |resource| %> <% attribute.associated_collection(order).attributes_for(resource).select{ |field| ["id", "user"].include?(field.name) }.each do |field| %> <% end %> <% if false %> <% end %> <% if existing_action?(attribute.associated_collection(order).resource_name, :destroy) %> <% end %> <% end %>
" scope="col" aria-sort="<%= sort_order(attribute.associated_collection(order).ordered_html_class(attr_name)) %>"> <%= link_to(sanitized_order_params(page, attribute.name).merge( attribute.associated_collection(order).order_params_for(attr_name, key: attribute.name) )) do %> <%= t( "helpers.label.#{attribute.associated_collection(order).resource_name}.#{attr_name}", default: attribute.associated_class.human_attribute_name(attr_name).titleize, ) %> <% if attribute.associated_collection(order).ordered_by?(attr_name) %> <% end %> <% end %>
<%= render_field field %> <%= link_to( t("administrate.actions.edit"), [:edit, namespace, resource], class: "action-edit", ) if accessible_action?(resource, :edit) %><%= button_to 'Retirer', { action: :remove_gestionnaire, id: page.resource.id }, { method: :delete, data: { confirm: t("administrate.actions.confirm") }, params: { gestionnaire: { id: resource.id }}, class: 'fr-btn fr-btn--secondary' } %>
<% if attribute.more_than_limit? %> <%= render("pagination", resources: attribute.resources(page_number), param_name: "#{attribute.name}[page]") %> <% end %> <% else %> <%= t("administrate.fields.has_many.none", default: "–") %> <% end %> <%= form_tag(add_gestionnaire_manager_groupe_gestionnaire_path(page.resource), style: 'margin-top: 1rem;') do %> <%= email_field_tag(:emails, '', placeholder: 'Emails', autocapitalize: 'off', autocorrect: 'off', spellcheck: 'false', style: 'margin-bottom: 1rem;width:24rem;') %> <% end %>