1
0
mirror of https://github.com/e107inc/e107.git synced 2025-01-17 12:48:24 +01:00

Added help toggle button to sidebar and started on main navigation rework for mobile devices.

This commit is contained in:
Cameron 2021-02-05 10:17:51 -08:00
parent 6033f94be7
commit c2c0979b3a
5 changed files with 66 additions and 28 deletions

View File

@ -184,7 +184,11 @@ class admin_shortcodes extends e_shortcode
if($tmp = e107::getRegistry('core/e107/adminui/help'))
{
return e107::getRender()->tablerender($tmp['caption'],$tmp['text'],'e_help',true);
$text = '<div class="sidebar-toggle-panel">';
$text .= e107::getRender()->tablerender($tmp['caption'],$tmp['text'],'e_help',true);
$text .= '</div>';
$text .= $this->renderHelpIcon();
return $text;
}
return null;
@ -252,7 +256,10 @@ class admin_shortcodes extends e_shortcode
$help_text .= ob_get_clean();
}
return $help_text;
$text = '<div class="sidebar-toggle-panel">'.$help_text.'</div>';
$text .= $this->renderHelpIcon();
return $text;
}
public function sc_admin_icon()
@ -2641,6 +2648,26 @@ Inverse 10 <span class="badge badge-inverse">10</span>
}
/**
* @param string $text
* @return string
*/
private function renderHelpIcon()
{
$text = '
<ul class="nav nav-pills nav-stacked" style="position: absolute;bottom: 100px;">
<li>
<a href="#" class="e-toggle-sidebar e-tip" data-placement="right" title="'.LAN_HELP.'">
<span><i class="far fa-question-circle" ><!-- --></i></span>
</a>
</li>
</ul>
';
return $text;
}
}

View File

@ -53,9 +53,9 @@ $ADMIN_TEMPLATE['nav']['button_enav_home'] = '
<li class="dropdown">
<a class="dropdown-toggle" style="display:inline-block; margin-right:0;" title="'.ADLAN_53.'" href="'.e_HTTP.'" >
{LINK_IMAGE} {LINK_TEXT}
</a><a style="display:inline-block;border-left:0;margin-left:0;padding-left:4px;" class="dropdown-toggle" title="'.ADLAN_53.'" role="button" data-toggle="dropdown" data-target="#" href="{LINK_URL}" >
</a><span class="hidden-xs hidden-sm hidden-md"><a style="display:inline-block;border-left:0;margin-left:0;padding-left:4px;" class="dropdown-toggle" title="'.ADLAN_53.'" role="button" data-toggle="dropdown" data-target="#" href="{LINK_URL}" >
<b class="caret"></b>
</a>
</a></span>
{SUB_MENU}
</li>
';
@ -85,7 +85,7 @@ $ADMIN_TEMPLATE['nav']['button_enav_language'] = '
// Logout / Settings / Personalize
$ADMIN_TEMPLATE['nav']['button_enav_logout'] = '
<li class="dropdown">
<li class="dropdown admin-nav-logout">
<a class="dropdown-toggle admin-icon-avatar " title="'.$label.'" role="button" data-toggle="dropdown" data-target="#" href="{LINK_URL}" >
{LINK_IMAGE} {LINK_TEXT}
<b class="caret"></b>
@ -235,14 +235,14 @@ else
{SETSTYLE=admin_menu}
{ADMIN_MENU}
<div class="sidebar-toggle-panel">
{ADMIN_MENUMANAGER}
{SETSTYLE=site_info}
{ADMINUI_HELP}
{ADMIN_HELP}
<div class="sidebar-toggle-panel">
{ADMIN_SITEINFO=creditsonly}

View File

@ -1313,33 +1313,23 @@ i.e-cat_users-32{ background-position: -555px 0; width: 32px; height: 32px; }
if (isset($e107_vars[$act]['header']))
{
$text .= str_replace('{HEADING}', $e107_vars[$act]['header'], $tmpl['heading']);
// $text .= "<li class='nav-header'>".$e107_vars[$act]['header']."</li>"; //TODO add to Template.
continue;
}
if (isset($e107_vars[$act]['divider']) && !empty($tmpl['divider']))
{
// $text .= "<li class='divider'></li>";
$text .= $tmpl['divider'];
continue;
}
// check class so that e.g. e_UC_NOBODY will result no permissions granted (even for main admin)
if (isset($e107_vars[$act]['userclass']) && !e107::getUser()->checkClass($e107_vars[$act]['userclass'], false)) // check userclass perms
{
continue;
}
// print_a($e107_vars[$act]);
$replace = array();
$rid = str_replace(array(' ', '_'), '-', $act).($id ? "-{$id}" : '');
//XXX && !is_numeric($act) ???
@ -1372,8 +1362,6 @@ i.e-cat_users-32{ background-position: -555px 0; width: 32px; height: 32px; }
{
$tmplateKey = 'button_'.$e107_vars[$act]['template'].$kpost;
$temp = varset($tmpl[$tmplateKey]);
// e107::getDebug()->log($tmplateKey);
}
@ -1400,7 +1388,6 @@ i.e-cat_users-32{ background-position: -555px 0; width: 32px; height: 32px; }
if(!isset($e107_vars[$act]['image_src']) && !isset($e107_vars[$act]['icon']))
{
// e107::getDebug()->log($e107_vars[$act]);
$e107_vars[$act]['image_src'] = self::guessMenuIcon($act.'/'.$act);
}
@ -1454,8 +1441,7 @@ i.e-cat_users-32{ background-position: -555px 0; width: 32px; height: 32px; }
$text .= $tp->simpleParse($temp, $replace);
// echo "<br />".$title." act=".$act;
//print_a($e107_vars[$act]);
}
$text .= (!$sub_link && isset($tmpl['end'])) ? $tmpl['end'] : '';

View File

@ -1635,7 +1635,7 @@ form#simplesef h4 { margin: 4px }
.admin-icon-debug i { margin-right:5px; cursor:help}
.admin-icon-debug > li.dropdown > a.dropdown-toggle { border-left: 0 !important }
.admin-icon-debug .dropdown-menu > .active > a { color: orange }
.admin-icon-debug .dropdown-menu > .active > a:after { font-family: 'Font Awesome 5 Free'; font-weight: 900; content: '\f0d9'; position: absolute;
padding-left: 5px; }
@ -1929,6 +1929,7 @@ div.admin-left-panel-collapsed .nav-pills > li > a > span > i { opacity: 1 }
@media (min-width: 1101px ){
.navbar-fixed-top { height: 51px; }
.admin-icon-debug > li.dropdown > a.dropdown-toggle { border-left: 0 !important }
}
@media (max-width: 1400px ){
@ -1953,6 +1954,8 @@ div.admin-left-panel-collapsed .nav-pills > li > a > span > i { opacity: 1 }
.navbar-collapse.collapse {
display: none!important;
}
/*
.navbar-nav {
float: none!important;
margin: 7.5px -15px;
@ -1968,7 +1971,8 @@ div.admin-left-panel-collapsed .nav-pills > li > a > span > i { opacity: 1 }
float: none;
margin: 15px 0;
}
/* since 3.1.0 */
*/
.navbar-collapse.collapse.in {
display: block!important;
}
@ -1980,9 +1984,28 @@ div.admin-left-panel-collapsed .nav-pills > li > a > span > i { opacity: 1 }
max-height: 480px;
}
/* Nav Buttons */
}
ul.nav-admin { margin:0; padding:0; width:100%; }
ul.nav-admin .dropdown-menu { position: static }
ul.nav-admin > li { display:inline-block; width:calc(14.285% - 15px) ; margin-bottom:0; margin-right:15px; text-align:center }
ul.nav-admin > li > a { border:1px solid silver; margin-top:15px; width:100%; height:110px; }
.navbar-collapse ul.nav-admin > li > a:after { content: attr(title) !important; font-size:110%; display:block; padding-top:0px; padding-bottom:10px; }
.navbar-collapse ul.nav-admin > li > a i { font-size: 300% !important; text-align:center; margin-bottom:10px }
#e-admin-core-update { display: none }
ul.nav.nav-admin.navbar-nav.navbar-left li.dropdown.open ul.dropdown-menu li a { font-size:120%; padding:5px; }
.navbar-nav > li.active > a, .navbar-nav > li > a:hover { border-left-color: inherit; }
ul.navbar-right { display:inline-block; float:none !important; width:calc(14.285% - 15px); margin-right:10px; margin-bottom:30px}
ul.navbar-right > li { display:inline-block; width: 100%; float:left; width:100%; }
.navbar-collapse ul.nav-admin.navbar-right > li > a { height:100px; display:inline-block; width:100%; }
.navbar-collapse ul.nav-admin.navbar-right > li > a::after {content: '' !important; }
}
@media only screen and (max-width : 768px) {
ul.nav-admin > li { display:inline-block; width:calc(50% - 18px) ; }
}
/*

View File

@ -1010,7 +1010,9 @@ select[multiple].input-group-sm>.form-control,select[multiple].input-group-sm>.i
@media (min-width:768px){.navbar-text{float:left;margin-left:15px;margin-right:15px}
.navbar-left{float:left!important}
.navbar-right{float:right!important;margin-right:-15px}
.navbar-right~.navbar-right{margin-right:0}
/*
.navbar-right~.navbar-right{margin-right:0}
*/
}
.navbar-default{background-color:#212121;border-color:#101010}
.navbar-default .navbar-brand{color:#c6c6c6}