getRole($task->getDept())))
die('Invalid path');
global $cfg;
$id = $task->getId();
$dept = $task->getDept();
$thread = $task->getThread();
$iscloseable = $task->isCloseable();
$canClose = ($role->hasPerm(TaskModel::PERM_CLOSE) && $iscloseable === true);
$actions = array();
$object = $task->ticket;
if ($task->isOpen() && $role->hasPerm(Task::PERM_ASSIGN)) {
if ($task->getStaffId() != $thisstaff->getId()
&& (!$dept->assignMembersOnly()
|| $dept->isMember($thisstaff))) {
$actions += array(
'claim' => array(
'href' => sprintf('#tasks/%d/claim', $task->getId()),
'icon' => 'icon-user',
'label' => __('Claim'),
'redirect' => 'tasks.php'
));
}
$actions += array(
'assign/agents' => array(
'href' => sprintf('#tasks/%d/assign/agents', $task->getId()),
'icon' => 'icon-user',
'label' => __('Assign to Agent'),
'redirect' => 'tasks.php'
));
$actions += array(
'assign/teams' => array(
'href' => sprintf('#tasks/%d/assign/teams', $task->getId()),
'icon' => 'icon-user',
'label' => __('Assign to Team'),
'redirect' => 'tasks.php'
));
}
if ($role->hasPerm(Task::PERM_TRANSFER)) {
$actions += array(
'transfer' => array(
'href' => sprintf('#tasks/%d/transfer', $task->getId()),
'icon' => 'icon-share',
'label' => __('Transfer'),
'redirect' => 'tasks.php'
));
}
$actions += array(
'print' => array(
'href' => sprintf('tasks.php?id=%d&a=print', $task->getId()),
'class' => 'no-pjax',
'icon' => 'icon-print',
'label' => __('Print')
));
if ($role->hasPerm(Task::PERM_EDIT)) {
$actions += array(
'edit' => array(
'href' => sprintf('#tasks/%d/edit', $task->getId()),
'icon' => 'icon-edit',
'dialog' => '{"size":"large"}',
'label' => __('Edit')
));
}
if ($role->hasPerm(Task::PERM_DELETE)) {
$actions += array(
'delete' => array(
'href' => sprintf('#tasks/%d/delete', $task->getId()),
'icon' => 'icon-trash',
'class' => (strpos($_SERVER['REQUEST_URI'], 'tickets.php') !== false) ? 'danger' : 'red button',
'label' => __('Delete'),
'redirect' => 'tasks.php'
));
}
$info=($_POST && $errors)?Format::input($_POST):array();
$type = array('type' => 'viewed');
Signal::send('object.view', $task, $type);
if ($task->isOverdue())
$warn.=' '.__('Marked overdue!').'';
?>
getField('title');
echo $title->display($task->getTitle());
?>
getId(),
ObjectModel::OBJECT_TYPE_TASK) as $form) {
$form->addMissingFields();
$answers = $form->getAnswers()->exclude(Q::any(array(
'field__flags__hasbit' => DynamicFormField::FLAG_EXT_STORED,
'field__name__in' => array('title')
)));
$displayed = array();
foreach($answers as $a) {
if (!$a->getField()->isVisibleToStaff())
continue;
$displayed[] = $a;
}
if (count($displayed) == 0)
continue;
?>
getTitle()); ?> |
getField();
$id = $a->getLocal('id');
$label = $a->getLocal('label');
$v = $a->display();
$class = (Format::striptags($v)) ? '' : 'class="faded"';
$clean = (Format::striptags($v)) ? $v : '—' . __('Empty') . '—';
$field = $a->getField();
$isFile = ($field instanceof FileUploadField);
?>
: |
hasPerm(Task::PERM_EDIT)
&& $field->isEditableToStaff()) {
$isEmpty = strpos($v, 'Empty');
if ($isFile && !$isEmpty) {
echo sprintf('%s ', $id,
$class,
$clean);
}
?>
";
} elseif (strlen($v) > 200) {
$clean = Format::truncate($v, 200);
echo sprintf('%s', $id, $class, $clean);
echo " ";
} else
echo sprintf('%s', $id, $class, $clean); ?>
|
|
getThread()->render(array('M', 'R', 'N'),
array(
'mode' => Thread::MODE_STAFF,
'container' => 'taskThread',
'sort' => $thisstaff->thread_view_order
)
);
?>
getId(), $task->getId());
else
$action = 'tasks.php?id='.$task->getId();
?>
getMedia();
?>