1
0
mirror of https://github.com/e107inc/e107.git synced 2025-01-17 20:58:30 +01:00

Admin-ui: Improved adminMenu highlighting when custom uri in use.

Plugin Builder: added menu divider example.
This commit is contained in:
Cameron 2018-05-23 16:29:37 -07:00
parent d512035eb6
commit d7e3caae83
2 changed files with 24 additions and 3 deletions

View File

@ -5122,7 +5122,9 @@ $text .= "
";
}
$text .= "
// 'main/custom' => array('caption'=> 'Custom Page', 'perm' => 'P')
// 'main/div0' => array('divider'=> true),
// 'main/custom' => array('caption'=> 'Custom Page', 'perm' => 'P'),
);
protected \$adminMenuAliases = array(

View File

@ -1479,6 +1479,7 @@ class e_admin_dispatcher
$tp = e107::getParser();
$var = array();
$selected = false;
foreach($this->adminMenu as $key => $val)
{
@ -1516,6 +1517,12 @@ class e_admin_dispatcher
case 'uri':
$k2 = 'link';
$v = $tp->replaceConstants($v, 'abs');
if(!empty($v) && (e_REQUEST_URI === $v))
{
$selected = $key;
}
break;
default:
@ -1880,6 +1887,8 @@ class e_admin_controller
$data = $_dispatcher->getPageTitles();
$search = $this->getMode().'/'.$this->getAction();
if(isset($data[$search]))
{
$res['caption'] = $data[$search];
@ -2165,6 +2174,9 @@ class e_admin_controller
$this->addTitle('#'.$this->getId()); // Inform user of which record is being edited.
}
ob_start(); //catch any output
$ret = $this->{$actionName}();
@ -5478,6 +5490,13 @@ class e_admin_ui extends e_admin_controller_ui
$this->getTreeModel()->setParam('db_query', $this->_modifyListQry(false, false, false, false, $this->listQry))->load();
$this->addTitle();
if($this->getQuery('filter_options'))
{
// var_dump($this);
// $this->addTitle("to-do"); // display filter option when active.
}
}
/**