Fix elementi menu dropdown

This commit is contained in:
pek5892 2024-05-22 12:00:54 +02:00
parent 72ec540d3f
commit 2391db70bb
16 changed files with 180 additions and 242 deletions

View File

@ -181,12 +181,12 @@ if (!empty($type) && $type != 'menu' && $type != 'custom') {
</div>
</div>
<div class="col-md-2 dropdown">';
<div class="col-md-2 dropup">';
if (!empty($bulk) && $structure->permission == 'rw' && empty($id_plugin)) {
echo '
<button class="btn btn-primary btn-block dropdown-toggle actions-container disabled" type="button" data-toggle="dropdown" disabled>'.tr('Azioni di gruppo').' <span class="caret"></span></button>
<ul class="dropdown-menu" data-target="'.$table_id.'" role="menu">';
<div class="dropdown-menu dropup" data-target="'.$table_id.'" role="menu">';
foreach ($bulk as $key => $value) {
$text = is_array($value) ? $value['text'] : $value;
@ -198,11 +198,11 @@ if (!empty($type) && $type != 'menu' && $type != 'custom') {
}
echo '
<li role="presentation"><a class="bulk-action clickable" data-op="'.prepareToField($key).'" data-backto="record-list" '.implode(' ', $extra).'>'.$text.'</a></li>';
<a class="bulk-action clickable dropdown-item" data-op="'.prepareToField($key).'" data-backto="record-list" '.implode(' ', $extra).'>'.$text.'</a></li>';
}
echo '
</ul>';
</div>';
}
echo '

View File

@ -23,64 +23,64 @@ use Models\Module;
if (in_array($id_cliente, $tipi_anagrafica) or in_array($id_fornitore, $tipi_anagrafica)) {
echo '
<div class="btn-group">
<button type="button" class="btn btn-info dropdown-toggle" data-widget="dropdown" aria-haspopup="true" aria-expanded="false"><i class="fa fa-magic"></i>
'.tr('Crea').'... <span class="caret"></span>
<span class="sr-only">Toggle Dropdown</span>
<button type="button" class="btn btn-info dropdown-toggle" data-widget="dropdown" aria-haspopup="true" aria-expanded="false">
<i class="fa fa-magic"></i>
'.tr('Crea').'...
</button>
<ul class="dropdown-menu dropdown-menu-right">';
<div class="dropdown-menu dropdown-menu-right">';
// Aggiunta utente per i tecnici
if (in_array($id_tecnico, $tipi_anagrafica)) {
echo '
<li><a data-widget="modal" data-title="'.tr('Aggiungi utente').'" data-href="modules/utenti/user.php?id_module='.(new Module())->getByField('title', 'Utenti e permessi', Models\Locale::getPredefined()->id)->id_record.'&id_record='.(new Group())->getByField('title', 'Tecnici', Models\Locale::getPredefined()->id).'&idanagrafica='.$record['idanagrafica'].'"><i class="fa fa-user"></i>'.tr('Nuovo utente').'
</a></li>';
<a class="dropdown-item" data-widget="modal" data-href="modules/utenti/user.php?id_module='.(new Module())->getByField('title', 'Utenti e permessi', Models\Locale::getPredefined()->id)->id_record.'&id_record='.(new Group())->getByField('title', 'Tecnici', Models\Locale::getPredefined()->id).'&idanagrafica='.$record['idanagrafica'].'">
<i class="fa fa-user"></i> '.tr('Nuovo utente').'
</a>';
}
if (in_array($id_cliente, $tipi_anagrafica)) {
echo '
<li><a data-widget="modal" data-title="'.tr('Aggiungi attività').'" data-href="add.php?id_module='.(new Module())->getByField('title', 'Attività', Models\Locale::getPredefined()->id).'&idanagrafica='.$record['idanagrafica'].'"><i class="fa fa-wrench"></i>'.tr('Nuova attività').'
</a></li>
<a class="dropdown-item" data-widget="modal" data-href="add.php?id_module='.(new Module())->getByField('title', 'Attività', Models\Locale::getPredefined()->id).'&idanagrafica='.$record['idanagrafica'].'">
<i class="fa fa-wrench"></i> '.tr('Nuova attività').'
</a>
<a class="dropdown-item" data-widget="modal" data-href="add.php?id_module='.(new Module())->getByField('title', 'Preventivi', Models\Locale::getPredefined()->id).'&idanagrafica='.$record['idanagrafica'].'">
<i class="fa fa-file-text"></i> '.tr('Nuovo preventivo').'
</a>
<li><a data-widget="modal" data-title="'.tr('Aggiungi preventivo').'" data-href="add.php?id_module='.(new Module())->getByField('title', 'Preventivi', Models\Locale::getPredefined()->id).'&idanagrafica='.$record['idanagrafica'].'"><i class="fa fa-file-text"></i>'.tr('Nuovo preventivo').'
</a></li>
<a class="dropdown-item" data-widget="modal" data-href="add.php?id_module='.(new Module())->getByField('title', 'Contratti', Models\Locale::getPredefined()->id).'&idanagrafica='.$record['idanagrafica'].'"><i class="fa fa-file-text-o"></i> '.tr('Nuovo contratto').'</a>
<li><a data-widget="modal" data-title="'.tr('Aggiungi contratto').'" data-href="add.php?id_module='.(new Module())->getByField('title', 'Contratti', Models\Locale::getPredefined()->id).'&idanagrafica='.$record['idanagrafica'].'"><i class="fa fa-file-text-o"></i>'.tr('Nuovo contratto').'
</a></li>
<a class="dropdown-item" data-widget="modal" data-href="add.php?id_module='.(new Module())->getByField('title', 'Ordini cliente', Models\Locale::getPredefined()->id).'&idanagrafica='.$record['idanagrafica'].'"><i class="fa fa-file-o"></i> '.tr('Nuovo ordine cliente').'</a>
<li><a data-widget="modal" data-title="'.tr('Aggiungi ordine cliente').'" data-href="add.php?id_module='.(new Module())->getByField('title', 'Ordini cliente', Models\Locale::getPredefined()->id).'&idanagrafica='.$record['idanagrafica'].'"><i class="fa fa-file-o"></i>'.tr('Nuovo ordine cliente').'
</a></li>
<a class="dropdown-item" data-widget="modal" data-href="add.php?id_module='.(new Module())->getByField('title', 'Ddt in uscita', Models\Locale::getPredefined()->id).'&idanagrafica='.$record['idanagrafica'].'"><i class="fa fa-truck"></i> '.tr('Nuovo ddt in uscita').'</a>
<li><a data-widget="modal" data-title="'.tr('Aggiungi ddt uscita').'" data-href="add.php?id_module='.(new Module())->getByField('title', 'Ddt in uscita', Models\Locale::getPredefined()->id).'&idanagrafica='.$record['idanagrafica'].'"><i class="fa fa-truck"></i>'.tr('Nuovo ddt in uscita').'
</a></li>
<a class="dropdown-item" data-widget="modal" data-href="add.php?id_module='.(new Module())->getByField('title', 'Fatture di vendita', Models\Locale::getPredefined()->id).'&idanagrafica='.$record['idanagrafica'].'"><i class="fa fa-file"></i> '.tr('Nuova fattura di vendita').'</a>
<li><a data-widget="modal" data-title="'.tr('Aggiungi fattura di vendita').'" data-href="add.php?id_module='.(new Module())->getByField('title', 'Fatture di vendita', Models\Locale::getPredefined()->id).'&idanagrafica='.$record['idanagrafica'].'"><i class="fa fa-file"></i>'.tr('Nuova fattura di vendita').'
</a></li>
<li><a data-widget="modal" data-title="'.tr('Aggiungi registrazione contabile').'" data-href="add.php?id_module='.(new Module())->getByField('title', 'Prima nota', Models\Locale::getPredefined()->id).'&id_anagrafica='.$record['idanagrafica'].'"><i class="fa fa-euro"></i>'.tr('Nuova registrazione contabile (cliente)').'
</a></li>';
<a class="dropdown-item" data-widget="modal" data-href="add.php?id_module='.(new Module())->getByField('title', 'Prima nota', Models\Locale::getPredefined()->id).'&id_anagrafica='.$record['idanagrafica'].'"><i class="fa fa-euro"></i> '.tr('Nuova registrazione contabile (cliente)').'</a>';
}
if (in_array($id_fornitore, $tipi_anagrafica)) {
echo '<li><a data-widget="modal" data-title="'.tr('Aggiungi ordine fornitore').'" data-href="add.php?id_module='.(new Module())->getByField('title', 'Ordini fornitore', Models\Locale::getPredefined()->id).'&idanagrafica='.$record['idanagrafica'].'"><i class="fa fa-file-o fa-flip-horizontal"></i>'.tr('Nuovo ordine fornitore').'
</a></li>
echo '
<a class="dropdown-item" data-widget="modal" data-data-href="add.php?id_module='.(new Module())->getByField('title', 'Ordini fornitore', Models\Locale::getPredefined()->id).'&idanagrafica='.$record['idanagrafica'].'"><i class="fa fa-file-o fa-flip-horizontal"></i> '.tr('Nuovo ordine fornitore').'</a>
<li><a data-widget="modal" data-title="'.tr('Aggiungi ddt entrata').'" data-href="add.php?id_module='.(new Module())->getByField('title', 'Ddt in entrata', Models\Locale::getPredefined()->id).'&idanagrafica='.$record['idanagrafica'].'"><i class="fa fa-truck fa-flip-horizontal"></i>'.tr('Nuovo ddt in entrata').'
</a></li>
<a class="dropdown-item" data-widget="modal" data-href="add.php?id_module='.(new Module())->getByField('title', 'Ddt in entrata', Models\Locale::getPredefined()->id).'&idanagrafica='.$record['idanagrafica'].'"><i class="fa fa-truck fa-flip-horizontal"></i> '.tr('Nuovo ddt in entrata').'</a>
<li><a data-widget="modal" data-title="'.tr('Aggiungi fattura di acquisto').'" data-href="add.php?id_module='.(new Module())->getByField('title', 'Fatture di acquisto', Models\Locale::getPredefined()->id).'&idanagrafica='.$record['idanagrafica'].'"><i class="fa fa-file fa-flip-horizontal"></i>'.tr('Nuova fattura di acquisto').'
</a></li>
<a class="dropdown-item" data-widget="modal" data-href="add.php?id_module='.(new Module())->getByField('title', 'Fatture di acquisto', Models\Locale::getPredefined()->id).'&idanagrafica='.$record['idanagrafica'].'"><i class="fa fa-file fa-flip-horizontal"></i> '.tr('Nuova fattura di acquisto').'</a>
<li><a data-widget="modal" data-title="'.tr('Aggiungi registrazione contabile').'" data-href="add.php?id_module='.(new Module())->getByField('title', 'Prima nota', Models\Locale::getPredefined()->id).'&id_anagrafica='.$record['idanagrafica'].'"><i class="fa fa-euro"></i>'.tr('Nuova registrazione contabile (fornitore)').'
</a></li>';
<a class="dropdown-item" data-widget="modal" data-href="add.php?id_module='.(new Module())->getByField('title', 'Prima nota', Models\Locale::getPredefined()->id).'&id_anagrafica='.$record['idanagrafica'].'"><i class="fa fa-euro"></i> '.tr('Nuova registrazione contabile (fornitore)').'</a>';
}
echo '
</ul>
echo'
</div>
</div>';
}
if (in_array($id_agente, $tipi_anagrafica)) {
// Aggiunta liquidazione provvigioni per agente
echo '
<button type="button" class="btn btn-primary" data-title="'.tr('Liquida Provvigioni').'" data-href="'.base_path().'/modules/anagrafiche/liquida_provvigioni.php?nome_stampa=Provvigioni&id_record='.$id_record.'" ><i class="fa fa-print"></i> '.tr('Liquida Provvigioni').'</button>';
<button type="button" class="btn btn-primary" data-title="'.tr('Liquida Provvigioni').'" data-data-href="'.base_path().'/modules/anagrafiche/liquida_provvigioni.php?nome_stampa=Provvigioni&id_record='.$id_record.'" >
<i class="fa fa-print"></i> '.tr('Liquida Provvigioni').'
</button>';
}

View File

@ -367,17 +367,14 @@ if (!$block_edit) {
<span class="caret"></span>
</button>
<ul class="dropdown-menu dropdown-menu-right">
<li>
<a style="cursor:pointer" onclick="gestioneDescrizione(this)" data-title="'.tr('Aggiungi descrizione').'">
<i class="fa fa-plus"></i> '.tr('Descrizione').'
</a>
</li>
<li>
<a style="cursor:pointer" onclick="gestioneSconto(this)" data-title="'.tr('Aggiungi sconto/maggiorazione').'">
<i class="fa fa-plus"></i> '.tr('Sconto/maggiorazione').'
</a>
</li>
<a class="dropdown-item" style="cursor:pointer" onclick="gestioneDescrizione(this)" data-title="'.tr('Aggiungi descrizione').'">
<i class="fa fa-plus"></i> '.tr('Descrizione').'
</a>
<a class="dropdown-item" style="cursor:pointer" onclick="gestioneSconto(this)" data-title="'.tr('Aggiungi sconto/maggiorazione').'">
<i class="fa fa-plus"></i> '.tr('Sconto/maggiorazione').'
</a>
</ul>
</div>
</div>

View File

@ -144,7 +144,7 @@ foreach ($tipi_intervento as $tipo) {
echo '
<li>
<input type="checkbox" id="tipo_'.$tipo['id'].'" class="dashboard_tipo" value="'.$tipo['id'].'" '.$attr.'>
<input type="checkbox" id="tipo_'.$tipo['id'].'" class="dashboard_tipo dropdown-item" value="'.$tipo['id'].'" '.$attr.'>
<label for="tipo_'.$tipo['id'].'">
'.$tipo['descrizione'].'
</label>
@ -180,7 +180,7 @@ foreach ($tecnici_disponibili as $tecnico) {
echo '
<li>
<input type="checkbox" id="tecnico_'.$tecnico['id'].'" class="dashboard_tecnico" value="'.$tecnico['id'].'" '.$attr.'>
<input type="checkbox" id="tecnico_'.$tecnico['id'].'" class="dashboard_tecnico dropdown-item" value="'.$tecnico['id'].'" '.$attr.'>
<label for="tecnico_'.$tecnico['id'].'">
'.$tecnico['ragione_sociale'].'&nbsp;<span class="pull-right" style="background-color:'.$tecnico['colore'].';"></span>
</label>
@ -286,7 +286,7 @@ if (!empty($risultati_da_programmare)) {
echo '
</div>
<div id="external-events" class="hidden-xs hidden-sm col-md-2">
<div id="external-events" class="col-md-2">
<h4>'.tr('Promemoria da pianificare').'</h4>';
// Controllo pianificazioni mesi precedenti
@ -340,20 +340,20 @@ if (!empty($risultati_da_programmare)) {
->sortBy('data');
echo '
<select class="superselect openstamanager-input select-input" id="mese-promemoria">
<option value="all">'.tr('Tutti').'</option>';
<select class="superselect openstamanager-input select-input" id="mese-promemoria">
<option value="all">'.tr('Tutti').'</option>';
foreach ($mesi as $mese) {
$data = Carbon::parse($mese['data']);
$chiave = $data->format('mY');
$testo = $data->isoFormat('MMMM YYYY');
if (checkdate($data->format('m'), $data->format('d'), $data->format('Y'))) {
echo '
<option value="'.$chiave.'">'.ucfirst($testo).'</option>';
}
}
echo '
</select>
<div id="elenco-promemoria"></div>

View File

@ -595,29 +595,21 @@ if (!$block_edit) {
<span class="caret"></span>
</button>
<ul class="dropdown-menu dropdown-menu-right">
<li>
<a style="cursor:pointer" onclick="gestioneDescrizione(this)" data-title="'.tr('Aggiungi descrizione').'">
<i class="fa fa-plus"></i> '.tr('Descrizione').'
</a>
</li>
<a style="cursor:pointer" class="dropdown-item" onclick="gestioneDescrizione(this)" data-title="'.tr('Aggiungi descrizione').'">
<i class="fa fa-plus"></i> '.tr('Descrizione').'
</a>
<a style="cursor:pointer" class="dropdown-item" onclick="gestioneSconto(this)" data-title="'.tr('Aggiungi sconto/maggiorazione').'">
<i class="fa fa-plus"></i> '.tr('Sconto/maggiorazione').'
</a>
<li>
<a style="cursor:pointer" onclick="gestioneSconto(this)" data-title="'.tr('Aggiungi sconto/maggiorazione').'">
<i class="fa fa-plus"></i> '.tr('Sconto/maggiorazione').'
</a>
</li>
<li>
<a class="'.(!empty($tot_ddt) ? '' : ' disabled').'" style="cursor:pointer" data-href="'.$structure->fileurl('add_ddt.php').'?id_module='.$id_module.'&id_record='.$id_record.'" data-card-widget="modal" data-title="'.tr('Aggiungi Ddt').'" onclick="saveForm()">
<i class="fa fa-plus"></i> '.tr('Ddt').'
</a>
</li>
<li>
<a class="'.(!empty($tot_ordini) ? '' : ' disabled').'" style="cursor:pointer" data-href="'.$structure->fileurl('add_ordine.php').'?id_module='.$id_module.'&id_record='.$id_record.'" data-card-widget="modal" data-title="'.tr('Aggiungi Ordine').'" onclick="saveForm()">
<i class="fa fa-plus"></i> '.tr('Ordine').'
</a>
</li>
<a class="'.(!empty($tot_ddt) ? '' : ' disabled').' dropdown-item" style="cursor:pointer" data-href="'.$structure->fileurl('add_ddt.php').'?id_module='.$id_module.'&id_record='.$id_record.'" data-card-widget="modal" data-title="'.tr('Aggiungi Ddt').'" onclick="saveForm()">
<i class="fa fa-plus"></i> '.tr('Ddt').'
</a>
<a class="'.(!empty($tot_ordini) ? '' : ' disabled').' dropdown-item" style="cursor:pointer" data-href="'.$structure->fileurl('add_ordine.php').'?id_module='.$id_module.'&id_record='.$id_record.'" data-card-widget="modal" data-title="'.tr('Aggiungi Ordine').'" onclick="saveForm()">
<i class="fa fa-plus"></i> '.tr('Ordine').'
</a>
</ul>
</div>
</div>

View File

@ -39,20 +39,20 @@ if ($dir == 'entrata' || !empty($abilita_autofattura)) {
if ($dir == 'entrata') {
echo '
<ul class="dropdown-menu dropdown-menu-right">
<li><a href="'.base_path().'/editor.php?id_module='.$id_module.'&id_record='.$id_record.'&op=nota_addebito&backto=record-edit">
<a class="dropdown-item" data-href="'.base_path().'/editor.php?id_module='.$id_module.'&id_record='.$id_record.'&op=nota_addebito&backto=record-edit">
'.tr('Nota di debito').'
</a></li>
</a>
<li><a data-href="'.base_path().'/modules/fatture/crea_documento.php?id_module='.$id_module.'&id_record='.$id_record.'&iddocumento='.$id_record.'" data-title="Aggiungi nota di credito">
<a class="dropdown-item" data-href="'.base_path().'/modules/fatture/crea_documento.php?id_module='.$id_module.'&id_record='.$id_record.'&iddocumento='.$id_record.'" data-title="Aggiungi nota di credito">
'.tr('Nota di credito').'
</a></li>
</a>
</ul>';
} elseif (!empty($abilita_autofattura)) {
echo '
<ul class="dropdown-menu dropdown-menu-right">
<li><a data-href="'.base_path().'/modules/fatture/crea_autofattura.php?id_module='.$id_module.'&id_record='.$id_record.'&iddocumento='.$id_record.'" data-title="Aggiungi autofattura">
<a class="dropdown-item" data-href="'.base_path().'/modules/fatture/crea_autofattura.php?id_module='.$id_module.'&id_record='.$id_record.'&iddocumento='.$id_record.'" data-title="Aggiungi autofattura">
'.tr('Autofattura').'
</a></li>
</a>
</ul>';
}
echo '

View File

@ -904,50 +904,40 @@ if (!$block_edit) {
<span class="caret"></span>
</button>
<ul class="dropdown-menu dropdown-menu-right">
<li>
<a style="cursor:pointer" onclick="gestioneDescrizione(this)" data-title="'.tr('Aggiungi descrizione').'">
<i class="fa fa-plus"></i> '.tr('Descrizione').'
</a>
</li>
<li>
<a style="cursor:pointer" onclick="gestioneSconto(this)" data-title="'.tr('Aggiungi sconto/maggiorazione').'">
<i class="fa fa-plus"></i> '.tr('Sconto/maggiorazione').'
</a>
</li>';
<a class="dropdown-item" style="cursor:pointer" onclick="gestioneDescrizione(this)" data-title="'.tr('Aggiungi descrizione').'">
<i class="fa fa-plus"></i> '.tr('Descrizione').'
</a>
<a class="dropdown-item" style="cursor:pointer" onclick="gestioneSconto(this)" data-title="'.tr('Aggiungi sconto/maggiorazione').'">
<i class="fa fa-plus"></i> '.tr('Sconto/maggiorazione').'
</a>';
if (empty($record['ref_documento'])) {
if ($dir == 'entrata') {
echo '
<li>
<a class="'.(!empty($interventi) ? '' : ' disabled').'" style="cursor:pointer" data-href="'.$structure->fileurl('add_intervento.php').'?id_module='.$id_module.'&id_record='.$id_record.'" data-card-widget="modal" data-title="'.tr('Aggiungi Attività').'" onclick="saveForm()">
<i class="fa fa-plus"></i> '.tr('Attività').'
</a>
</li>
<li>
<a class="'.(!empty($preventivi) ? '' : ' disabled').'" style="cursor:pointer" data-href="'.$structure->fileurl('add_preventivo.php').'?id_module='.$id_module.'&id_record='.$id_record.'" data-card-widget="modal" data-title="'.tr('Aggiungi Preventivo').'" onclick="saveForm()">
<i class="fa fa-plus"></i> '.tr('Preventivo').'
</a>
</li>
<a class="'.(!empty($interventi) ? '' : ' disabled').' dropdown-item" style="cursor:pointer" data-href="'.$structure->fileurl('add_intervento.php').'?id_module='.$id_module.'&id_record='.$id_record.'" data-card-widget="modal" data-title="'.tr('Aggiungi Attività').'" onclick="saveForm()">
<i class="fa fa-plus"></i> '.tr('Attività').'
</a>
<li>
<a class="'.(!empty($contratti) ? '' : ' disabled').'" style="cursor:pointer" data-href="'.$structure->fileurl('add_contratto.php').'?id_module='.$id_module.'&id_record='.$id_record.'" data-card-widget="modal" data-title="'.tr('Aggiungi Contratto').'" onclick="saveForm()">
<i class="fa fa-plus"></i> '.tr('Contratto').'
</a>
</li>';
<a class="'.(!empty($preventivi) ? '' : ' disabled').' dropdown-item" style="cursor:pointer" data-href="'.$structure->fileurl('add_preventivo.php').'?id_module='.$id_module.'&id_record='.$id_record.'" data-card-widget="modal" data-title="'.tr('Aggiungi Preventivo').'" onclick="saveForm()">
<i class="fa fa-plus"></i> '.tr('Preventivo').'
</a>
<a class="'.(!empty($contratti) ? '' : ' disabled').' dropdown-item" style="cursor:pointer" data-href="'.$structure->fileurl('add_contratto.php').'?id_module='.$id_module.'&id_record='.$id_record.'" data-card-widget="modal" data-title="'.tr('Aggiungi Contratto').'" onclick="saveForm()">
<i class="fa fa-plus"></i> '.tr('Contratto').'
</a>';
}
echo '
<li>
<a class="'.(!empty($ddt) ? '' : ' disabled').'" style="cursor:pointer" data-href="'.$structure->fileurl('add_ddt.php').'?id_module='.$id_module.'&id_record='.$id_record.'" data-card-widget="modal" data-title="'.tr('Aggiungi Ddt').'" onclick="saveForm()">
<i class="fa fa-plus"></i> '.tr('Ddt').'
</a>
</li>
<li>
<a class="'.(!empty($ordini) ? '' : ' disabled').'" style="cursor:pointer" data-href="'.$structure->fileurl('add_ordine.php').'?id_module='.$id_module.'&id_record='.$id_record.'" data-card-widget="modal" data-title="'.tr('Aggiungi Ordine').'" onclick="saveForm()">
<i class="fa fa-plus"></i> '.tr('Ordine').'
</a>
</li>';
<a class="'.(!empty($ddt) ? '' : ' disabled').' dropdown-item" style="cursor:pointer" data-href="'.$structure->fileurl('add_ddt.php').'?id_module='.$id_module.'&id_record='.$id_record.'" data-card-widget="modal" data-title="'.tr('Aggiungi Ddt').'" onclick="saveForm()">
<i class="fa fa-plus"></i> '.tr('Ddt').'
</a>
<a class="'.(!empty($ordini) ? '' : ' disabled').' dropdown-item" style="cursor:pointer" data-href="'.$structure->fileurl('add_ordine.php').'?id_module='.$id_module.'&id_record='.$id_record.'" data-card-widget="modal" data-title="'.tr('Aggiungi Ordine').'" onclick="saveForm()">
<i class="fa fa-plus"></i> '.tr('Ordine').'
</a>';
}
echo '
</ul>

View File

@ -68,11 +68,9 @@ echo '
<span class="caret"></span>
</button>
<ul class="dropdown-menu dropdown-menu-right">
<li>
<a data-href="'.$structure->fileurl('crea_documento.php').'?id_module='.$id_module.'&id_record='.$id_record.'&documento=fattura" data-widget="modal" data-title="'.tr('Crea fattura').'">
<i class="fa fa-file"></i> '.tr('Fattura').'
</a>
</li>
<a class="dropdown-item" data-href="'.$structure->fileurl('crea_documento.php').'?id_module='.$id_module.'&id_record='.$id_record.'&documento=fattura" data-widget="modal" data-title="'.tr('Crea fattura').'">
<i class="fa fa-file"></i> '.tr('Fattura').'
</a>
</ul>
</div>';
*/

View File

@ -497,35 +497,25 @@ if (!$block_edit) {
<span class="caret"></span>
</button>
<ul class="dropdown-menu dropdown-menu-right">';
/*<li>
<a style="cursor:pointer" onclick="gestioneDescrizione(this)" data-title="'.tr('Aggiungi descrizione').'">
<i class="fa fa-plus"></i> '.tr('Descrizione').'
</a>
</li>*/
echo '
<li>
<a style="cursor:pointer" onclick="gestioneSconto(this)" data-title="'.tr('Aggiungi sconto/maggiorazione').'">
<i class="fa fa-plus"></i> '.tr('Sconto/maggiorazione').'
</a>
</li>
<li title="'.tr("L'aggiunta del documento secondo questa procedura non associa l'attività al relativo consuntivo del documento: utilizzare i campi soprastanti a questo fine").'.">
<a class="'.(!empty($preventivi) ? '' : ' disabled').'" style="cursor:pointer" data-href="'.$structure->fileurl('add_preventivo.php').'?id_module='.$id_module.'&id_record='.$id_record.'" data-card-widget="modal" data-title="'.tr('Aggiungi Preventivo').'" onclick="saveForm()">
<i class="fa fa-plus"></i> '.tr('Preventivo').'
</a>
</li>
<a class="dropdown-item" style="cursor:pointer" onclick="gestioneSconto(this)" data-title="'.tr('Aggiungi sconto/maggiorazione').'">
<i class="fa fa-plus"></i> '.tr('Sconto/maggiorazione').'
</a>
<a class="'.(!empty($preventivi) ? '' : ' disabled').' dropdown-item" title="'.tr("L'aggiunta del documento secondo questa procedura non associa l'attività al relativo consuntivo del documento: utilizzare i campi soprastanti a questo fine").'." style="cursor:pointer" data-href="'.$structure->fileurl('add_preventivo.php').'?id_module='.$id_module.'&id_record='.$id_record.'" data-card-widget="modal" data-title="'.tr('Aggiungi Preventivo').'" onclick="saveForm()">
<i class="fa fa-plus"></i> '.tr('Preventivo').'
</a>
<a class="'.(!empty($contratti) ? '' : ' disabled').' dropdown-item" title="'.tr("L'aggiunta del documento secondo questa procedura non associa l'attività al relativo consuntivo del documento: utilizzare i campi soprastanti a questo fine").'." style="cursor:pointer" data-href="'.$structure->fileurl('add_contratto.php').'?id_module='.$id_module.'&id_record='.$id_record.'" data-card-widget="modal" data-title="'.tr('Aggiungi Contratto').'" onclick="saveForm()">
<i class="fa fa-plus"></i> '.tr('Contratto').'
</a>
<a class="'.(!empty($ddt) ? '' : ' disabled').' dropdown-item" title="'.tr('DDT in uscita per il Cliente che si trovano nello stato di Evaso o Parzialmente Evaso con una Causale importabile').'. '.tr("L'aggiunta del documento secondo questa procedura non associa l'attività al relativo consuntivo del documento: utilizzare i campi soprastanti a questo fine").'." style="cursor:pointer" data-href="'.$structure->fileurl('add_ddt.php').'?id_module='.$id_module.'&id_record='.$id_record.'" data-card-widget="modal" data-title="'.tr('Aggiungi Ddt').'" onclick="saveForm()">
<i class="fa fa-plus"></i> '.tr('Ddt').'
</a>
<li title="'.tr("L'aggiunta del documento secondo questa procedura non associa l'attività al relativo consuntivo del documento: utilizzare i campi soprastanti a questo fine").'.">
<a class="'.(!empty($contratti) ? '' : ' disabled').'" style="cursor:pointer" data-href="'.$structure->fileurl('add_contratto.php').'?id_module='.$id_module.'&id_record='.$id_record.'" data-card-widget="modal" data-title="'.tr('Aggiungi Contratto').'" onclick="saveForm()">
<i class="fa fa-plus"></i> '.tr('Contratto').'
</a>
</li>
<li title="'.tr('DDT in uscita per il Cliente che si trovano nello stato di Evaso o Parzialmente Evaso con una Causale importabile').'. '.tr("L'aggiunta del documento secondo questa procedura non associa l'attività al relativo consuntivo del documento: utilizzare i campi soprastanti a questo fine").'.">
<a class="'.(!empty($ddt) ? '' : ' disabled').'" style="cursor:pointer" data-href="'.$structure->fileurl('add_ddt.php').'?id_module='.$id_module.'&id_record='.$id_record.'" data-card-widget="modal" data-title="'.tr('Aggiungi Ddt').'" onclick="saveForm()">
<i class="fa fa-plus"></i> '.tr('Ddt').'
</a>
</li>
</ul>
</div>
</div>

View File

@ -45,39 +45,30 @@ echo '
<span class="caret"></span>
</button>
<ul class="dropdown-menu dropdown-menu-right">
<li>
<a data-href="'.$structure->fileurl('crea_documento.php').'?id_module='.$id_module.'&id_record='.$id_record.'&documento=intervento" data-widget="modal" data-title="'.tr('Crea attività').'">
<i class="fa fa-wrench"></i> '.tr('Attività').'
</a>
</li>';
<a class="dropdown-item" data-href="'.$structure->fileurl('crea_documento.php').'?id_module='.$id_module.'&id_record='.$id_record.'&documento=intervento" data-widget="modal" data-title="'.tr('Crea attività').'">
<i class="fa fa-wrench"></i> '.tr('Attività').'
</a>
';
if ($dir == 'entrata') {
echo '
<li>
<a data-href="'.$structure->fileurl('crea_documento.php').'?id_module='.$id_module.'&id_record='.$id_record.'&documento=ordine_fornitore" data-widget="modal" data-title="'.tr('Crea ordine fornitore').'">
<i class="fa fa-file-o"></i> '.tr('Ordine fornitore').'
</a>
</li>';
} else {
/*echo '
<li>
<a data-href="'.$structure->fileurl('crea_documento.php').'?id_module='.$id_module.'&id_record='.$id_record.'&documento=ordine_cliente" data-widget="modal" data-title="'.tr('Crea ordine cliente').'">
<i class="fa fa-file-o"></i> '.tr('Ordine cliente').'
<a class="dropdown-item" data-href="'.$structure->fileurl('crea_documento.php').'?id_module='.$id_module.'&id_record='.$id_record.'&documento=ordine_fornitore" data-widget="modal" data-title="'.tr('Crea ordine fornitore').'">
<i class="fa fa-file-o"></i> '.tr('Ordine fornitore').'
</a>
</li>';*/
}
';
}
echo '
<li>
<a data-href="'.$structure->fileurl('crea_documento.php').'?id_module='.$id_module.'&id_record='.$id_record.'&documento=ddt" data-widget="modal" data-title="'.tr('Crea ddt').'">
<i class="fa fa-truck"></i> '.tr('Ddt').'
</a>
</li>
<li>
<a data-href="'.$structure->fileurl('crea_documento.php').'?id_module='.$id_module.'&id_record='.$id_record.'&documento=fattura" data-widget="modal" data-title="'.tr('Crea fattura').'">
<i class="fa fa-file"></i> '.tr('Fattura').'
</a>
</li>
<a class="dropdown-item" data-href="'.$structure->fileurl('crea_documento.php').'?id_module='.$id_module.'&id_record='.$id_record.'&documento=ddt" data-widget="modal" data-title="'.tr('Crea ddt').'">
<i class="fa fa-truck"></i> '.tr('Ddt').'
</a>
<a class="dropdown-item" data-href="'.$structure->fileurl('crea_documento.php').'?id_module='.$id_module.'&id_record='.$id_record.'&documento=fattura" data-widget="modal" data-title="'.tr('Crea fattura').'">
<i class="fa fa-file"></i> '.tr('Fattura').'
</a>
</ul>
</div>';

View File

@ -287,24 +287,20 @@ if (!$block_edit) {
<span class="caret"></span>
</button>
<ul class="dropdown-menu dropdown-menu-right">
<li>
<a style="cursor:pointer" onclick="gestioneDescrizione(this)" data-title="'.tr('Aggiungi descrizione').'">
<i class="fa fa-plus"></i> '.tr('Descrizione').'
</a>
</li>
<li>
<a style="cursor:pointer" onclick="gestioneSconto(this)" data-title="'.tr('Aggiungi sconto/maggiorazione').'">
<i class="fa fa-plus"></i> '.tr('Sconto/maggiorazione').'
</a>
</li>';
<a class="dropdown-item" style="cursor:pointer" onclick="gestioneDescrizione(this)" data-title="'.tr('Aggiungi descrizione').'">
<i class="fa fa-plus"></i> '.tr('Descrizione').'
</a>
<a class="dropdown-item" style="cursor:pointer" onclick="gestioneSconto(this)" data-title="'.tr('Aggiungi sconto/maggiorazione').'">
<i class="fa fa-plus"></i> '.tr('Sconto/maggiorazione').'
</a>';
if ($dir == 'entrata') {
echo '
<li>
<a class="'.(!empty($preventivi) ? '' : ' disabled').'" style="cursor:pointer" data-href="'.$structure->fileurl('add_preventivo.php').'?id_module='.$id_module.'&id_record='.$id_record.'" data-card-widget="modal" data-title="'.tr('Aggiungi Preventivo').'" onclick="saveForm()">
<i class="fa fa-plus"></i> '.tr('Preventivo').'
</a>
</li>';
<a class="'.(!empty($preventivi) ? '' : ' disabled').' dropdown-item" style="cursor:pointer" data-href="'.$structure->fileurl('add_preventivo.php').'?id_module='.$id_module.'&id_record='.$id_record.'" data-card-widget="modal" data-title="'.tr('Aggiungi Preventivo').'" onclick="saveForm()">
<i class="fa fa-plus"></i> '.tr('Preventivo').'
</a>';
}
echo '
</ul>

View File

@ -58,41 +58,29 @@ echo '
<span class="caret"></span>
</button>
<ul class="dropdown-menu dropdown-menu-right">
<li>
<a class="'.($disabled ? '' : 'disabled').'" data-href="'.$structure->fileurl('crea_documento.php').'?id_module='.$id_module.'&id_record='.$id_record.'&documento=contratto" data-widget="modal" data-title="'.tr('Crea contratto').'">
<i class="fa fa-file-o"></i> '.tr('Contratto').'
</a>
</li>
<a class="'.($disabled ? '' : 'disabled').' dropdown-item" data-href="'.$structure->fileurl('crea_documento.php').'?id_module='.$id_module.'&id_record='.$id_record.'&documento=contratto" data-widget="modal" data-title="'.tr('Crea contratto').'">
<i class="fa fa-file-o"></i> '.tr('Contratto').'
</a>
<li>
<a class="'.($disabled ? '' : 'disabled').'" data-href="'.$structure->fileurl('crea_documento.php').'?id_module='.$id_module.'&id_record='.$id_record.'&documento=ordine_cliente" data-widget="modal" data-title="'.tr('Crea ordine cliente').'">
<i class="fa fa-file-o"></i> '.tr('Ordine cliente').'
</a>
</li>
<a class="'.($disabled ? '' : 'disabled').' dropdown-item" data-href="'.$structure->fileurl('crea_documento.php').'?id_module='.$id_module.'&id_record='.$id_record.'&documento=ordine_cliente" data-widget="modal" data-title="'.tr('Crea ordine cliente').'">
<i class="fa fa-file-o"></i> '.tr('Ordine cliente').'
</a>
<li>
<a class="'.($disabled ? '' : 'disabled').'" data-href="'.$structure->fileurl('crea_documento.php').'?id_module='.$id_module.'&id_record='.$id_record.'&documento=ordine_fornitore" data-widget="modal" data-title="'.tr('Crea ordine fornitore').'">
<i class="fa fa-file-o"></i> '.tr('Ordine fornitore').'
</a>
</li>
<a class="'.($disabled ? '' : 'disabled').' dropdown-item" data-href="'.$structure->fileurl('crea_documento.php').'?id_module='.$id_module.'&id_record='.$id_record.'&documento=ordine_fornitore" data-widget="modal" data-title="'.tr('Crea ordine fornitore').'">
<i class="fa fa-file-o"></i> '.tr('Ordine fornitore').'
</a>
<li>
<a class="'.($disabled ? '' : 'disabled').'" data-href="'.$structure->fileurl('crea_documento.php').'?id_module='.$id_module.'&id_record='.$id_record.'&documento=intervento" data-widget="modal" data-title="'.tr('Crea attività').'">
<i class="fa fa-file-o"></i> '.tr('Attività').'
</a>
</li>
<a class="'.($disabled ? '' : 'disabled').' dropdown-item" data-href="'.$structure->fileurl('crea_documento.php').'?id_module='.$id_module.'&id_record='.$id_record.'&documento=intervento" data-widget="modal" data-title="'.tr('Crea attività').'">
<i class="fa fa-file-o"></i> '.tr('Attività').'
</a>
<li>
<a class="'.($disabled ? '' : 'disabled').'" data-href="'.$structure->fileurl('crea_documento.php').'?id_module='.$id_module.'&id_record='.$id_record.'&documento=ddt" data-widget="modal" data-title="'.tr('Crea ordine cliente').'">
<i class="fa fa-truck"></i> '.tr('DDT in uscita').'
</a>
</li>
<a class="'.($disabled ? '' : 'disabled').' dropdown-item" data-href="'.$structure->fileurl('crea_documento.php').'?id_module='.$id_module.'&id_record='.$id_record.'&documento=ddt" data-widget="modal" data-title="'.tr('Crea ordine cliente').'">
<i class="fa fa-truck"></i> '.tr('DDT in uscita').'
</a>
<li>
<a class="'.($disabled ? '' : 'disabled').'" data-href="'.$structure->fileurl('crea_documento.php').'?id_module='.$id_module.'&id_record='.$id_record.'&documento=fattura" data-widget="modal" data-title="'.tr('Crea fattura').'">
<i class="fa fa-file"></i> '.tr('Fattura').'
</a>
</li>
<a class="'.($disabled ? '' : 'disabled').' dropdown-item" data-href="'.$structure->fileurl('crea_documento.php').'?id_module='.$id_module.'&id_record='.$id_record.'&documento=fattura" data-widget="modal" data-title="'.tr('Crea fattura').'">
<i class="fa fa-file"></i> '.tr('Fattura').'
</a>
</ul>
</div>';

View File

@ -275,17 +275,14 @@ if (!$block_edit) {
<span class="caret"></span>
</button>
<ul class="dropdown-menu dropdown-menu-right">
<li>
<a style="cursor:pointer" onclick="gestioneDescrizione(this)" data-title="'.tr('Aggiungi descrizione').'">
<i class="fa fa-plus"></i> '.tr('Descrizione').'
</a>
</li>
<li>
<a style="cursor:pointer" onclick="gestioneSconto(this)" data-title="'.tr('Aggiungi sconto/maggiorazione').'">
<i class="fa fa-plus"></i> '.tr('Sconto/maggiorazione').'
</a>
</li>
<a class="dropdown-item" style="cursor:pointer" onclick="gestioneDescrizione(this)" data-title="'.tr('Aggiungi descrizione').'">
<i class="fa fa-plus"></i> '.tr('Descrizione').'
</a>
<a class="dropdown-item" style="cursor:pointer" onclick="gestioneSconto(this)" data-title="'.tr('Aggiungi sconto/maggiorazione').'">
<i class="fa fa-plus"></i> '.tr('Sconto/maggiorazione').'
</a>
</ul>
</div>
</div>

View File

@ -47,7 +47,7 @@ if (sizeof($rs_doc) > 0) {
<span class="sr-only">Toggle Dropdown</span>
</a>
<ul class="dropdown-menu">
<li><a href="<?php echo base_path(); ?>/controller.php?id_module=<?php echo $id_modulo; ?>" class="dropdown-item"><i class="fa fa-chevron-left"></i> <?php echo tr('Vai all\'elenco delle fatture'); ?></a></li>
<a class="dropdown-item" href="<?php echo base_path(); ?>/controller.php?id_module=<?php echo $id_modulo; ?>"><i class="fa fa-chevron-left"></i> <?php echo tr('Vai all\'elenco delle fatture'); ?></a>
</ul>
</div>
</div>
@ -57,20 +57,19 @@ if (sizeof($rs_doc) > 0) {
<div class="col-md-2">
<br>
<div class="btn-group">
<button type="button" class="btn btn-info dropdown-toggle" data-card-widget="dropdown" aria-haspopup="true" aria-expanded="false">
<?php echo tr('Più fatture collegate'); ?>... <span class="caret"></span>
<span class="sr-only">Toggle Dropdown</span>
</button>
<ul class="dropdown-menu">
<?php
for ($i = 0; $i < sizeof($rs_doc); ++$i) {
$rs = $dbo->fetchArray('SELECT `dir` FROM `co_tipidocumento` INNER JOIN `co_documenti` ON `co_tipidocumento`.`id`=`co_documenti`.`idtipodocumento` WHERE `co_documenti`.`id`='.prepare($rs_doc[$i]['iddocumento']));
$id_modulo = ($rs[0]['dir'] == 'entrata') ? (new Module())->getByField('title', 'Fatture di vendita', Models\Locale::getPredefined()->id)->id_record : (new Module())->getByField('title', 'Fatture di acquisto', Models\Locale::getPredefined()->id); ?>
<li><a href="<?php echo base_path(); ?>/editor.php?id_module=<?php echo $id_modulo; ?>&id_record=<?php echo $rs_doc[$i]['iddocumento']; ?>" class="dropdown-item"><i class="fa fa-chevron-left"></i> <?php echo tr('Vai alla fattura n. '.$rs_doc[$i]['numero']); ?></a></li>
<a href="<?php echo base_path(); ?>/editor.php?id_module=<?php echo $id_modulo; ?>&id_record=<?php echo $rs_doc[$i]['iddocumento']; ?>" class="dropdown-item">
<i class="fa fa-chevron-left"></i> <?php echo tr('Vai alla fattura n. '.$rs_doc[$i]['numero']); ?>
</a>
<?php
} ?>
</ul>

View File

@ -570,7 +570,7 @@ if (!empty($righe)) {
<input type="hidden" name="id_riga_riferimento_vendita['.$key.']" id="id_riga_riferimento_vendita_'.$key.'" value="">
<input type="hidden" name="tipo_riga_riferimento_vendita['.$key.']" id="tipo_riga_riferimento_vendita_'.$key.'" value="">
<div class="card collapsed-card" style="background:#eeeeee;">
<div class="card collapsed-card card-lg" style="background:#eeeeee;">
<div class="card-header">
<div class="row">
<div class="col-md-5">

View File

@ -168,23 +168,23 @@ class ButtonManager implements ManagerInterface
'.($predefined === false ? $this->defaultText($options).' ' : '').'<span class="caret"></span>
<span class="sr-only">Toggle Dropdown</span>
</button>
<ul class="dropdown-menu dropdown-menu-right">';
<div class="dropdown-menu dropdown-menu-right">';
foreach ($list as $i => $element) {
$result .= '
<li>'.$this->link([
$result .=
$this->link([
'type' => $options['type'],
'id' => $element['id'],
'id_module' => $options['id_module'],
'id_record' => $options['id_record'],
'class' => false,
'class' => 'dropdown-item',
'parameters' => $options['parameters'],
'html_id' => $options['html_id'].'_'.$i,
]).'</li>';
]);
}
$result .= '
</ul>
</div>
</div>';
} elseif ($count == 1) {
$result = $this->link([