Skip to content

Commit 852236e

Browse files
committed
Unificazione pulsanti su unica riga
1 parent b53704f commit 852236e

2 files changed

Lines changed: 29 additions & 32 deletions

File tree

‎editor.php‎

Lines changed: 23 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,16 @@
172172
<i class="fa fa-chevron-left"></i> '.tr("Torna all'elenco").'
173173
</a>
174174
175-
<div class="float-right d-none d-sm-inline">
175+
<div class="float-right d-none d-sm-inline">';
176+
177+
// Pulsanti personalizzati
178+
$buttons = $structure->filepath('buttons.php');
179+
180+
if (!empty($buttons)) {
181+
include $buttons;
182+
}
183+
184+
echo '
176185
{( "name": "button", "type": "print", "id_module": "'.$id_module.'", "id_plugin": "'.$id_plugin.'", "id_record": "'.$id_record.'" )}
177186
178187
{( "name": "button", "type": "email", "id_module": "'.$id_module.'", "id_plugin": "'.$id_plugin.'", "id_record": "'.$id_record.'" )}';
@@ -225,36 +234,21 @@
225234
<div class="clearfix"></div>
226235
<br>';
227236

228-
// Pulsanti personalizzati
229-
$buttons = $structure->filepath('buttons.php');
230-
if (!empty($buttons)) {
231-
ob_start();
232-
include $buttons;
233-
$buttons = ob_get_clean();
237+
// Eventuale header personalizzato
238+
$module_header = $structure->filepath('header.php');
239+
$module_header_html = '';
234240

235-
echo '
236-
<div class="float-right d-none d-sm-inline" id="pulsanti-modulo">
237-
'.$buttons.'
238-
</div>
239-
240-
<div class="clearfix"></div>
241-
<br>';
242-
// Eventuale header personalizzato
243-
$module_header = $structure->filepath('header.php');
244-
$module_header_html = '';
245-
246-
if (!empty($module_header)) {
247-
ob_start();
248-
include $module_header;
249-
$module_header_html = ob_get_clean();
250-
}
241+
if (!empty($module_header)) {
242+
ob_start();
243+
include $module_header;
244+
$module_header_html = ob_get_clean();
245+
}
251246

252-
// Eventuale header personalizzato
253-
if ($module_header_html) {
254-
echo '<div class="module-header">';
255-
echo $module_header_html;
256-
echo '</div>';
257-
}
247+
// Eventuale header personalizzato
248+
if ($module_header_html) {
249+
echo '<div class="module-header">';
250+
echo $module_header_html;
251+
echo '</div>';
258252
}
259253

260254
// Contenuti del modulo

‎modules/interventi/buttons.php‎

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,15 +39,18 @@
3939
4040
<button type="button" class="btn btn-primary '.(!empty($info_firma) ? 'tip' : '').'" title="'.$info_firma.'" onclick="anteprimaFirma()" '.($record['flag_completato'] ? 'disabled' : '').'>
4141
<i class="fa fa-'.(!empty($info_firma) ? 'refresh' : 'desktop').'"></i> '.$frase.'...
42-
</button>
42+
</button>';
43+
4344

44-
<a class="btn btn-info'.($prev ? '' : ' disabled').'" href="'.base_path().'/editor.php?id_module=3&id_record='.$prev.'">
45+
// TODO: da standardizzare in struttura per tutti i moduli di tipo table
46+
/*<a class="btn btn-info'.($prev ? '' : ' disabled').'" href="'.base_path().'/editor.php?id_module=3&id_record='.$prev.'">
4547
<i class="fa fa-arrow-circle-left"></i> '.tr('Precedente').'
4648
</a>
4749
<a class="btn btn-info'.($next ? '' : ' disabled').'" href="'.base_path().'/editor.php?id_module=3&id_record='.$next.'">
4850
'.tr('Successivo').' <i class="fa fa-arrow-circle-right"></i>
49-
</a>
51+
</a>*/
5052

53+
echo '
5154
<script>
5255
function duplicaIntervento() {
5356
openModal("'.tr('Duplica attività').'", "'.$module->fileurl('modals/duplicazione.php').'?id_module='.$id_module.'&id_record='.$id_record.'");

0 commit comments

Comments
 (0)