Linux multi-monitor fullscreen support
[ryzomcore.git] / web / public_php / ams / templates / show_queue.tpl
blob96dd955508ecd24017b53018dc3e956cbe5f4482
1 {block name=content}
2 <div class="row-fluid sortable ui-sortable">
3     <div class="box col-md-9">
4         <div class="panel panel-default">
5         <div class="panel-heading" data-original-title="">
6             <span class="icon-tag"></span> Ticket Queue {$queue_view}
7         </div>
8         <div class="panel-body">
9             <div class="row-fluid">
10                 <legend>Tickets</legend>
12                 <div class="alert alert-info">
13                     <form id="create_queue" class="form-vertical" method="post" action="index.php?page=show_queue&get=create" style="margin:0px 0px 0px;">
14                     Show
15                     <select style="width: 136px;" name="what">
16                         <option value="all" {if isset($prev_created_what) AND $prev_created_what eq "all"}selected="selected"{/if}>all</option>
17                         <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>
18                         <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>
19                         <option value="closed" {if isset($prev_created_what) AND $prev_created_what eq "closed"}selected="selected"{/if}>closed</option>
20                     </select>
21                     tickets
22                     <select style="width: 110px;" name="how">
23                         <option value="assigned" {if isset($prev_created_how) AND $prev_created_how eq "assigned"}selected="selected"{/if}>assigned</option>
24                         <option value="not_assigned" {if isset($prev_created_how) AND $prev_created_how eq "not_assigned"}selected="selected"{/if}>not assigned</option>
25                         <option value="both" {if isset($prev_created_how) AND $prev_created_how eq "both"}selected="selected"{/if}>both</option>
26                     </select>
27                     to
28                     <select style="width: 140px;" name="who" onchange="aimedforwhochanged(this.value);">
29                         <option value="user" {if isset($prev_created_who) AND $prev_created_who eq "user"}selected="selected"{/if}>user</option>
30                         <option value="support_group" {if isset($prev_created_who) AND $prev_created_who eq "support_group"}selected="selected"{/if}>support group</option>
31                     </select>
32                     <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}>
33                     <select style="width: 140px;" name="userid">
34                         {foreach from=$teamlist item=member}
35                             <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>
36                         {/foreach}
37                     </select>
38                     </span>
39                     <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}>
40                     <select style="width: 140px;" name="groupid">
41                         {foreach from=$grouplist item=group}
42                             <option value="{$group.sGroupId}" {if isset($prev_created_groupid) AND $prev_created_groupid eq $group.sGroupId}selected="selected"{/if}>{$group.name}</option>
43                         {/foreach}
44                     </select>
45                     </span>
46                     <input type="hidden" name="action" value="create_queue">
47                     <button type="submit" class="btn btn-primary" style="bottom:4px; position:relative;"  ><span class="icon-tag icon-white"></span> View</button>
48                     </form>
51                 </div>
54                 {if isset($ACTION_RESULT) and $ACTION_RESULT eq "SUCCESS_ASSIGNED"}
55                 <div class="alert alert-success">
56                         {$success_assigned}
57                 </div>
58                 {else if isset($ACTION_RESULT) and $ACTION_RESULT eq "SUCCESS_UNASSIGNED"}
59                 <div class="alert alert-success">
60                         {$success_unassigned}
61                 </div>
62                 {else if isset($ACTION_RESULT) and $ACTION_RESULT eq "TICKET_NOT_EXISTING"}
63                 <div class="alert alert-error">
64                         {$ticket_not_existing}
65                 </div>
66                 {else if isset($ACTION_RESULT) and $ACTION_RESULT eq "ALREADY_ASSIGNED"}
67                 <div class="alert alert-error">
68                         {$ticket_already_assigned}
69                 </div>
70                 {else if isset($ACTION_RESULT) and $ACTION_RESULT eq "NOT_ASSIGNED"}
71                 <div class="alert alert-error">
72                         {$ticket_not_assigned}
73                 </div>
74                 {/if}
76                 <table class="table table-striped table-bordered">
77                     <thead>
78                             <tr>
79                                     <th>ID</th>
80                                     <th>Title</th>
81                                     <th>Assigned</th>
82                                     <th>Timestamp</th>
83                                     <th>Category</th>
84                                     <th>Status</th>
85                                     <th>SupportGroup</th>
86                                     <th>Actions</th>
87                             </tr>
88                     </thead>
89                     <tbody>
90                           {foreach from=$tickets item=ticket}
91                           <tr>
92                                 <td>{$ticket.tId}</td>
93                                 <td><a href ="index.php?page=show_ticket&id={$ticket.tId}">{$ticket.title}</a></td>
94                                 <td>{if $ticket.assignedText neq ""} <a href="index.php?page=show_user&id={$ticket.assigned}">{$ticket.assignedText} {else}<i> {$not_assigned}</i> {/if}</td>
95                                 <td class="center"><span title="{$ticket.timestamp_elapsed}" data-rel="tooltip"  data-placement="right">{$ticket.timestamp}</span></td>
96                                 <td class="center">{$ticket.category}</td>
97                                 <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>
98                                 <td class="center">
100                                     {if $ticket.forwardedGroupName eq "0"}
101                                         <i>{$public_sgroup}</i>
102                                     {else}
103                                          <span class="label label-info"><a href="index.php?page=show_sgroup&id={$ticket.forwardedGroupId}"><font color="white">{$ticket.forwardedGroupName}</font></a></span>
104                                     {/if}
106                                 </td>
107                                 <td>
108                                     {if $ticket.assigned eq 0}
109                                         <form id="assign_ticket" class="form-vertical" method="post" action="{$getURL}" style="margin:0px 0px 0px;">
110                                             <input type="hidden" name="ticket_id" value="{$ticket.tId}">
111                                             <input type="hidden" name="action" value="assignTicket">
112                                             <button type="submit" class="btn btn-primary" ><span class="icon-flag icon-white"></span> Assign Ticket</button>
113                                         </form>
114                                     {else if $ticket.assigned eq $user_id}
115                                         <form id="assign_ticket" class="form-vertical" method="post" action="{$getURL}" style="margin:0px 0px 0px;">
116                                             <input type="hidden" name="ticket_id" value="{$ticket.tId}">
117                                             <input type="hidden" name="action" value="unAssignTicket">
118                                             <button type="submit" class="btn btn-warning" ><span class="icon-remove icon-white"></span> Remove Assign</button>
119                                         </form>
120                                     {/if}
121                                 </td>
122                           </tr>
123                           {/foreach}
125                     </tbody>
126             </table>
128             <div style="width: 300px; margin:0px auto;">
129                 <ul class="pagination">
130                     <li><a href="{$pagination_base_link}&pagenum=1">&laquo;</a></li>
131                     {foreach from=$links item=link}
132                     <li {if $link == $currentPage}class="active"{/if}><a href="{$pagination_base_link}&pagenum={$link}">{$link}</a></li>
133                     {/foreach}
134                     <li><a href="{$pagination_base_link}&pagenum={$lastPage}">&raquo;</a></li>
135                 </ul>
136             </div>
137             </div>
138         </div>
139         </div>
140     </div><!--/span-->
142     <div class="box col-md-3">
143         <div class="panel panel-default">
144         <div class="panel-heading" data-original-title="">
145             <span class="icon-th"></span>Actions
146         </div>
147         <div class="panel-body">
148             <div class="row-fluid">
149                 <div class="btn-group">
150                 <button class="btn btn-primary btn-large dropdown-toggle" data-toggle="dropdown">Actions<span class="caret"></span></button>
151                 <ul class="dropdown-menu">
152                     <li class="divider"></li>
153                     <li><a href="index.php?page=show_queue&get=todo">Todo tickets</a></li>
154                     <li><a href="index.php?page=show_queue&get=all">All tickets</a></li>
155                     <li><a href="index.php?page=show_queue&get=all_open">All open tickets</a></li>
156                     <li><a href="index.php?page=show_queue&get=archive">Ticket Archive</a></li>
157                     <li><a href="index.php?page=show_queue&get=not_assigned">Not Assigned Tickets</a></li>
158                     <li class="divider"></li>
159                 </ul>
160               </div>
161             </div>
162         </div>
163                 </div>
164     </div><!--/span-->
165 </div><!--/row-->
170 <!----- /javascript for this page -->
171 <script type="text/javascript">
172     function aimedforwhochanged(value)
175 if (value == "user")
176     {
177     //hide the supportGroupList span
178     var elem = document.getElementById("supportGroupList");
179     elem.style.display="none";
180     var elem2 = document.getElementById("userList");
181     elem2.style.display="inline";
182     }
183 else if(value == "support_group")
184     {
185     //hide the userList span
186     var elem = document.getElementById("supportGroupList");
187     elem.style.display= "inline";
188     var elem2 = document.getElementById("userList");
189     elem2.style.display="none";
190     }
192 </script>
193 {/block}