Skip to content

Commit 9eb63c3

Browse files
committed
refactor: riordinamento azioni di gruppo standard
1 parent 3f6f154 commit 9eb63c3

7 files changed

Lines changed: 97 additions & 98 deletions

File tree

modules/anagrafiche/bulk.php

Lines changed: 21 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -99,25 +99,6 @@
9999

100100
$operations = [];
101101

102-
$operations['delete-bulk'] = [
103-
'text' => '<span><i class="fa fa-trash"></i> '.tr('Elimina selezionati').'</span>',
104-
'data' => [
105-
'msg' => tr('Vuoi davvero eliminare le anagrafiche selezionate?'),
106-
'button' => tr('Procedi'),
107-
'class' => 'btn btn-lg btn-danger',
108-
],
109-
];
110-
111-
$operations['export-csv'] = [
112-
'text' => '<span><i class="fa fa-download"></i> '.tr('Esporta selezionati').'</span>',
113-
'data' => [
114-
'msg' => tr('Vuoi esportare un CSV con le anagrafiche selezionate?'),
115-
'button' => tr('Procedi'),
116-
'class' => 'btn btn-lg btn-success',
117-
'blank' => true,
118-
],
119-
];
120-
121102
$operations['ricerca-coordinate'] = [
122103
'text' => '<span><i class="fa fa-map"></i> '.tr('Ricerca coordinate').'</span>',
123104
'data' => [
@@ -145,4 +126,25 @@
145126
],
146127
];
147128

129+
$operations['export-csv'] = [
130+
'text' => '<span><i class="fa fa-download"></i> '.tr('Esporta').'</span>',
131+
'data' => [
132+
'msg' => tr('Vuoi esportare un CSV con le anagrafiche selezionate?'),
133+
'button' => tr('Procedi'),
134+
'class' => 'btn btn-lg btn-success',
135+
'blank' => true,
136+
],
137+
];
138+
139+
$operations['delete-bulk'] = [
140+
'text' => '<span><i class="fa fa-trash"></i> '.tr('Elimina').'</span>',
141+
'data' => [
142+
'msg' => tr('Vuoi davvero eliminare le anagrafiche selezionate?'),
143+
'button' => tr('Procedi'),
144+
'class' => 'btn btn-lg btn-danger',
145+
],
146+
];
147+
148+
149+
148150
return $operations;

modules/articoli/bulk.php

Lines changed: 19 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -597,27 +597,6 @@
597597
],
598598
];
599599

600-
if (App::debug()) {
601-
$operations['delete-bulk'] = [
602-
'text' => '<span><i class="fa fa-trash"></i> '.tr('Elimina selezionati').'</span>',
603-
'data' => [
604-
'msg' => tr('Vuoi davvero eliminare gli articoli selezionati?'),
605-
'button' => tr('Procedi'),
606-
'class' => 'btn btn-lg btn-danger',
607-
],
608-
];
609-
}
610-
611-
$operations['export-csv'] = [
612-
'text' => '<span><i class="fa fa-download"></i> '.tr('Esporta selezionati').'</span>',
613-
'data' => [
614-
'msg' => tr('Vuoi esportare un CSV con gli articoli selezionati?'),
615-
'button' => tr('Procedi'),
616-
'class' => 'btn btn-lg btn-success',
617-
'blank' => true,
618-
],
619-
];
620-
621600
$operations['set-acquisto-ifzero'] = [
622601
'text' => '<span><i class="fa fa-refresh"></i> '.tr('Imposta prezzo di acquisto da fattura ').'</span>',
623602
'data' => [
@@ -676,4 +655,23 @@
676655
],
677656
];
678657

658+
$operations['export-csv'] = [
659+
'text' => '<span><i class="fa fa-download"></i> '.tr('Esporta').'</span>',
660+
'data' => [
661+
'msg' => tr('Vuoi esportare un CSV con gli articoli selezionati?'),
662+
'button' => tr('Procedi'),
663+
'class' => 'btn btn-lg btn-success',
664+
'blank' => true,
665+
],
666+
];
667+
668+
$operations['delete-bulk'] = [
669+
'text' => '<span><i class="fa fa-trash"></i> '.tr('Elimina').'</span>',
670+
'data' => [
671+
'msg' => tr('Vuoi davvero eliminare gli articoli selezionati?'),
672+
'button' => tr('Procedi'),
673+
'class' => 'btn btn-lg btn-danger',
674+
],
675+
];
676+
679677
return $operations;

modules/ddt/bulk.php

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -179,17 +179,6 @@
179179
break;
180180
}
181181

182-
if (App::debug()) {
183-
$operations['delete-bulk'] = [
184-
'text' => '<span><i class="fa fa-trash"></i> '.tr('Elimina selezionati').'</span>',
185-
'data' => [
186-
'msg' => tr('Vuoi davvero eliminare i ddt selezionati?'),
187-
'button' => tr('Procedi'),
188-
'class' => 'btn btn-lg btn-danger',
189-
],
190-
];
191-
}
192-
193182
$operations['crea_fattura'] = [
194183
'text' => '<span><i class="fa fa-file-code-o"></i> '.tr('Fattura _TYPE_', ['_TYPE_' => strtolower((string) $module->getTranslation('title'))]),
195184
'data' => [
@@ -216,4 +205,13 @@
216205
],
217206
];
218207

208+
$operations['delete-bulk'] = [
209+
'text' => '<span><i class="fa fa-trash"></i> '.tr('Elimina').'</span>',
210+
'data' => [
211+
'msg' => tr('Vuoi davvero eliminare i ddt selezionati?'),
212+
'button' => tr('Procedi'),
213+
'class' => 'btn btn-lg btn-danger',
214+
],
215+
];
216+
219217
return $operations;

modules/fatture/bulk.php

Lines changed: 24 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -669,19 +669,6 @@
669669
];
670670
}
671671

672-
$operations['copy-bulk'] = [
673-
'text' => '<span><i class="fa fa-copy"></i> '.tr('Duplica selezionati').'</span>',
674-
'data' => [
675-
'msg' => tr('Vuoi davvero duplicare le righe selezionate?').'<br><br>{[ "type": "select", "label": "'.tr('Fattura in avanti di').'", "name": "skip_time", "required": 1, "values": "list=\"Giorno\":\"'.tr('Un giorno').'\", \"Settimana\":\"'.tr('Una settimana').'\", \"Mese\":\"'.tr('Un mese').'\", \"Anno\":\"'.tr('Un anno').'\" ", "value": "Giorno" ]}<br>{[ "type": "select", "label": "'.tr('Sezionale').'", "name": "id_segment", "required": 1, "ajax-source": "segmenti", "select-options": '.json_encode(['id_module' => $id_module, 'is_sezionale' => 1]).', "value": "'.$_SESSION['module_'.$id_module]['id_segment'].'", "select-options-escape": true ]}<br>{[ "type": "checkbox", "label": "'.tr('Aggiungere i riferimenti ai documenti esterni?').'", "placeholder": "'.tr('Aggiungere i riferimenti ai documenti esterni?').'", "name": "riferimenti" ]}',
676-
'button' => tr('Procedi'),
677-
'class' => 'btn btn-lg btn-warning',
678-
],
679-
];
680-
681-
$operations['delete-bulk'] = [
682-
'text' => '<span><i class="fa fa-trash"></i> '.tr('Elimina selezionati').'</span>',
683-
];
684-
685672
if ($dir == 'entrata') {
686673
$operations['change-stato'] = [
687674
'text' => '<span><i class="fa fa-refresh"></i> '.tr('Emetti fatture').'</span>',
@@ -694,16 +681,6 @@
694681
];
695682
}
696683

697-
$operations['export-csv'] = [
698-
'text' => '<span><i class="fa fa-download"></i> '.tr('Esporta selezionati').'</span>',
699-
'data' => [
700-
'msg' => tr('Vuoi esportare un CSV con le fatture selezionate?'),
701-
'button' => tr('Procedi'),
702-
'class' => 'btn btn-lg btn-success',
703-
'blank' => true,
704-
],
705-
];
706-
707684
if ($module->name == 'Fatture di vendita') {
708685
$operations['export-bulk'] = [
709686
'text' => '<span class="'.((!extension_loaded('zip')) ? 'text-muted disabled' : '').'"><i class="fa fa-file-archive-o"></i> '.tr('Esporta stampe').'</span>',
@@ -785,4 +762,28 @@
785762
];
786763
}
787764

765+
$operations['export-csv'] = [
766+
'text' => '<span><i class="fa fa-download"></i> '.tr('Esporta').'</span>',
767+
'data' => [
768+
'msg' => tr('Vuoi esportare un CSV con le fatture selezionate?'),
769+
'button' => tr('Procedi'),
770+
'class' => 'btn btn-lg btn-success',
771+
'blank' => true,
772+
],
773+
];
774+
775+
$operations['copy-bulk'] = [
776+
'text' => '<span><i class="fa fa-copy"></i> '.tr('Duplica').'</span>',
777+
'data' => [
778+
'msg' => tr('Vuoi davvero duplicare le righe selezionate?').'<br><br>{[ "type": "select", "label": "'.tr('Fattura in avanti di').'", "name": "skip_time", "required": 1, "values": "list=\"Giorno\":\"'.tr('Un giorno').'\", \"Settimana\":\"'.tr('Una settimana').'\", \"Mese\":\"'.tr('Un mese').'\", \"Anno\":\"'.tr('Un anno').'\" ", "value": "Giorno" ]}<br>{[ "type": "select", "label": "'.tr('Sezionale').'", "name": "id_segment", "required": 1, "ajax-source": "segmenti", "select-options": '.json_encode(['id_module' => $id_module, 'is_sezionale' => 1]).', "value": "'.$_SESSION['module_'.$id_module]['id_segment'].'", "select-options-escape": true ]}<br>{[ "type": "checkbox", "label": "'.tr('Aggiungere i riferimenti ai documenti esterni?').'", "placeholder": "'.tr('Aggiungere i riferimenti ai documenti esterni?').'", "name": "riferimenti" ]}',
779+
'button' => tr('Procedi'),
780+
'class' => 'btn btn-lg btn-warning',
781+
],
782+
];
783+
784+
$operations['delete-bulk'] = [
785+
'text' => '<span><i class="fa fa-trash"></i> '.tr('Elimina').'</span>',
786+
];
787+
788+
788789
return $operations;

modules/impianti/bulk.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@
6565
}
6666

6767
$operations['export-csv'] = [
68-
'text' => '<span><i class="fa fa-download"></i> '.tr('Esporta selezionati').'</span>',
68+
'text' => '<span><i class="fa fa-download"></i> '.tr('Esporta').'</span>',
6969
'data' => [
7070
'msg' => tr('Vuoi esportare un CSV con tutti gli impianti?'),
7171
'button' => tr('Procedi'),
@@ -75,7 +75,7 @@
7575
];
7676

7777
$operations['delete-bulk'] = [
78-
'text' => '<span><i class="fa fa-trash"></i> '.tr('Elimina selezionati').'</span>',
78+
'text' => '<span><i class="fa fa-trash"></i> '.tr('Elimina').'</span>',
7979
'data' => [
8080
'msg' => tr('Vuoi davvero eliminare gli impianti selezionati?'),
8181
'button' => tr('Procedi'),

modules/interventi/bulk.php

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -452,27 +452,6 @@
452452
],
453453
];
454454

455-
$operations['copy-bulk'] = [
456-
'text' => '<span><i class="fa fa-clone"></i> '.tr('Duplica attività'),
457-
'data' => [
458-
'title' => tr('Vuoi davvero fare una copia degli interventi selezionati?'),
459-
'msg' => '<br>{[ "type": "timestamp", "label": "'.tr('Data/ora richiesta').'", "name": "data_richiesta", "required": 0, "value": "-now-", "required":1 ]}
460-
<br>{[ "type": "select", "label": "'.tr('Stato').'", "name": "idstatointervento", "required": 1, "values": "query=SELECT `in_statiintervento`.`id`, `title` as descrizione, `colore` AS _bgcolor_ FROM `in_statiintervento` LEFT JOIN `in_statiintervento_lang` ON (`in_statiintervento`.`id` = `in_statiintervento_lang`.`id_record` AND `in_statiintervento_lang`.`id_lang` = '.prepare(Models\Locale::getDefault()->id).') WHERE `deleted_at` IS NULL ORDER BY `title`", "value": "" ]}
461-
<br>{[ "type":"checkbox", "label":"'.tr('Duplica righe').'", "name":"righe", "value":"" ]}
462-
<br>{[ "type":"checkbox", "label":"'.tr('Duplica sessioni').'", "name":"sessioni", "value":"" ]}
463-
<br>{[ "type":"checkbox", "label":"'.tr('Duplica impianti').'", "name":"impianti", "value":"" ]}
464-
<br>{[ "type":"checkbox", "label":"'.tr('Duplica allegati').'", "name":"allegati", "value":"" ]}
465-
<style>.swal2-modal{ width:600px !important; }</style>',
466-
'button' => tr('Procedi'),
467-
'class' => 'btn btn-lg btn-warning',
468-
'blank' => false,
469-
],
470-
];
471-
472-
$operations['delete-bulk'] = [
473-
'text' => '<span><i class="fa fa-trash"></i> '.tr('Elimina selezionati').'</span>',
474-
];
475-
476455
$operations['export-bulk'] = [
477456
'text' => '<span><i class="fa fa-file-archive-o"></i> '.tr('Esporta stampe'),
478457
'data' => [
@@ -531,4 +510,25 @@
531510
],
532511
];
533512

513+
$operations['copy-bulk'] = [
514+
'text' => '<span><i class="fa fa-clone"></i> '.tr('Duplica'),
515+
'data' => [
516+
'title' => tr('Vuoi davvero fare una copia degli interventi selezionati?'),
517+
'msg' => '<br>{[ "type": "timestamp", "label": "'.tr('Data/ora richiesta').'", "name": "data_richiesta", "required": 0, "value": "-now-", "required":1 ]}
518+
<br>{[ "type": "select", "label": "'.tr('Stato').'", "name": "idstatointervento", "required": 1, "values": "query=SELECT `in_statiintervento`.`id`, `title` as descrizione, `colore` AS _bgcolor_ FROM `in_statiintervento` LEFT JOIN `in_statiintervento_lang` ON (`in_statiintervento`.`id` = `in_statiintervento_lang`.`id_record` AND `in_statiintervento_lang`.`id_lang` = '.prepare(Models\Locale::getDefault()->id).') WHERE `deleted_at` IS NULL ORDER BY `title`", "value": "" ]}
519+
<br>{[ "type":"checkbox", "label":"'.tr('Duplica righe').'", "name":"righe", "value":"" ]}
520+
<br>{[ "type":"checkbox", "label":"'.tr('Duplica sessioni').'", "name":"sessioni", "value":"" ]}
521+
<br>{[ "type":"checkbox", "label":"'.tr('Duplica impianti').'", "name":"impianti", "value":"" ]}
522+
<br>{[ "type":"checkbox", "label":"'.tr('Duplica allegati').'", "name":"allegati", "value":"" ]}
523+
<style>.swal2-modal{ width:600px !important; }</style>',
524+
'button' => tr('Procedi'),
525+
'class' => 'btn btn-lg btn-warning',
526+
'blank' => false,
527+
],
528+
];
529+
530+
$operations['delete-bulk'] = [
531+
'text' => '<span><i class="fa fa-trash"></i> '.tr('Elimina').'</span>',
532+
];
533+
534534
return $operations;

modules/iva/bulk.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
}
5252

5353
$bulk = [
54-
'delete-bulk' => tr('Elimina selezionati'),
54+
'delete-bulk' => tr('Elimina'),
5555
];
5656

5757
return $bulk;

0 commit comments

Comments
 (0)