Commit c3846584 authored by Sylvain's avatar Sylvain

ActionMenu - modification droit

parent 15ebfddb
......@@ -45,6 +45,7 @@ class ActionMenu
'label' => '<i class="fa fa-eye mr-2"></i>' . __('Consulter'),
'href' => ['condition' => [
'value' => $this->can('read'),
'comparator' => true,
'false' => '#',
'true' => ['template' => [
'format' => '%s/read/%s',
......@@ -59,6 +60,7 @@ class ActionMenu
'label' => '<i class="fa fa-eye mr-2"></i>' . __('Consulter'),
'href' => ['condition' => [
'value' => $this->can('read'),
'comparator' => true,
'false' => '#',
'true' => ['template' => [
'format' => '%s/read/%s',
......@@ -73,6 +75,7 @@ class ActionMenu
'label' => '<i class="fa fa-pencil-square-o mr-2"></i>' . __('Modifier'),
'href' => ['condition' => [
'value' => $this->can('update'),
'comparator' => true,
'false' => '#',
'true' => ['template' => [
'format' => '%s/edit/%s',
......@@ -87,6 +90,7 @@ class ActionMenu
'label' => '<i class="fa fa-pencil-square-o mr-2"></i>' . __('Modifier'),
'href' => ['condition' => [
'value' => $this->can('update'),
'comparator' => true,
'false' => '#',
'true' => ['template' => [
'format' => '%s/update/%s',
......@@ -101,6 +105,7 @@ class ActionMenu
'label' => '<i class="fa fa-clone mr-2"></i>' . __('Dupliquer'),
'href' => ['condition' => [
'value' => $this->can('create'),
'comparator' => true,
'false' => '#',
'true' => ['template' => [
'format' => '%s/duplicate/%s',
......@@ -117,6 +122,7 @@ class ActionMenu
'attributes' => [
'data-href' => ['condition' => [
'value' => $this->can('delete'),
'comparator' => true,
'false' => '#',
'true' => ['template' => [
'format' => '%s/destroy/%s',
......@@ -130,6 +136,7 @@ class ActionMenu
'label' => '<i class="fa fa-plus mr-2"></i>' . __('Ajouter'),
'href' => ['condition' => [
'value' => $this->can('create'),
'comparator' => true,
'false' => '#',
'true' => ['template' => [
'format' => '%s/create',
......@@ -144,6 +151,7 @@ class ActionMenu
'label' => '<i class="fa fa-plus mr-2"></i>' . __('Ajouter'),
'href' => ['condition' => [
'value' => $this->can('create'),
'comparator' => true,
'false' => '#',
'true' => ['template' => [
'format' => '%s/create',
......@@ -158,6 +166,7 @@ class ActionMenu
'label' => '<i class="fa fa-file-excel-o mr-2"></i>' . __('Exporter'),
'href' => ['condition' => [
'value' => $this->can('read'),
'comparator' => true,
'false' => '#',
'true' => ['template' => [
'format' => '%s/export',
......@@ -174,6 +183,7 @@ class ActionMenu
'attributes' => [
'data-href' => ['condition' => [
'value' => $this->can('delete'),
'comparator' => true,
'false' => '#',
'true' => ['template' => [
'format' => '%s/truncate',
......@@ -189,6 +199,7 @@ class ActionMenu
'attributes' => [
'data-href' => ['condition' => [
'value' => $this->can('update'),
'comparator' => true,
'false' => '#',
'true' => ['template' => [
'format' => '%s/reset-position',
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment