mirror of
https://github.com/e107inc/e107.git
synced 2025-07-31 03:40:37 +02:00
Improved Menu-Preset display
This commit is contained in:
@@ -1265,8 +1265,7 @@ class themeHandler
|
|||||||
|
|
||||||
if(varset($val['menuPresets']))
|
if(varset($val['menuPresets']))
|
||||||
{
|
{
|
||||||
$itext .= $this->frm->admin_button("setMenuPreset[".$key."]", "Use Preset");
|
$itext .= $this->renderPresets($key);
|
||||||
// $itext .= print_a($val['menuPresets'],true);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -1408,6 +1407,48 @@ class themeHandler
|
|||||||
return $text;
|
return $text;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
function renderPresets($key)
|
||||||
|
{
|
||||||
|
require_once (e_HANDLER."menumanager_class.php");
|
||||||
|
$frm = e107::getForm();
|
||||||
|
|
||||||
|
|
||||||
|
$men = new e_menuManager();
|
||||||
|
$men->curLayout = $key;
|
||||||
|
$preset = $men->getMenuPreset();
|
||||||
|
|
||||||
|
$text .= "<div class='btn-group'>".$frm->admin_button("setMenuPreset[".$key."]", "Activate Menus",'other');
|
||||||
|
$text .= '<button class="btn btn-primary dropdown-toggle" data-toggle="dropdown">
|
||||||
|
<span class="caret"></span>
|
||||||
|
</button>
|
||||||
|
<ul class="dropdown-menu col-selection">
|
||||||
|
<!-- dropdown menu links -->
|
||||||
|
<li><strong>Activate the following:</strong></li>
|
||||||
|
';
|
||||||
|
|
||||||
|
foreach($preset as $val)
|
||||||
|
{
|
||||||
|
$text .= "<li><a title='".$val['menu_name']."'>".str_replace("_menu","",$val['menu_name'])."</a></li>";
|
||||||
|
|
||||||
|
}
|
||||||
|
// $itext .= "<div class='field-help'>".print_a($preset ,true)."</div>";
|
||||||
|
|
||||||
|
$text .= "</ul></div>";
|
||||||
|
return $text;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
function renderPlugins($pluginOpts)
|
function renderPlugins($pluginOpts)
|
||||||
{
|
{
|
||||||
global $frm,$sql;
|
global $frm,$sql;
|
||||||
|
Reference in New Issue
Block a user