1
0
mirror of https://github.com/devcode-it/openstamanager.git synced 2024-12-18 11:19:17 +01:00

Miglioramento stile sidebar

This commit is contained in:
Thomas Zilio 2020-07-31 11:33:00 +02:00
parent 12deba4c2a
commit 654468135b

View File

@ -71,28 +71,24 @@ if (empty($record) || !$has_access) {
// Menu laterale per la visualizzazione dei plugin
echo '
<aside class="control-sidebar control-sidebar-light">
<button class="btn btn-info btn-block" data-toggle="control-sidebar">
<i class="fa fa-list"></i> Chiudi
</button>
<h4 class="text-center">'.tr('Plugin disponibili').'</h4>
<ul class="nav nav-pills nav-stacked">
<li class="active">
<a data-toggle="tab" href="#tab_0">
<i class="'.$structure['icon'].'"></i> '.$structure['title'].'
</a>
</li>';
<aside class="control-sidebar control-sidebar-light">
<h4 class="text-center">'.tr('Plugin disponibili').'</h4>
<ul class="nav nav-pills nav-stacked">
<li data-toggle="control-sidebar" class="active">
<a data-toggle="tab" href="#tab_0">
<i class="'.$structure['icon'].'"></i> '.$structure['title'].'
</a>
</li>';
// Tab dei plugin
$plugins = $dbo->fetchArray('SELECT id, title FROM zz_plugins WHERE idmodule_to='.prepare($id_module)." AND position='tab' AND enabled = 1 ORDER BY zz_plugins.order DESC");
foreach ($plugins as $plugin) {
echo '
<li>
<a data-toggle="tab" href="#tab_'.$plugin['id'].'" id="link-tab_'.$plugin['id'].'">
'.$plugin['title'].'
</a>
</li>';
<li data-toggle="control-sidebar">
<a data-toggle="tab" href="#tab_'.$plugin['id'].'" id="link-tab_'.$plugin['id'].'">
'.$plugin['title'].'
</a>
</li>';
}
// Tab per le note interne
@ -100,44 +96,42 @@ if (empty($record) || !$has_access) {
$notes = $structure->recordNotes($id_record);
echo '
<li class="bg-info">
<a data-toggle="tab" href="#tab_note" id="link-tab_note">
'.tr('Note interne').'
<span class="badge">'.($notes->count() ?: '').'</span>
</a>
</li>';
<li data-toggle="control-sidebar" class="bg-info">
<a data-toggle="tab" href="#tab_note" id="link-tab_note">
'.tr('Note interne').'
<span class="badge">'.($notes->count() ?: '').'</span>
</a>
</li>';
}
// Tab per le checklist
if ($structure->permission != '-' && $structure->use_checklists) {
echo '
<li class="bg-success">
<a data-toggle="tab" href="#tab_checks" id="link-tab_checks">'.tr('Checklist').'</a>
</li>';
<li data-toggle="control-sidebar" class="bg-success">
<a data-toggle="tab" href="#tab_checks" id="link-tab_checks">'.tr('Checklist').'</a>
</li>';
}
// Tab per le informazioni sulle operazioni
if (Auth::admin()) {
echo '
<li class="bg-warning">
<a data-toggle="tab" href="#tab_info" id="link-tab_info">
'.tr('Info').'
</a>
</li>';
<li data-toggle="control-sidebar" class="bg-warning">
<a data-toggle="tab" href="#tab_info" id="link-tab_info">
'.tr('Info').'
</a>
</li>';
}
echo '
</ul>
</aside>
<!-- The sidebar\'s background -->
<!-- This div must placed right after the sidebar for it to work-->
<div class="control-sidebar-bg"></div>';
</ul>
</aside>
echo '
<div class="nav-tabs-custom">
<ul class="nav nav-tabs pull-right" id="tabs" role="tablist">
<li class="pull-left active header">
<a data-toggle="tab" href="#tab_0">
<div class="control-sidebar-bg"></div>
<div class="nav-tabs-custom">
<ul class="nav nav-tabs pull-right" id="tabs" role="tablist">
<li class="pull-left active header">
<a data-toggle="tab" href="#tab_0">
<i class="'.$structure['icon'].'"></i> '.$structure['title'];
// Pulsante "Aggiungi" solo se il modulo è di tipo "table" e se esiste il template per la popup
@ -151,9 +145,7 @@ if (empty($record) || !$has_access) {
</li>
<li>
<button class="btn btn-info" data-toggle="control-sidebar">
<i class="fa fa-list"></i>
</button>
<a data-toggle="control-sidebar" style="cursor: pointer">'.tr('Plugin').'</a>
</li>
</ul>