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