';
echo '
';
$ticket_state=sprintf('%s',ucfirst($ticket->getStatus()));
if($ticket->isOpen()) {
if($ticket->isOverdue())
$ticket_state.=' — '.__('Overdue').'';
else
$ticket_state.=sprintf(' — %s',$ticket->getPriority());
}
echo sprintf('
'.__('Ticket State').': |
%s |
'.__('Created').': |
%s |
',$ticket_state,
Format::datetime($ticket->getCreateDate()));
if($ticket->isClosed()) {
echo sprintf('
'.__('Closed').': |
%s by %s |
',
Format::datetime($ticket->getCloseDate()),
($staff?$staff->getName():'staff')
);
} elseif($ticket->getEstDueDate()) {
echo sprintf('
'.__('Due Date').': |
%s |
',
Format::datetime($ticket->getEstDueDate()));
}
echo '
';
echo '
';
if($ticket->isOpen()) {
echo sprintf('
'.__('Assigned To').': |
%s |
',$ticket->isAssigned()?implode('/', $ticket->getAssignees()):' — '.__('Unassigned').' —');
}
echo sprintf(
'
'.__('From').': |
%s %s |
'.__('Department').': |
%s |
'.__('Help Topic').': |
%s |
',
$ticket->getUserId(),
Format::htmlchars($ticket->getName()),
$ticket->getEmail(),
Format::htmlchars($ticket->getDeptName()),
Format::htmlchars($ticket->getHelpTopic()));
echo '
';
?>
getId()) as $form) {
// Skip core fields shown earlier in the ticket preview
$answers = $form->getAnswers()->exclude(Q::any(array(
'field__flags__hasbit' => DynamicFormField::FLAG_EXT_STORED,
'field__name__in' => array('subject', 'priority')
)));
$displayed = array();
foreach($answers as $a) {
if (!($v = $a->display()))
continue;
$displayed[] = array($a->getLocal('label'), $v);
}
if (count($displayed) == 0)
continue;
echo '
';
echo '
';
echo '';
foreach ($displayed as $stuff) {
list($label, $v) = $stuff;
echo '';
echo ''.Format::htmlchars($label).': | ';
echo ''.$v.' | ';
echo '
';
}
echo '';
echo '
';
}
echo '
getCollaborators())) {?>
%s
%s <%s> | ',
($collab->isActive()? '' : 'class="faded"'),
(($U = $collab->getUser()) && ($A = $U->getAvatar()))
? $A->getImageTag(20) : sprintf('',
$collab->isActive() ? 'comments' : 'comment-alt'),
$collab->getUserId(),
$collab->getName(),
$collab->getEmail());
}
} else {
echo __("Ticket doesn't have any collaborators.");
}?>
%s',
$thread->getId(),
$thread && $thread->getNumCollaborators()
? __('Manage Collaborators') : __('Add Collaborator')
);
?>
sprintf(__('Thread (%d)'),$ticket->getThreadCount()),'url'=>"tickets.php?id=$tid");
if($ticket->getNumNotes())
$options[]=array('action'=>sprintf(__('Notes (%d)'),$ticket->getNumNotes()),'url'=>"tickets.php?id=$tid#notes");
if($ticket->isOpen())
$options[]=array('action'=>__('Reply'),'url'=>"tickets.php?id=$tid#reply");
if ($role->hasPerm(Ticket::PERM_ASSIGN))
$options[]=array('action'=>($ticket->isAssigned()?__('Reassign'):__('Assign')),'url'=>"tickets.php?id=$tid#assign");
if ($role->hasPerm(Ticket::PERM_TRANSFER))
$options[]=array('action'=>__('Transfer'),'url'=>"tickets.php?id=$tid#transfer");
$options[]=array('action'=>__('Post Note'),'url'=>"tickets.php?id=$tid#note");
if ($role->hasPerm(Ticket::PERM_EDIT))
$options[]=array('action'=>__('Edit Ticket'),'url'=>"tickets.php?id=$tid&a=edit");
if($options) {
echo '';
}
echo '