forked from ZwiiCMS-Team/ZwiiCampus
Layout d'édition : supprime tous les boutons de gestion de page comme pour les pages avec module
This commit is contained in:
parent
f0c4ea6bd0
commit
5be3d0b1a7
@ -1018,7 +1018,10 @@ class layout extends common
|
|||||||
or $this->getUrl(0) === ''
|
or $this->getUrl(0) === ''
|
||||||
) {
|
) {
|
||||||
// Bouton Editer une page
|
// Bouton Editer une page
|
||||||
if ($this->getUser('permission', 'page', 'edit') and $this->geturl(1) !== 'edit') {
|
if (
|
||||||
|
$this->getUser('permission', 'page', 'edit')
|
||||||
|
and $this->geturl(1) !== 'edit'
|
||||||
|
) {
|
||||||
$leftItems .= '<li>' . template::ico('pencil', [
|
$leftItems .= '<li>' . template::ico('pencil', [
|
||||||
'href' => helper::baseUrl() . 'page/edit/' . $this->getUrl(0) . '/' . self::$siteContent,
|
'href' => helper::baseUrl() . 'page/edit/' . $this->getUrl(0) . '/' . self::$siteContent,
|
||||||
'help' => 'Éditer la page'
|
'help' => 'Éditer la page'
|
||||||
@ -1027,7 +1030,8 @@ class layout extends common
|
|||||||
// Bouton Editer le module d'une page
|
// Bouton Editer le module d'une page
|
||||||
if (
|
if (
|
||||||
$this->getUser('permission', 'page', 'module')
|
$this->getUser('permission', 'page', 'module')
|
||||||
&& $this->getData(['page', $this->getUrl(0), 'moduleId'])
|
and $this->geturl(1) !== 'edit'
|
||||||
|
and $this->getData(['page', $this->getUrl(0), 'moduleId'])
|
||||||
) {
|
) {
|
||||||
$leftItems .= '<li>' . template::ico('gear', [
|
$leftItems .= '<li>' . template::ico('gear', [
|
||||||
'href' => helper::baseUrl() . $this->getUrl(0) . '/config',
|
'href' => helper::baseUrl() . $this->getUrl(0) . '/config',
|
||||||
@ -1037,6 +1041,7 @@ class layout extends common
|
|||||||
// Bouton dupliquer une page
|
// Bouton dupliquer une page
|
||||||
if (
|
if (
|
||||||
$this->getUser('permission', 'page', 'duplicate')
|
$this->getUser('permission', 'page', 'duplicate')
|
||||||
|
and $this->geturl(1) !== 'edit'
|
||||||
) {
|
) {
|
||||||
$leftItems .= '<li>' . template::ico('clone', [
|
$leftItems .= '<li>' . template::ico('clone', [
|
||||||
'href' => helper::baseUrl() . 'page/duplicate/' . $this->getUrl(0) . '/' . self::$siteContent,
|
'href' => helper::baseUrl() . 'page/duplicate/' . $this->getUrl(0) . '/' . self::$siteContent,
|
||||||
@ -1047,6 +1052,8 @@ class layout extends common
|
|||||||
// Bouton Effacer une page
|
// Bouton Effacer une page
|
||||||
if (
|
if (
|
||||||
$this->getUser('permission', 'page', 'delete')
|
$this->getUser('permission', 'page', 'delete')
|
||||||
|
and $this->geturl(1) !== 'edit'
|
||||||
|
|
||||||
) {
|
) {
|
||||||
$leftItems .= '<li>' . template::ico('trash', [
|
$leftItems .= '<li>' . template::ico('trash', [
|
||||||
'href' => helper::baseUrl() . 'page/delete/' . $this->getUrl(0) . '/' . self::$siteContent,
|
'href' => helper::baseUrl() . 'page/delete/' . $this->getUrl(0) . '/' . self::$siteContent,
|
||||||
|
Loading…
Reference in New Issue
Block a user