diff --git a/include/staff/templates/task-view.tmpl.php b/include/staff/templates/task-view.tmpl.php index e3d577c870c17fe258e9757abbffde34d2dc9bb0..1ca83b30ec8e12c28f7d7a408310b0f4e67e71ec 100644 --- a/include/staff/templates/task-view.tmpl.php +++ b/include/staff/templates/task-view.tmpl.php @@ -50,6 +50,7 @@ if ($role->hasPerm(Task::PERM_DELETE)) { 'delete' => array( 'href' => sprintf('#tasks/%d/delete', $task->getId()), 'icon' => 'icon-trash', + 'class' => 'red button task-action', 'label' => __('Delete') )); } diff --git a/include/staff/templates/tasks-actions.tmpl.php b/include/staff/templates/tasks-actions.tmpl.php index e5407d2ed902e702d023fda00ba497842d35f8a6..fcf6192a42b6289ca7b45ff529292f93ff14a694 100644 --- a/include/staff/templates/tasks-actions.tmpl.php +++ b/include/staff/templates/tasks-actions.tmpl.php @@ -26,7 +26,7 @@ if ($agent->hasPerm(Task::PERM_CLOSE, false)) { <a class="no-pjax tasks-action" href="#tasks/mass/reopen"><i class="icon-fixed-width icon-undo"></i> <?php - echo __('Reopen Tasks');?> </a> + echo __('Reopen');?> </a> </li> <?php } @@ -36,7 +36,7 @@ if ($agent->hasPerm(Task::PERM_CLOSE, false)) { <a class="no-pjax tasks-action" href="#tasks/mass/close"><i class="icon-fixed-width icon-ok-circle"></i> <?php - echo __('Close Tasks');?> </a> + echo __('Close');?> </a> </li> <?php } ?> @@ -48,13 +48,13 @@ if ($agent->hasPerm(Task::PERM_CLOSE, false)) { $actions += array( 'reopen' => array( 'icon' => 'icon-undo', - 'action' => __('Reopen Tasks') + 'action' => __('Reopen') )); $actions += array( 'close' => array( 'icon' => 'icon-ok-circle', - 'action' => __('Close Tasks') + 'action' => __('Close') )); } } @@ -63,7 +63,7 @@ if ($agent->hasPerm(Task::PERM_ASSIGN, false)) { $actions += array( 'assign' => array( 'icon' => 'icon-user', - 'action' => __('Assign Tasks') + 'action' => __('Assign') )); } @@ -71,15 +71,16 @@ if ($agent->hasPerm(Task::PERM_TRANSFER, false)) { $actions += array( 'transfer' => array( 'icon' => 'icon-share', - 'action' => __('Transfer Tasks') + 'action' => __('Transfer') )); } if ($agent->hasPerm(Task::PERM_DELETE, false)) { $actions += array( 'delete' => array( + 'class' => 'danger', 'icon' => 'icon-trash', - 'action' => __('Delete Tasks') + 'action' => __('Delete') )); } if ($actions) { @@ -98,7 +99,9 @@ if ($actions) { class="action-dropdown anchor-right"> <ul> <?php foreach ($actions as $a => $action) { ?> - <li> + <li <?php + if ($action['class']) + echo sprintf("class='%s'", $action['class']); ?> > <a class="no-pjax tasks-action" <?php if ($action['dialog']) diff --git a/include/staff/ticket-tasks.inc.php b/include/staff/ticket-tasks.inc.php index 824ebb1542b65ab9c49c47d9b445bbff3b2dd0db..9085ab239b3bf51c72d6141558dd53eddf4a4041 100644 --- a/include/staff/ticket-tasks.inc.php +++ b/include/staff/ticket-tasks.inc.php @@ -43,7 +43,7 @@ $showing = $pageNav->showing().' '._N('task', 'tasks', $count); Task::getAgentActions($thisstaff, array('morelabel' => __('Options'))); ?> </div> -<br/> +<div class="clear"></div> <div> <?php if ($count) { ?> diff --git a/include/staff/ticket-view.inc.php b/include/staff/ticket-view.inc.php index d037930f342b6b0f0d4cd495056ba48073d01bdc..609e21475dfd32ad265d5a6a3232a571450c00ed 100644 --- a/include/staff/ticket-view.inc.php +++ b/include/staff/ticket-view.inc.php @@ -107,15 +107,8 @@ if($ticket->isOverdue()) echo __('Change Owner'); ?></a></li> <?php } - if ($role->hasPerm(TicketModel::PERM_DELETE)) { - ?> - <li><a class="ticket-action" href="#tickets/<?php - echo $ticket->getId(); ?>/status/delete" - data-href="tickets.php"><i class="icon-trash"></i> <?php - echo __('Delete Ticket'); ?></a></li> - <?php - } - if($ticket->isOpen() && ($dept && $dept->isManager($thisstaff))) { + + if($ticket->isOpen() && ($dept && $dept->isManager($thisstaff))) { if($ticket->isAssigned()) { ?> <li><a class="confirm-action" id="ticket-release" href="#release"><i class="icon-user"></i> <?php @@ -159,7 +152,16 @@ if($ticket->isOverdue()) $ticket->getEmail()); ?></a></li> <?php } - }?> + } + if ($role->hasPerm(TicketModel::PERM_DELETE)) { + ?> + <li class="danger"><a class="ticket-action" href="#tickets/<?php + echo $ticket->getId(); ?>/status/delete" + data-href="tickets.php"><i class="icon-trash"></i> <?php + echo __('Delete Ticket'); ?></a></li> + <?php + } + ?> </ul> </div> </div>