Merge pull request #10886 from colinux/manager-fix-accessible-actions
ETQ super-admin, corrige l'affichage de certains boutons d'actions dans le manager
This commit is contained in:
commit
ecb3133cb9
5 changed files with 5 additions and 5 deletions
|
@ -29,7 +29,7 @@ as well as a link to its edit page.
|
||||||
'Modifier',
|
'Modifier',
|
||||||
[:edit, namespace, page.resource],
|
[:edit, namespace, page.resource],
|
||||||
class: "button",
|
class: "button",
|
||||||
) if accessible_action?(:edit, page.resource) && show_action?(:edit, page.resource) %>
|
) if accessible_action?(page.resource, :edit) %>
|
||||||
|
|
||||||
<%= link_to 'Réinviter', reinvite_manager_instructeur_path(instructeur), method: :post, class: 'button' %>
|
<%= link_to 'Réinviter', reinvite_manager_instructeur_path(instructeur), method: :post, class: 'button' %>
|
||||||
|
|
||||||
|
|
|
@ -78,7 +78,7 @@ to display a collection of resources in an HTML table.
|
||||||
|
|
||||||
<% collection_presenter.attributes_for(resource).each do |attribute| %>
|
<% collection_presenter.attributes_for(resource).each do |attribute| %>
|
||||||
<td class="cell-data cell-data--<%= attribute.html_class %>">
|
<td class="cell-data cell-data--<%= attribute.html_class %>">
|
||||||
<% if show_action? :show, resource -%>
|
<% if accessible_action?(resource, :show) -%>
|
||||||
<a href="<%= polymorphic_path([namespace, resource]) -%>"
|
<a href="<%= polymorphic_path([namespace, resource]) -%>"
|
||||||
tabindex="-1"
|
tabindex="-1"
|
||||||
class="action-show"
|
class="action-show"
|
||||||
|
|
|
@ -48,7 +48,7 @@ It renders the `_table` partial to display details about the resources.
|
||||||
),
|
),
|
||||||
[:new, namespace, page.resource_path.to_sym],
|
[:new, namespace, page.resource_path.to_sym],
|
||||||
class: "button",
|
class: "button",
|
||||||
) if accessible_action?(:new, page.resource) && show_action?(:new, new_resource) %>
|
) if accessible_action?(page.resource_name, :new) %>
|
||||||
</div>
|
</div>
|
||||||
</header>
|
</header>
|
||||||
|
|
||||||
|
|
|
@ -31,7 +31,7 @@ as well as a link to its edit page.
|
||||||
t("administrate.actions.edit_resource", name: page.page_title),
|
t("administrate.actions.edit_resource", name: page.page_title),
|
||||||
[:edit, namespace, page.resource],
|
[:edit, namespace, page.resource],
|
||||||
class: "button",
|
class: "button",
|
||||||
) if accessible_action?(:edit, page.resource) %>
|
) if accessible_action?(page.resource, :edit) %>
|
||||||
|
|
||||||
<%= link_to 'Aperçu', apercu_admin_procedure_path(procedure), class: 'button' %>
|
<%= link_to 'Aperçu', apercu_admin_procedure_path(procedure), class: 'button' %>
|
||||||
|
|
||||||
|
|
|
@ -48,7 +48,7 @@ It renders the `_table` partial to display details about the resources.
|
||||||
),
|
),
|
||||||
[:new, namespace, page.resource_path.to_sym],
|
[:new, namespace, page.resource_path.to_sym],
|
||||||
class: "button",
|
class: "button",
|
||||||
) if accessible_action?(:new, page.resource) && show_action?(:new, new_resource) %>
|
) if accessible_action?(page.resource_name, :new) %>
|
||||||
</div>
|
</div>
|
||||||
</header>
|
</header>
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue