mirror of
https://github.com/e107inc/e107.git
synced 2025-08-22 22:25:31 +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:
@@ -40,7 +40,7 @@ if($adminTheme !== 'bootstrap3' && $adminTheme !== 'bootstrap5')
|
||||
$admincss = trim($core->get('admincss'));
|
||||
if(empty($admincss) || $admincss === 'style.css'|| $admincss === 'admin_dark.css' || $admincss === 'admin_light.css')
|
||||
{
|
||||
$core->update('admincss','css/bootstrap-dark.min.css');
|
||||
$core->update('admincss','css/modern-light.css');
|
||||
$core->save(false,true);
|
||||
e107::getRedirect()->redirect(e_SELF);
|
||||
}
|
||||
|
@@ -35,9 +35,9 @@ class eurl_admin extends e_admin_dispatcher
|
||||
);
|
||||
|
||||
protected $adminMenu = array(
|
||||
'main/config' => array('caption'=> LAN_EURL_MENU_PROFILES, 'perm' => 'L'),
|
||||
'main/alias' => array('caption'=> LAN_EURL_MENU_ALIASES, 'perm' => 'L'),
|
||||
'main/simple' => array('caption'=> LAN_EURL_MENU_CONFIG, 'perm' => 'L'),
|
||||
'main/config' => array('caption'=> LAN_EURL_MENU_PROFILES, 'perm' => 'L', 'icon'=>'fas-list'),
|
||||
'main/alias' => array('caption'=> LAN_EURL_MENU_ALIASES, 'perm' => 'L', 'icon'=>'fas-edit'),
|
||||
'main/simple' => array('caption'=> LAN_EURL_MENU_CONFIG, 'perm' => 'L', 'icon'=>'fas-sliders-h'),
|
||||
'main/settings' => array('caption'=> LAN_EURL_MENU_SETTINGS, 'perm' => 'L'),
|
||||
|
||||
// 'main/help' => array('caption'=> LAN_EURL_MENU_HELP, 'perm' => 'L'),
|
||||
|
@@ -741,10 +741,5 @@ function frontpage_adminmenu()
|
||||
|
||||
return e107::getNav()->admin($caption, $action, $var);
|
||||
|
||||
|
||||
|
||||
// show_admin_menu($caption, $action, $var);
|
||||
}
|
||||
|
||||
|
||||
?>
|
@@ -49,7 +49,7 @@ if(!empty($_GET['iframe']))
|
||||
protected $adminMenu = array(
|
||||
|
||||
'main/prefs' => array('caption'=> LAN_PREFS, 'perm' => '0'),
|
||||
'main/tools' => array('caption'=>LANG_LAN_21, 'perm'=>'L')
|
||||
'main/tools' => array('caption'=>LANG_LAN_21, 'perm'=>'L', 'icon'=>'fas-tools')
|
||||
|
||||
);
|
||||
|
||||
@@ -70,7 +70,7 @@ if(!empty($_GET['iframe']))
|
||||
{
|
||||
$this->adminMenu = array(
|
||||
'main/prefs' => $this->adminMenu['main/prefs'],
|
||||
'main/db' => array('caption'=> LANG_LAN_03, 'perm' => 'P'),
|
||||
'main/db' => array('caption'=> LANG_LAN_03, 'perm' => 'P', 'icon'=>'fas-database'),
|
||||
'main/tools' => $this->adminMenu['main/tools'],
|
||||
);
|
||||
}
|
||||
|
@@ -39,7 +39,7 @@ class meta_admin extends e_admin_dispatcher
|
||||
|
||||
|
||||
protected $adminMenu = array(
|
||||
'main/meta' => array('caption' => LAN_MANAGE, 'perm' => '0'),
|
||||
'main/meta' => array('caption' => LAN_MANAGE, 'perm' => '0', 'icon'=>'fas-cogs'),
|
||||
);
|
||||
|
||||
protected $adminMenuAliases = array(// 'main/edit' => 'main/list'
|
||||
|
@@ -636,7 +636,10 @@ $text .= "
|
||||
</fieldset>
|
||||
";
|
||||
|
||||
// Admin Display Areas
|
||||
|
||||
/**
|
||||
* @note Admin Display Options.
|
||||
*/
|
||||
$text .= "
|
||||
<fieldset class='e-hideme' id='core-prefs-admindisp'>
|
||||
<legend>".PRFLAN_77."</legend>
|
||||
@@ -671,10 +674,25 @@ $text .= "
|
||||
<tr>
|
||||
<td><label for='admin-separate-plugins'>".PRFLAN_204."</label></td>
|
||||
<td>
|
||||
".$frm->radio_switch('admin_separate_plugins', $pref['admin_separate_plugins'])."
|
||||
".$frm->radio_switch('admin_separate_plugins', varset($pref['admin_separate_plugins']))."
|
||||
<div class='field-help'>".PRFLAN_205."</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><label for='admin-collapse-sidebar'>".PRFLAN_283."</label></td>
|
||||
<td>
|
||||
".$frm->radio_switch('admin_navbar_labels', varset($pref['admin_navbar_labels']))."
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><label for='admin-collapse-sidebar'>".PRFLAN_284."</label></td>
|
||||
<td>
|
||||
".$frm->radio_switch('admin_collapse_sidebar', varset($pref['admin_collapse_sidebar']))."
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
".pref_submit('admindisp')."
|
||||
|
@@ -551,4 +551,3 @@ function search_adminmenu()
|
||||
|
||||
e107::getNav()->admin($caption, $action, $var);
|
||||
}
|
||||
?>
|
@@ -325,9 +325,12 @@ class theme_admin_ui extends e_admin_ui
|
||||
private function setAdminTheme($folder)
|
||||
{
|
||||
|
||||
$adminCSS = file_exists(e_THEME.$pref['admintheme'].'/admin_dark.css') ? 'admin_dark.css' : 'admin_light.css';
|
||||
// $adminCSS = file_exists(e_THEME.$pref['admintheme'].'/admin_dark.css') ? 'admin_dark.css' : 'admin_light.css';
|
||||
|
||||
e107::getConfig()->set('admintheme',$folder)->set('admincss',$adminCSS)->save(true,true,true);
|
||||
$cfg = e107::getConfig();
|
||||
$cfg->set('admintheme',$folder);
|
||||
// $cfg->set('admincss',$adminCSS); //todo get the default from theme.xml
|
||||
$cfg->save(true,true,true);
|
||||
|
||||
e107::getCache()->clear_sys();
|
||||
|
||||
|
Reference in New Issue
Block a user