mirror of
https://github.com/e107inc/e107.git
synced 2025-08-20 13:21:54 +02:00
Issue #4020 2 new prefs added. Allow default collapsing of side-bar and enable/disable labels on nav-bar.
Icon cleanup and will now try to guess the right icon based on mode/action. Styling fixes. Removed unused admin stylesheets from bootstrap3.
This commit is contained in:
@@ -1635,7 +1635,7 @@ class e_admin_dispatcher
|
||||
// guess an icon.
|
||||
if(!isset($var[$key]['image_src']))
|
||||
{
|
||||
$var[$key]['image_src'] = $this->guessMenuIcon($key);
|
||||
$var[$key]['image_src'] = e_navigation::guessMenuIcon($key);
|
||||
}
|
||||
|
||||
|
||||
@@ -1700,50 +1700,6 @@ class e_admin_dispatcher
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Guess the admin menu item icon based on the path
|
||||
* @param $key
|
||||
* @return string
|
||||
*/
|
||||
private function guessMenuIcon($key)
|
||||
{
|
||||
list($mode, $action) = explode('/',$key);
|
||||
|
||||
switch($action)
|
||||
{
|
||||
case 'list':
|
||||
$ret = $ret = ($mode === 'cat') ? 'fa-folder.glyph' : 'fa-list.glyph';
|
||||
break;
|
||||
|
||||
case 'options':
|
||||
case 'prefs':
|
||||
$ret = 'fa-cog.glyph';
|
||||
break;
|
||||
|
||||
case 'create':
|
||||
$ret = ($mode === 'cat') ? 'fa-folder-plus.glyph' : 'fa-plus.glyph';
|
||||
break;
|
||||
|
||||
case 'tools':
|
||||
case 'maint':
|
||||
$ret = 'fas-toolbox.glyph';
|
||||
break;
|
||||
|
||||
case 'import':
|
||||
case 'upload':
|
||||
$ret = 'fa-upload.glyph';
|
||||
break;
|
||||
|
||||
default:
|
||||
$ret = 'fa-question.glyph';
|
||||
// code to be executed if n is different from all labels;
|
||||
}
|
||||
|
||||
|
||||
return $ret;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Render Help Text in <ul> format. XXX TODO
|
||||
*/
|
||||
|
Reference in New Issue
Block a user