Unificazione pulsanti su unica riga

This commit is contained in:
loviuz 2024-06-29 01:42:16 +02:00
parent b53704f00f
commit 852236eb01
2 changed files with 29 additions and 32 deletions

View File

@ -172,7 +172,16 @@ if (empty($record) || !$has_access) {
<i class="fa fa-chevron-left"></i> '.tr("Torna all'elenco").' <i class="fa fa-chevron-left"></i> '.tr("Torna all'elenco").'
</a> </a>
<div class="float-right d-none d-sm-inline"> <div class="float-right d-none d-sm-inline">';
// Pulsanti personalizzati
$buttons = $structure->filepath('buttons.php');
if (!empty($buttons)) {
include $buttons;
}
echo '
{( "name": "button", "type": "print", "id_module": "'.$id_module.'", "id_plugin": "'.$id_plugin.'", "id_record": "'.$id_record.'" )} {( "name": "button", "type": "print", "id_module": "'.$id_module.'", "id_plugin": "'.$id_plugin.'", "id_record": "'.$id_record.'" )}
{( "name": "button", "type": "email", "id_module": "'.$id_module.'", "id_plugin": "'.$id_plugin.'", "id_record": "'.$id_record.'" )}'; {( "name": "button", "type": "email", "id_module": "'.$id_module.'", "id_plugin": "'.$id_plugin.'", "id_record": "'.$id_record.'" )}';
@ -225,20 +234,6 @@ if (empty($record) || !$has_access) {
<div class="clearfix"></div> <div class="clearfix"></div>
<br>'; <br>';
// Pulsanti personalizzati
$buttons = $structure->filepath('buttons.php');
if (!empty($buttons)) {
ob_start();
include $buttons;
$buttons = ob_get_clean();
echo '
<div class="float-right d-none d-sm-inline" id="pulsanti-modulo">
'.$buttons.'
</div>
<div class="clearfix"></div>
<br>';
// Eventuale header personalizzato // Eventuale header personalizzato
$module_header = $structure->filepath('header.php'); $module_header = $structure->filepath('header.php');
$module_header_html = ''; $module_header_html = '';
@ -255,7 +250,6 @@ if (empty($record) || !$has_access) {
echo $module_header_html; echo $module_header_html;
echo '</div>'; echo '</div>';
} }
}
// Contenuti del modulo // Contenuti del modulo
echo ' echo '

View File

@ -39,15 +39,18 @@ echo '
<button type="button" class="btn btn-primary '.(!empty($info_firma) ? 'tip' : '').'" title="'.$info_firma.'" onclick="anteprimaFirma()" '.($record['flag_completato'] ? 'disabled' : '').'> <button type="button" class="btn btn-primary '.(!empty($info_firma) ? 'tip' : '').'" title="'.$info_firma.'" onclick="anteprimaFirma()" '.($record['flag_completato'] ? 'disabled' : '').'>
<i class="fa fa-'.(!empty($info_firma) ? 'refresh' : 'desktop').'"></i> '.$frase.'... <i class="fa fa-'.(!empty($info_firma) ? 'refresh' : 'desktop').'"></i> '.$frase.'...
</button> </button>';
<a class="btn btn-info'.($prev ? '' : ' disabled').'" href="'.base_path().'/editor.php?id_module=3&id_record='.$prev.'">
// TODO: da standardizzare in struttura per tutti i moduli di tipo table
/*<a class="btn btn-info'.($prev ? '' : ' disabled').'" href="'.base_path().'/editor.php?id_module=3&id_record='.$prev.'">
<i class="fa fa-arrow-circle-left"></i> '.tr('Precedente').' <i class="fa fa-arrow-circle-left"></i> '.tr('Precedente').'
</a> </a>
<a class="btn btn-info'.($next ? '' : ' disabled').'" href="'.base_path().'/editor.php?id_module=3&id_record='.$next.'"> <a class="btn btn-info'.($next ? '' : ' disabled').'" href="'.base_path().'/editor.php?id_module=3&id_record='.$next.'">
'.tr('Successivo').' <i class="fa fa-arrow-circle-right"></i> '.tr('Successivo').' <i class="fa fa-arrow-circle-right"></i>
</a> </a>*/
echo '
<script> <script>
function duplicaIntervento() { function duplicaIntervento() {
openModal("'.tr('Duplica attività').'", "'.$module->fileurl('modals/duplicazione.php').'?id_module='.$id_module.'&id_record='.$id_record.'"); openModal("'.tr('Duplica attività').'", "'.$module->fileurl('modals/duplicazione.php').'?id_module='.$id_module.'&id_record='.$id_record.'");