% if attribute.resources.any? %> <% order = attribute.order_from_params(params.fetch(attribute.name, {})) %> <% page_number = params.fetch(attribute.name, {}).fetch(:page, nil) %>
" 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 %> | <% 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 %> | |
---|---|---|
<%= render_field field %> | <% end %> <% if false %><%= link_to( t("administrate.actions.edit"), [:edit, namespace, resource], class: "action-edit", ) if accessible_action?(resource, :edit) %> | <% end %> <% if existing_action?(attribute.associated_collection(order).resource_name, :destroy) %><%= 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' } %> | <% end %>