mirror of
https://github.com/e107inc/e107.git
synced 2025-07-16 20:41:27 +02:00
Closes #4827 - Page/Menu delete perm added.
This commit is contained in:
@@ -146,7 +146,7 @@ class page_admin_form_ui extends e_admin_form_ui
|
|||||||
$text = "<a href='".e_SELF."?{$query}' class='btn btn-default' title='".LAN_EDIT."' data-toggle='tooltip' data-bs-toggle='tooltip' data-placement='left'>
|
$text = "<a href='".e_SELF."?{$query}' class='btn btn-default' title='".LAN_EDIT."' data-toggle='tooltip' data-bs-toggle='tooltip' data-placement='left'>
|
||||||
".ADMIN_EDIT_ICON."</a>";
|
".ADMIN_EDIT_ICON."</a>";
|
||||||
|
|
||||||
if($this->getController()->getMode() === 'overview')
|
if($this->getController()->getMode() === 'overview' && getperms('J1')) // Page/Menu Delete Perms.
|
||||||
{
|
{
|
||||||
$text .= $this->submit_image('menu_delete['.$id.']', $id, 'delete', LAN_DELETE.' [ ID: '.$id.' ]', array('class' => 'action delete btn btn-default'));
|
$text .= $this->submit_image('menu_delete['.$id.']', $id, 'delete', LAN_DELETE.' [ ID: '.$id.' ]', array('class' => 'action delete btn btn-default'));
|
||||||
}
|
}
|
||||||
@@ -389,14 +389,24 @@ class page_chapters_form_ui extends e_admin_form_ui
|
|||||||
{
|
{
|
||||||
//$id = $this->getController()->getListModel()->get('page_id');
|
//$id = $this->getController()->getListModel()->get('page_id');
|
||||||
// return "<a href='".e_BASE."page.php?".$id."' >".$curVal."</a>";
|
// return "<a href='".e_BASE."page.php?".$id."' >".$curVal."</a>";
|
||||||
|
|
||||||
|
if($attributes['mode'] !== 'read')
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
$parent = $this->getController()->getListModel()->get('chapter_parent');
|
$parent = $this->getController()->getListModel()->get('chapter_parent');
|
||||||
// $id = $this->getController()->getListModel()->get('chapter_id');
|
// $id = $this->getController()->getListModel()->get('chapter_id');
|
||||||
$att['readParms'] = 'sort=1';
|
$att = [];
|
||||||
|
$att['readParms']['sort'] = 1;
|
||||||
|
|
||||||
|
if(!getperms('J1')) // Page/Menu Delete Perms.
|
||||||
if($attributes['mode'] == 'read')
|
|
||||||
{
|
{
|
||||||
|
$att['readParms']['deleteClass'] = e_UC_NOBODY;
|
||||||
|
}
|
||||||
|
|
||||||
$text = "<div class='btn-group'>";
|
$text = "<div class='btn-group'>";
|
||||||
|
|
||||||
$text .= $this->renderValue('options',$value,$att,$id);
|
$text .= $this->renderValue('options',$value,$att,$id);
|
||||||
|
|
||||||
if($parent != 0)
|
if($parent != 0)
|
||||||
@@ -405,10 +415,9 @@ class page_chapters_form_ui extends e_admin_form_ui
|
|||||||
$text .= "<a href='".$link."' class='btn btn-default' title='".CUSLAN_58."'>".ADMIN_PAGES_ICON."</a>"; //
|
$text .= "<a href='".$link."' class='btn btn-default' title='".CUSLAN_58."'>".ADMIN_PAGES_ICON."</a>"; //
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
$text .= "</div>";
|
$text .= "</div>";
|
||||||
return $text;
|
return $text;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -1948,6 +1948,7 @@ class e_userperms
|
|||||||
// Content
|
// Content
|
||||||
"5" => array(ADLAN_42,E_16_CUST, E_32_CUST), // create/edit custom PAGES
|
"5" => array(ADLAN_42,E_16_CUST, E_32_CUST), // create/edit custom PAGES
|
||||||
"J" => array(ADLAN_42,E_16_CUST, E_32_CUST), // create/edit custom MENUS
|
"J" => array(ADLAN_42,E_16_CUST, E_32_CUST), // create/edit custom MENUS
|
||||||
|
"J1" => array(ADLAN_42." (".LAN_DELETE.")",E_16_CUST, E_32_CUST), // Delete Pages/Menus.
|
||||||
|
|
||||||
"H" => array(ADLAN_0,E_16_NEWS, E_32_NEWS), // Post News - All Areas except settings.
|
"H" => array(ADLAN_0,E_16_NEWS, E_32_NEWS), // Post News - All Areas except settings.
|
||||||
"H0" => array(ADLAN_0." (".LAN_CREATE.")",E_16_NEWS, E_32_NEWS), // Create News Items
|
"H0" => array(ADLAN_0." (".LAN_CREATE.")",E_16_NEWS, E_32_NEWS), // Create News Items
|
||||||
|
Reference in New Issue
Block a user