changing server-dropdown menu on view page to be inline

This commit is contained in:
Pepijn Over 2014-04-05 16:04:25 +02:00
parent bd623e1ebd
commit ab830a205c
4 changed files with 18 additions and 13 deletions

View File

@ -273,16 +273,11 @@ class ServerController extends AbstractServerController {
'label' => $server_available['label'],
);
}
$this->tpl->addTemplateDataRepeat($this->getTemplateId(), 'options', $options);
$sidebar = new \psm\Util\Module\Sidebar($this->tpl);
$this->setSidebar($sidebar);
$sidebar->addDropdown(
'server',
$server['label'],
$options,
'th', 'success'
);
// check which module the user came from, and add a link accordingly
$back_to = isset($_GET['back_to']) && $_GET['back_to'] == 'server_status' ? $_GET['back_to'] : 'server';
$sidebar->addButton(

View File

@ -23,8 +23,8 @@
<!--%tpl_main_sidebar_types_dropdown-->
<div class="btn-group">
<button class="btn btn-success dropdown-toggle" data-toggle="dropdown">
<i class="icon-th icon-white"></i>&nbsp;{label}
<button class="btn btn-{btn_class} dropdown-toggle" data-toggle="dropdown">
<i class="icon-{icon}"></i>&nbsp;{label}
<span class="caret"></span>
</button>
<ul class="dropdown-menu">

View File

@ -5,7 +5,20 @@
</colgroup>
<thead>
<tr class="head">
<th colspan="2"><h4>{label}</h4></th>
<th colspan="2">
<div class="btn-group">
<button class="btn btn-success dropdown-toggle" data-toggle="dropdown">
<i class="icon-th icon-white"></i>&nbsp;{label}
<span class="caret"></span>
</button>
<ul class="dropdown-menu">
<!--%tpl_repeat_options-->
<li class="{class_active}"><a href="{url}">{label}</a>
<!--%%tpl_repeat_options-->
{options}
</ul>
</div>
</th>
</tr>
</thead>
<tbody>

View File

@ -11,9 +11,6 @@ body {
padding-left: 0;
padding-right: 0;
}
.sidebar-nav {
padding: 9px 0;
}
.sidebar-nav .btn {
margin: 5px 0;
min-width: 100px;