Fix plugins

This commit is contained in:
pek5892 2024-05-21 17:00:50 +02:00
parent 57020cef47
commit 9337763f20
1 changed files with 21 additions and 19 deletions

View File

@ -541,8 +541,8 @@ if (Auth::check()) {
}
echo '
<li data-widget="control-sidebar" class="btn-default nav-item" >
<a class="nav-link" data-widget="tab" href="#tab_'.$plugin['id'].'" id="link-tab_'.$plugin['id'].'">
<li data-toggle="control-sidebar" class="btn-default nav-item" >
<a class="nav-link" data-toggle="tab" href="#tab_'.$plugin['id'].'" id="link-tab_'.$plugin['id'].'">
'.$plugin['title'].'
<span class="right badge badge-danger">'.($count > 0 ? $count : '').'</span>
</a>
@ -555,24 +555,26 @@ if (Auth::check()) {
$notes = $structure->recordNotes($id_record);
echo '
<li data-widget="control-sidebar" class="btn-default">
<a class="bg-info" data-widget="tab" href="#tab_note" id="link-tab_note">
<'.tr('Note interne').'
<li data-toggle="control-sidebar" class="btn-default nav-item">
<a class="bg-info nav-link" data-toggle="tab" href="#tab_note" id="link-tab_note">
'.tr('Note interne').'
<span class="badge pull-right">'.($notes->count() ?: '').'</span>
</a>
</li>';
}
// Tab per le checklist
// Tab per le checklist
if ($structure->permission != '-' && $structure->use_checklists) {
$checklists_unchecked = $structure->recordChecks($id_record)->where('checked_at', null);
$checklists_total = $structure->recordChecks($id_record);
echo '
<li data-widget="control-sidebar" class="btn-default">
<a class="bg-info" data-widget="tab" href="#tab_checks" id="link-tab_checks">
<'.tr('Checklist').'
<'.($checklists_total->count() > 0) ? '<span class="badge pull-right">'.$checklists_unchecked->count().tr(' / ').$checklists_total->count().'</span>' : ''.'
<li data-toggle="control-sidebar" class="btn-default nav-item">
<a class="bg-info nav-link" data-toggle="tab" href="#tab_checks" id="link-tab_checks">
'.tr('Checklist')
. ($checklists_total ? ' <span class="badge pull-right">' . $checklists_unchecked->count() . tr(' / ') . $checklists_total->count() . '</span>' : '')
. '
</a>
</li>';
}
@ -580,9 +582,9 @@ if (Auth::check()) {
// Tab per le informazioni sulle operazioni
if (Auth::admin()) {
echo '
<li data-widget="control-sidebar" class="btn-default">
<a class="bg-info" data-widget="tab" href="#tab_info" id="link-tab_info">
<'.tr('Info').'
<li data-toggle="control-sidebar" class="btn-default nav-item">
<a class="bg-info nav-link" data-toggle="tab" href="#tab_info" id="link-tab_info">
'.tr('Info').'
</a>
</li>';
}