show ticket layout is done,though some unpleasant bugs turned up

This commit is contained in:
Quitta 2013-08-02 17:03:26 +02:00
parent 28847b88f1
commit 47861c19d3
3 changed files with 147 additions and 199 deletions

View file

@ -71,7 +71,7 @@
<td><font color="#00CED1">Support Group: </font>
<span class="label label-info">
{if $ticket_forwardedGroupName eq "0"}
<i>{$public_sgroup}</i>
{$public_sgroup}
{else}
<a href="index.php?page=show_sgroup&id={$ticket_forwardedGroupId}"><font color="white">{$ticket_forwardedGroupName}</font></a>
{/if}
@ -79,11 +79,10 @@
</td>
</tr>
<tr>
<td><font color="#00CED1">Assigned To: </font>{if $ticket_assignedTo neq ""} <a href="index.php?page=show_user&id={$ticket_assignedTo}">{$ticket_assignedToText} {else}<i> {$not_assigned}</i> {/if}</td>
<td><font color="#00CED1">Assigned To: </font>{if $ticket_assignedTo neq ""} <a href="index.php?page=show_user&id={$ticket_assignedTo}">{$ticket_assignedToText} {else} {$not_assigned} {/if}</td>
<td></td>
<td></td>
</tr>
</td></tr>
</table>
</td></tr>
</table>
@ -101,7 +100,7 @@
<span class="label label-warning"><strong><i class="icon-star icon-white"></i>{if isset($isMod) and $isMod eq "TRUE"} <a href="index.php?page=show_user&id={$reply.authorExtern}"><font color="red"> {$reply.author}</font>{else} {$reply.author} {/if}</a></strong></span>
{/if}
</p>
<p><pre> {if $reply.hidden eq 1}<i>{/if}{$reply.replyContent}{if $reply.hidden eq 1}</i>{/if}</pre></p>
<p><pre> {if $reply.hidden eq 1}{/if}{$reply.replyContent}{if $reply.hidden eq 1}{/if}</pre></p>
</td>
</tr>
{/foreach}
@ -113,8 +112,147 @@
</td>
</tr>
{/if}
<tr>
<td>
<form id="reply" class="form-vertical" method="post" action="index.php">
<p><h4>{$t_reply}:</h4></p>
<table>
{if $ticket_status neq 3}
<tr>
<td><textarea cols="50" id="Content" name="Content"><br><br><br></textarea></td>
</tr>
{if isset($isMod) and $isMod eq "TRUE"}
<tr>
<td><input type="checkbox" name="hidden">Hide reply for user.</td>
</tr>
{/if}
{/if}
<tr>
<td>
{if isset($isMod) and $isMod eq "TRUE"}
<table>
<tr>
<td>
Change status to
<select name="ChangeStatus">
{foreach from=$statusList key=k item=v}
<option value="{$k}">{$v}</option>
{/foreach}
</select>
</td>
<td>
Change priority to
<select name="ChangePriority">
{foreach from=$ticket_priorities key=k item=v}
<option value="{$k}" {if $k eq $ticket_priority}selected="selected"{/if}>{$v}</option>
{/foreach}
</select>
</td>
</tr>
</table>
{/if}
</td>
</tr>
<tr>
<td>
<input type="hidden" name="function" value="reply_on_ticket">
<input type="hidden" name="ticket_id" value="{$ticket_id}">
<input type="submit" value="{$t_send}"/>
</td>
</tr>
</table>
</form>
</td>
</tr>
</table>
</td></tr>
{if isset($isMod) and $isMod eq "TRUE"}
<tr><td>
<table cellpadding="1" bgcolor="#00000060" border="2" width="100%">
<tr><td>
<table cellpadding="3" width="100%">
<tr>
<td>
<p>
Ticket Assigning:
{if $ticket_assignedTo eq 0}
<form id="assign_ticket" method="post" action="">
<input type="hidden" name="ticket_id" value="{$ticket_tId}">
<input type="hidden" name="action" value="assignTicket">
<input type="submit" value="Assign Ticket"/>
</form>
{else if $ticket_assignedTo eq $user_id}
<form id="assign_ticket" method="post" action="">
<input type="hidden" name="ticket_id" value="{$ticket_tId}">
<input type="hidden" name="action" value="unAssignTicket">
<input type="submit"value="Remove Assign"/>
</form>
{/if}
</p>
{if isset($ACTION_RESULT) and $ACTION_RESULT eq "SUCCESS_ASSIGNED"}
<p>
<font color="green">{$success_assigned}</font>
</p>
{else if isset($ACTION_RESULT) and $ACTION_RESULT eq "SUCCESS_UNASSIGNED"}
<p>
<font color="green">{$success_unassigned}</font>
</p>
{else if isset($ACTION_RESULT) and $ACTION_RESULT eq "TICKET_NOT_EXISTING"}
<p>
<font color="red">{$ticket_not_existing}</font>
</p>
{else if isset($ACTION_RESULT) and $ACTION_RESULT eq "ALREADY_ASSIGNED"}
<p>
<font color="red">{$ticket_already_assigned}</font>
</p>
{else if isset($ACTION_RESULT) and $ACTION_RESULT eq "NOT_ASSIGNED"}
<p>
<font color="red">{$ticket_not_assigned}</font>
</p>
{/if}
</td>
<td>
<p>
Forward to Group:
<form id="forward" method="post" action="" >
<select name="group">
<option></option>
{foreach from=$sGroups key=k item=v}
<option value="{$k}">{$v}</option>
{/foreach}
</select>
<input type="hidden" name="ticket_id" value="{$ticket_tId}">
<input type="hidden" name="action" value="forward">
<input type="submit"value="Forward"/>
</form>
</p>
{if isset($ACTION_RESULT) and $ACTION_RESULT eq "INVALID_SGROUP"}
<p>
<font color="red">{$invalid_sgroup}</font>
</p>
{else if isset($ACTION_RESULT) and $ACTION_RESULT eq "TICKET_NOT_EXISTING"}
<p>
<font color="red">{$ticket_not_existing}</font>
</p>
{else if isset($ACTION_RESULT) and $ACTION_RESULT eq "SUCCESS_FORWARDED"}
<p>
<font color="green">{$success_forwarded}</font>
</p>
{/if}
</td>
</tr>
</table>
</td></tr>
</table>
</td></tr>
<tr><td>
{/if}
</table>
</td></tr>
</table>
@ -128,199 +266,5 @@
</td></tr>
<table class="table table-bordered" >
<tbody>
{foreach from=$ticket_replies item=reply}
<tr>
<td>
<p>
<span class="label label-info"> {$reply.timestamp}</span>
{if $reply.permission eq '1'}
<span class="label label-success"><strong><i class="icon-user icon-white"></i>{if isset($isMod) and $isMod eq "TRUE"} <a href="index.php?page=show_user&id={$reply.authorExtern}"><font color="white"> {$reply.author}</font>{else} {$reply.author} {/if}</a></strong></span>
{else if $reply.permission gt '1'}
<span class="label label-warning"><strong><i class="icon-star icon-white"></i>{if isset($isMod) and $isMod eq "TRUE"} <a href="index.php?page=show_user&id={$reply.authorExtern}"><font color="white"> {$reply.author}</font>{else} {$reply.author} {/if}</a></strong></span>
{/if}
</p>
<p><pre{if $reply.permission gt '1'} {if $reply.hidden eq 0} style="background-color:rgb(248, 200, 200);"{else if $reply.hidden eq 1}style="background-color:rgb(207, 254, 255);"{/if}{/if}> {if $reply.hidden eq 1}<i>{/if}{$reply.replyContent}{if $reply.hidden eq 1}</i>{/if}</pre></p>
</td>
</tr>
{/foreach}
{if $ticket_status eq 3}
<tr>
<td>
<p><pre style="background-color:rgb(255, 230, 153);">Ticket is closed.</pre></p>
</td>
</tr>
{/if}
<tr>
<td>
<form id="reply" class="form-vertical" method="post" action="index.php">
{if $ticket_status neq 3}
<legend>{$t_reply}:</legend>
<div class="control-group">
<label class="control-label">{$t_fill}</label>
<div class="controls">
<div class="input-prepend">
<textarea rows="6" class="span12" id="Content" name="Content"></textarea>
</div>
</div>
</div>
{if isset($isMod) and $isMod eq "TRUE"}
<div class="control-group">
<label class="control-label">Options</label>
<div class="controls">
<div class="input-prepend">
<input type="checkbox" name="hidden">Hide reply for user.
</div>
</div>
</div>
{/if}
{/if}
{if isset($isMod) and $isMod eq "TRUE"}
<div class="control-group" style="display: inline-block;">
<label class="control-label">Change status to</label>
<div class="controls">
<select name="ChangeStatus">
{foreach from=$statusList key=k item=v}
<option value="{$k}">{$v}</option>
{/foreach}
</select>
</div>
</div>
<div class="control-group" style="display: inline-block; margin-left:10px;"">
<label class="control-label">Change priority to</label>
<div class="controls">
<select name="ChangePriority">
{foreach from=$ticket_priorities key=k item=v}
<option value="{$k}" {if $k eq $ticket_priority}selected="selected"{/if}>{$v}</option>
{/foreach}
</select>
</div>
</div>
{/if}
<input type="hidden" name="function" value="reply_on_ticket">
<input type="hidden" name="ticket_id" value="{$ticket_id}">
<div class="control-group">
<label class="control-label"></label>
<div class="controls">
<button type="submit" class="btn btn-primary" >{$t_send}</button>
</div>
</div>
</form>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div><!--/span-->
<div class="box span3">
<div class="box-header well" data-original-title="">
<h2><i class="icon-th"></i>Actions</h2>
<div class="box-icon">
<a href="#" class="btn btn-minimize btn-round"><i class="icon-chevron-up"></i></a>
<a href="#" class="btn btn-close btn-round"><i class="icon-remove"></i></a>
</div>
</div>
<div class="box-content">
<div class="row-fluid">
{if isset($isMod) and $isMod eq "TRUE"}
<legend style="margin-bottom:9px;">Ticket Assigning</legend>
{if $ticket_assignedTo eq 0}
<form id="assign_ticket" class="form-vertical" method="post" action="" style="margin:0px 0px 0px;">
<input type="hidden" name="ticket_id" value="{$ticket_tId}">
<input type="hidden" name="action" value="assignTicket">
<button type="submit" class="btn btn-primary" style="margin-bottom:9px;><i class="icon-flag icon-white"></i> Assign Ticket</button>
</form>
{else if $ticket_assignedTo eq $user_id}
<form id="assign_ticket" class="form-vertical" method="post" action="" style="margin:0px 0px 0px;">
<input type="hidden" name="ticket_id" value="{$ticket_tId}">
<input type="hidden" name="action" value="unAssignTicket">
<button type="submit" class="btn btn-warning" style="margin-bottom:9px;><i class="icon-remove icon-white"></i> Remove Assign</button>
</form>
{/if}
{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">
{$ticket_already_assigned}
</div>
{else if isset($ACTION_RESULT) and $ACTION_RESULT eq "NOT_ASSIGNED"}
<div class="alert alert-error">
{$ticket_not_assigned}
</div>
{/if}
<legend style="margin-bottom:9px;">Forward to Group</legend>
<form id="forward" class="form-vertical" method="post" action="" style="margin-bottom:9px;" >
<div class="control-group">
<div class="controls" >
<select name="group">
<option></option>
{foreach from=$sGroups key=k item=v}
<option value="{$k}">{$v}</option>
{/foreach}
</select>
</div>
</div>
<input type="hidden" name="ticket_id" value="{$ticket_tId}">
<input type="hidden" name="action" value="forward">
<div class="control-group">
<div class="controls">
<button type="submit" class="btn btn-primary" >Forward</button>
</div>
</div>
</form>
{if isset($ACTION_RESULT) and $ACTION_RESULT eq "INVALID_SGROUP"}
<div class="alert alert-error">
{$invalid_sgroup}
</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 "SUCCESS_FORWARDED"}
<div class="alert alert-success">
{$success_forwarded}
</div>
{/if}
{/if}
<legend style="margin-bottom:9px;">Other actions</legend>
<div class="btn-group">
<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>
{if isset($isMod) and $isMod eq "TRUE"}<li><a href="index.php?page=show_ticket_log&id={$ticket_tId}">Show Ticket Log</a></li>{/if}
<li><a href="index.php?page=createticket&user_id={$target_id}">Send Other Ticket</a></li>
<li class="divider"></li>
</ul>
</div>
</div>
</div>
</div>
</div><!--/row-->
{/block}

View file

@ -139,7 +139,7 @@
<tr>
<td>{$ticket.tId}</td>
<td><a href ="index.php?page=show_ticket&id={$ticket.tId}">{$ticket.title}</a></td>
<td class="center"><i>{$ticket.timestamp}</i></td>
<td class="center">{$ticket.timestamp}</td>
<td class="center">{$ticket.category}</td>
<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} <i class="icon-exclamation-sign icon-white"></i>{/if} {$ticket.statusText}</span></td>

View file

@ -31,6 +31,10 @@ ticket_not_existing = "That's an invalid ticket"
success_forwarded = "The ticket was forwarded successfully!"
public_sgroup = "Public"
not_assigned = "None"
success_assigned = "The ticket was successfully assigned!"
success_unassigned = "The ticket was successfully unassigned!"
ticket_not_existing = "That ticket doesn't exist!"
ticket_already_assigned = "That ticket is already assigned to someone!"
[show_user]