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").'
</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": "email", "id_module": "'.$id_module.'", "id_plugin": "'.$id_plugin.'", "id_record": "'.$id_record.'" )}';
@ -225,36 +234,21 @@ if (empty($record) || !$has_access) {
<div class="clearfix"></div>
<br>';
// Pulsanti personalizzati
$buttons = $structure->filepath('buttons.php');
if (!empty($buttons)) {
// Eventuale header personalizzato
$module_header = $structure->filepath('header.php');
$module_header_html = '';
if (!empty($module_header)) {
ob_start();
include $buttons;
$buttons = ob_get_clean();
include $module_header;
$module_header_html = 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
$module_header = $structure->filepath('header.php');
$module_header_html = '';
if (!empty($module_header)) {
ob_start();
include $module_header;
$module_header_html = ob_get_clean();
}
// Eventuale header personalizzato
if ($module_header_html) {
echo '<div class="module-header">';
echo $module_header_html;
echo '</div>';
}
// Eventuale header personalizzato
if ($module_header_html) {
echo '<div class="module-header">';
echo $module_header_html;
echo '</div>';
}
// Contenuti del modulo

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' : '').'>
<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').'
</a>
<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>
</a>
</a>*/
echo '
<script>
function duplicaIntervento() {
openModal("'.tr('Duplica attività').'", "'.$module->fileurl('modals/duplicazione.php').'?id_module='.$id_module.'&id_record='.$id_record.'");