2013-07-14 14:38:36 +00:00
{ block name = content }
<div class="row-fluid sortable ui-sortable">
2014-09-03 10:22:14 +00:00
<div class="box col-md-9">
2014-09-09 02:02:15 +00:00
<div class="panel panel-default">
<div class="panel-heading" data-original-title="">
<span class="icon-tag"></span> Ticket Queue { $queue_view }
2013-07-14 14:38:36 +00:00
</div>
2014-09-09 02:02:15 +00:00
<div class="panel-body">
2013-07-14 14:38:36 +00:00
<div class="row-fluid">
<legend>Tickets</legend>
2014-09-03 01:08:57 +00:00
2013-07-23 19:50:39 +00:00
<div class="alert alert-info">
2013-08-05 23:00:17 +00:00
<form id="create_queue" class="form-vertical" method="post" action="index.php?page=show_queue&get=create" style="margin:0px 0px 0px;">
2013-07-23 19:50:39 +00:00
Show
<select style="width: 136px;" name="what">
2013-10-24 06:58:34 +00:00
<option value="all" { if isset ( $prev_created_what ) AND $prev_created_what eq "all" } selected="selected" { /if } >all</option>
<option value="waiting_for_support" { if isset ( $prev_created_what ) AND $prev_created_what eq "waiting_for_support" } selected="selected" { /if } >waiting for support</option>
<option value="waiting_for_users" { if isset ( $prev_created_what ) AND $prev_created_what eq "waiting_for_users" } selected="selected" { /if } >waiting for user</option>
<option value="closed" { if isset ( $prev_created_what ) AND $prev_created_what eq "closed" } selected="selected" { /if } >closed</option>
2013-07-23 19:50:39 +00:00
</select>
tickets
<select style="width: 110px;" name="how">
2013-10-24 06:58:34 +00:00
<option value="assigned" { if isset ( $prev_created_how ) AND $prev_created_how eq "assigned" } selected="selected" { /if } >assigned</option>
<option value="not_assigned" { if isset ( $prev_created_how ) AND $prev_created_how eq "not_assigned" } selected="selected" { /if } >not assigned</option>
<option value="both" { if isset ( $prev_created_how ) AND $prev_created_how eq "both" } selected="selected" { /if } >both</option>
2013-07-23 19:50:39 +00:00
</select>
to
<select style="width: 140px;" name="who" onchange="aimedforwhochanged(this.value);">
2013-10-24 06:58:34 +00:00
<option value="user" { if isset ( $prev_created_who ) AND $prev_created_who eq "user" } selected="selected" { /if } >user</option>
<option value="support_group" { if isset ( $prev_created_who ) AND $prev_created_who eq "support_group" } selected="selected" { /if } >support group</option>
2013-07-23 19:50:39 +00:00
</select>
2013-10-24 06:58:34 +00:00
<span id="userList" { if isset ( $prev_created_who ) AND $prev_created_who eq "user" } style="display:inline;" { else if isset ( $prev_created_who ) AND $prev_created_who eq "support_group" } style="display:none;" { else } style="display:inline;" { /if } >
2013-07-23 21:38:06 +00:00
<select style="width: 140px;" name="userid">
{ foreach from = $teamlist item = member }
2013-08-18 01:39:35 +00:00
<option value=" { $member.tUserId } " { if isset ( $prev_created_userid ) } { if $prev_created_userid eq $member.tUserId } selected="selected" { /if } { else if $user_id eq $member.tUserId } selected="selected" { /if } > { $member.name } </option>
2013-07-23 21:38:06 +00:00
{ /foreach }
2013-07-23 19:50:39 +00:00
</select>
</span>
2013-10-24 06:58:34 +00:00
<span id="supportGroupList" { if isset ( $prev_created_who ) AND $prev_created_who eq "user" } style="display:none;" { else if isset ( $prev_created_who ) AND $prev_created_who eq "support_group" } style="display:inline;" { else } style="display:none;" { /if } >
2013-07-23 21:38:06 +00:00
<select style="width: 140px;" name="groupid">
{ foreach from = $grouplist item = group }
2013-10-24 08:12:09 +00:00
<option value=" { $group.sGroupId } " { if isset ( $prev_created_groupid ) AND $prev_created_groupid eq $group.sGroupId } selected="selected" { /if } > { $group.name } </option>
2013-07-23 21:38:06 +00:00
{ /foreach }
2013-07-23 19:50:39 +00:00
</select>
</span>
2013-07-23 21:38:06 +00:00
<input type="hidden" name="action" value="create_queue">
2014-09-09 02:02:15 +00:00
<button type="submit" class="btn btn-primary" style="bottom:4px; position:relative;" ><span class="icon-tag icon-white"></span> View</button>
2013-07-23 21:38:06 +00:00
</form>
2014-09-03 01:08:57 +00:00
2013-07-23 19:50:39 +00:00
</div>
2013-07-23 21:38:06 +00:00
2014-09-03 01:08:57 +00:00
2013-07-21 01:49:31 +00:00
{ if isset ( $ACTION_RESULT ) and $ACTION_RESULT eq "SUCCESS_ASSIGNED" }
<div class="alert alert-success">
{ $success_assigned }
</div>
{ else if isset ( $ACTION_RESULT ) and $ACTION_RESULT eq "SUCCESS_UNASSIGNED" }
<div class="alert alert-success">
{ $success_unassigned }
</div>
{ else if isset ( $ACTION_RESULT ) and $ACTION_RESULT eq "TICKET_NOT_EXISTING" }
<div class="alert alert-error">
{ $ticket_not_existing }
</div>
{ else if isset ( $ACTION_RESULT ) and $ACTION_RESULT eq "ALREADY_ASSIGNED" }
<div class="alert alert-error">
2013-07-21 13:38:22 +00:00
{ $ticket_already_assigned }
2013-07-21 01:49:31 +00:00
</div>
{ else if isset ( $ACTION_RESULT ) and $ACTION_RESULT eq "NOT_ASSIGNED" }
<div class="alert alert-error">
2013-07-21 13:38:22 +00:00
{ $ticket_not_assigned }
2013-07-21 01:49:31 +00:00
</div>
{ /if }
2014-09-03 01:08:57 +00:00
2013-08-05 19:12:58 +00:00
<table class="table table-striped table-bordered">
2013-07-14 14:38:36 +00:00
<thead>
<tr>
<th>ID</th>
<th>Title</th>
2013-07-20 12:45:05 +00:00
<th>Assigned</th>
2013-07-14 14:38:36 +00:00
<th>Timestamp</th>
<th>Category</th>
<th>Status</th>
2013-07-22 16:22:21 +00:00
<th>SupportGroup</th>
2013-07-21 01:49:31 +00:00
<th>Actions</th>
2013-07-14 14:38:36 +00:00
</tr>
2014-09-03 01:08:57 +00:00
</thead>
2013-07-14 14:38:36 +00:00
<tbody>
{ foreach from = $tickets item = ticket }
<tr>
<td> { $ticket.tId } </td>
<td><a href ="index.php?page=show_ticket&id= { $ticket.tId } "> { $ticket.title } </a></td>
2013-07-21 01:49:31 +00:00
<td> { if $ticket.assignedText neq "" } <a href="index.php?page=show_user&id= { $ticket.assigned } "> { $ticket.assignedText } { else } <i> { $not_assigned } </i> { /if } </td>
2013-07-21 15:56:24 +00:00
<td class="center"><span title=" { $ticket.timestamp_elapsed } " data-rel="tooltip" data-placement="right"> { $ticket.timestamp } </span></td>
2013-07-14 14:38:36 +00:00
<td class="center"> { $ticket.category } </td>
2014-09-09 02:02:15 +00:00
<td class="center"><span class="label { if $ticket.status eq 0 } label-success { else if $ticket.status eq 1 } label-warning { else if $ticket.status eq 2 } label-important { /if } "> { if $ticket.status eq 0 } <span class="icon-exclamation-sign icon-white"></span> { /if } { $ticket.statusText } </span></td>
2013-07-22 16:22:21 +00:00
<td class="center">
2014-09-03 01:08:57 +00:00
2013-07-22 16:22:21 +00:00
{ if $ticket.forwardedGroupName eq "0" }
<i> { $public_sgroup } </i>
{ else }
2014-09-03 01:08:57 +00:00
<span class="label label-info"><a href="index.php?page=show_sgroup&id= { $ticket.forwardedGroupId } "><font color="white"> { $ticket.forwardedGroupName } </font></a></span>
2013-07-22 16:22:21 +00:00
{ /if }
2014-09-03 01:08:57 +00:00
</td>
2013-07-21 01:49:31 +00:00
<td>
{ if $ticket.assigned eq 0 }
2013-08-18 01:39:35 +00:00
<form id="assign_ticket" class="form-vertical" method="post" action=" { $getURL } " style="margin:0px 0px 0px;">
2013-07-21 01:49:31 +00:00
<input type="hidden" name="ticket_id" value=" { $ticket.tId } ">
<input type="hidden" name="action" value="assignTicket">
2014-09-09 02:02:15 +00:00
<button type="submit" class="btn btn-primary" ><span class="icon-flag icon-white"></span> Assign Ticket</button>
2013-07-21 01:49:31 +00:00
</form>
2013-07-21 15:56:24 +00:00
{ else if $ticket.assigned eq $user_id }
2013-08-18 01:39:35 +00:00
<form id="assign_ticket" class="form-vertical" method="post" action=" { $getURL } " style="margin:0px 0px 0px;">
2013-07-21 01:49:31 +00:00
<input type="hidden" name="ticket_id" value=" { $ticket.tId } ">
<input type="hidden" name="action" value="unAssignTicket">
2014-09-09 02:02:15 +00:00
<button type="submit" class="btn btn-warning" ><span class="icon-remove icon-white"></span> Remove Assign</button>
2013-07-21 01:49:31 +00:00
</form>
{ /if }
</td>
2013-07-14 14:38:36 +00:00
</tr>
{ /foreach }
2014-09-03 01:08:57 +00:00
2013-07-14 14:38:36 +00:00
</tbody>
2013-08-05 23:00:17 +00:00
</table>
2014-09-03 01:08:57 +00:00
2013-08-05 23:00:17 +00:00
<div style="width: 300px; margin:0px auto;">
<ul class="pagination">
<li><a href=" { $pagination_base_link } &pagenum=1">«</a></li>
{ foreach from = $links item = link }
<li { if $link = = $currentPage } class="active" { /if } ><a href=" { $pagination_base_link } &pagenum= { $link } "> { $link } </a></li>
{ /foreach }
<li><a href=" { $pagination_base_link } &pagenum= { $lastPage } ">»</a></li>
</ul>
</div>
2013-07-14 14:38:36 +00:00
</div>
</div>
2014-09-03 10:22:14 +00:00
</div>
2013-07-14 14:38:36 +00:00
</div><!--/span-->
2014-09-03 01:08:57 +00:00
2014-09-03 10:22:14 +00:00
<div class="box col-md-3">
2014-09-09 02:02:15 +00:00
<div class="panel panel-default">
<div class="panel-heading" data-original-title="">
<span class="icon-th"></span>Actions
2013-07-14 14:38:36 +00:00
</div>
2014-09-09 02:02:15 +00:00
<div class="panel-body">
2013-07-14 14:38:36 +00:00
<div class="row-fluid">
2013-07-23 19:50:39 +00:00
<div class="btn-group">
2013-07-14 14:38:36 +00:00
<button class="btn btn-primary btn-large dropdown-toggle" data-toggle="dropdown">Actions<span class="caret"></span></button>
<ul class="dropdown-menu">
<li class="divider"></li>
2013-07-23 21:38:06 +00:00
<li><a href="index.php?page=show_queue&get=todo">Todo tickets</a></li>
<li><a href="index.php?page=show_queue&get=all">All tickets</a></li>
2013-07-14 14:38:36 +00:00
<li><a href="index.php?page=show_queue&get=all_open">All open tickets</a></li>
<li><a href="index.php?page=show_queue&get=archive">Ticket Archive</a></li>
2013-07-19 21:36:34 +00:00
<li><a href="index.php?page=show_queue&get=not_assigned">Not Assigned Tickets</a></li>
2013-07-14 14:38:36 +00:00
<li class="divider"></li>
</ul>
</div>
2014-09-03 01:08:57 +00:00
</div>
2013-07-14 14:38:36 +00:00
</div>
2014-09-03 10:22:14 +00:00
</div>
2013-07-14 14:38:36 +00:00
</div><!--/span-->
</div><!--/row-->
2013-07-23 19:50:39 +00:00
<!----- /javascript for this page -->
<script type="text/javascript">
2014-09-03 01:08:57 +00:00
function aimedforwhochanged(value)
2013-07-23 19:50:39 +00:00
{
2014-09-03 01:08:57 +00:00
if (value == "user")
2013-07-23 19:50:39 +00:00
{
//hide the supportGroupList span
var elem = document.getElementById("supportGroupList");
elem.style.display="none";
var elem2 = document.getElementById("userList");
elem2.style.display="inline";
}
else if(value == "support_group")
{
//hide the userList span
var elem = document.getElementById("supportGroupList");
elem.style.display= "inline";
var elem2 = document.getElementById("userList");
elem2.style.display="none";
}
}
</script>
2013-07-14 14:38:36 +00:00
{ /block }
2014-09-03 01:08:57 +00:00