Skip to content

Commit

Permalink
#2604 [TicketStats] add: filter all in first element
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolas-eoxia committed Oct 14, 2022
1 parent 2b8ec0e commit 8836b21
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions view/ticket/ticketstats.php
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,8 @@
print '<form class="ticketstats" name="stats" method="POST" action="'.$_SERVER["PHP_SELF"].'?refresh=1">';
print '<input type="hidden" name="token" value="'.newToken().'">';

$all = array($langs->trans('All') => $langs->trans('All'));

print '<table class="noborder centpercent">';
print '<tr class="liste_titre"><td class="liste_titre" colspan="2">'.$langs->trans("Filter").'</td></tr>';
// Company
Expand All @@ -254,7 +256,7 @@
// DigiriskElement
print '<tr><td class="left">'.$form->textwithpicto($langs->trans("GP/UT"), $langs->trans("GP/UTHelp")).'</td><td class="left">';
$digiriskelementlist = $digiriskelement->select_digiriskelement_list($digiriskelementid, 'digiriskelementid', '', 1, 0, array(), 1);
$digiriskelementlist[$langs->trans('All')] = $langs->trans('All');
$digiriskelementlist = $all + $digiriskelementlist;
print $form->multiselectarray('digiriskelementlist', $digiriskelementlist, ((!empty(GETPOST('refresh', 'int'))) ? GETPOST('digiriskelementlist', 'array') : $digiriskelementlist), 0, 0, 'widthcentpercentminusx maxwidth300');
print '</td></tr>';
// Category
Expand All @@ -264,7 +266,7 @@
print '<tr><td>'.$form->textwithpicto($cat_label, $langs->trans("CategoryTicketHelp")).'</td><td>';
$cate_arbo = $form->select_all_categories($cat_type, null, 'parent', null, null, 1);
print img_picto('', 'category', 'class="pictofixedwidth"');
$cate_arbo[$langs->trans('All')] = $langs->trans('All');
$cate_arbo = $all + $cate_arbo;
print $form->multiselectarray('ticketcats', $cate_arbo, ((!empty(GETPOST('refresh', 'int'))) ? GETPOST('ticketcats', 'array') : $cate_arbo), 0, 0, 'widthcentpercentminusx maxwidth300');
print '</td></tr>';
}
Expand All @@ -279,7 +281,7 @@
// Status
print '<tr><td class="left">'.$form->textwithpicto($langs->trans("Status"), $langs->trans("StatusHelp")).'</td><td class="left">';
$liststatus = $object->statuts_short;
$liststatus[$langs->trans('All')] = $langs->trans('All');
$liststatus = $all + $liststatus;
print $form->multiselectarray('object_status', $liststatus, ((!empty(GETPOST('refresh', 'int'))) ? GETPOST('object_status', 'array') : $liststatus), 0, 0, 'widthcentpercentminusx maxwidth300', 1);
print '</td></tr>';
//DateRange -- Plage de date
Expand Down

0 comments on commit 8836b21

Please sign in to comment.