diff --git a/htdocs/ticket/card.php b/htdocs/ticket/card.php index d355ffc5829..e7e756cf37e 100644 --- a/htdocs/ticket/card.php +++ b/htdocs/ticket/card.php @@ -1201,64 +1201,21 @@ if ($action == 'create' || $action == 'presend') { print ''; print ''; - // Categories - if (isModEnabled('category')) { - print '
'; - print ''; - print ''; - print ''; - - if ($user->hasRight('ticket', 'write') && $action == 'categories') { - $cate_arbo = $form->select_all_categories(Categorie::TYPE_TICKET, '', 'parent', 64, 0, 1); - if (is_array($cate_arbo)) { - // Categories - print '"; - } - } else { - print '"; - } - - print '
'; - print ''; - } - print '
'; - print $langs->trans("Categories"); - if ($action != 'categories' && !$user->socid) { - print ''.img_edit($langs->trans('Modify')).'
'; - print '
'; - print '
'; - print ''; - print ''; - print ''; - - $category = new Categorie($db); - $cats = $category->containing($object->id, 'ticket'); - $arrayselected = array(); - foreach ($cats as $cat) { - $arrayselected[] = $cat->id; - } - - print img_picto('', 'category', 'class="pictofixedwidth"').$form->multiselectarray('categories', $cate_arbo, $arrayselected, '', 0, 'quatrevingtpercent widthcentpercentminusx', 0, 0); - print ''; - print '
'; - print "
'; - print $form->showCategories($object->id, Categorie::TYPE_TICKET, 1); - print "
'; - } + print '
'; // View Original message $actionobject->viewTicketOriginalMessage($user, $action, $object); // Classification of ticket print '
'; // You can use div-table-responsive-no-min if you don't need reserved height for your table - print ''; + print '
'; print ''; print ''; print '
'; print $langs->trans('TicketProperties'); print ''; if (GETPOST('set', 'alpha') == 'properties' && $user->hasRight('ticket', 'write')) { - print ''; + print ''; } else { // Button to edit Properties if (isset($object->status) && ($object->status < $object::STATUS_NEED_MORE_INFO || getDolGlobalString('TICKET_ALLOW_CLASSIFICATION_MODIFICATION_EVEN_IF_CLOSED')) && $user->hasRight('ticket', 'write')) { @@ -1320,6 +1277,51 @@ if ($action == 'create' || $action == 'presend') { print ''; + // Tags/Categories + if (isModEnabled('category')) { + print ''; + print ''; + print ''; + + if ($user->hasRight('ticket', 'write') && $action == 'categories') { + $cate_arbo = $form->select_all_categories(Categorie::TYPE_TICKET, '', 'parent', 64, 0, 1); + if (is_array($cate_arbo)) { + // Categories + print '"; + } + } else { + print '"; + } + + print '
'; + print ''; + } + print '
'; + print $langs->trans("Categories"); + if ($action != 'categories' && !$user->socid) { + print ''.img_edit($langs->trans('Modify')).'
'; + print '
'; + print '
'; + print ''; + print ''; + print ''; + + $category = new Categorie($db); + $cats = $category->containing($object->id, 'ticket'); + $arrayselected = array(); + foreach ($cats as $cat) { + $arrayselected[] = $cat->id; + } + + print img_picto('', 'category', 'class="pictofixedwidth"').$form->multiselectarray('categories', $cate_arbo, $arrayselected, '', 0, 'maxwidth500 widthcentpercentminusx', 0, 0); + print ''; + print '
'; + print "
'; + print $form->showCategories($object->id, Categorie::TYPE_TICKET, 1); + print "
'; + } + + // Display navbar with links to change ticket status print ''; if (!$user->socid && $user->hasRight('ticket', 'write') && isset($object->status) && $object->status < $object::STATUS_CLOSED && GETPOST('set') !== 'properties') { diff --git a/htdocs/ticket/class/actions_ticket.class.php b/htdocs/ticket/class/actions_ticket.class.php index cc7e302db74..a9c988b4386 100644 --- a/htdocs/ticket/class/actions_ticket.class.php +++ b/htdocs/ticket/class/actions_ticket.class.php @@ -186,7 +186,7 @@ class ActionsTicket extends CommonHookActions */ public function viewTicketOriginalMessage($user, $action, $object) { - global $conf, $langs; + global $langs; print ''."\n"; if ($user->hasRight('ticket', 'manage') && $action == 'edit_message_init') { @@ -199,7 +199,7 @@ class ActionsTicket extends CommonHookActions // Initial message print '
'; // You can use div-table-responsive-no-min if you don't need reserved height for your table - print ''; + print '
'; print '';
'; print $langs->trans("InitialMessage"); print ''; @@ -234,8 +234,8 @@ class ActionsTicket extends CommonHookActions } if ($user->hasRight('ticket', 'manage') && $action == 'edit_message_init') { print '
'; - print ' '; - print ' '; + print ' '; + print ' '; print '
'; } print '