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 39ca662593
commit 22b1eaec86
3 changed files with 147 additions and 199 deletions

View file

@ -71,7 +71,7 @@
<td><font color="#00CED1">Support Group: </font> <td><font color="#00CED1">Support Group: </font>
<span class="label label-info"> <span class="label label-info">
{if $ticket_forwardedGroupName eq "0"} {if $ticket_forwardedGroupName eq "0"}
<i>{$public_sgroup}</i> {$public_sgroup}
{else} {else}
<a href="index.php?page=show_sgroup&id={$ticket_forwardedGroupId}"><font color="white">{$ticket_forwardedGroupName}</font></a> <a href="index.php?page=show_sgroup&id={$ticket_forwardedGroupId}"><font color="white">{$ticket_forwardedGroupName}</font></a>
{/if} {/if}
@ -79,11 +79,10 @@
</td> </td>
</tr> </tr>
<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>
<td></td> <td></td>
</tr> </tr>
</td></tr>
</table> </table>
</td></tr> </td></tr>
</table> </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> <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} {/if}
</p> </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> </td>
</tr> </tr>
{/foreach} {/foreach}
@ -113,214 +112,159 @@
</td> </td>
</tr> </tr>
{/if} {/if}
</table>
</td></tr>
</table>
</td></tr>
</table>
</td></tr>
</table>
</td></tr>
</table>
</td>
</tr>
</table>
</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> <tr>
<td> <td>
<form id="reply" class="form-vertical" method="post" action="index.php"> <form id="reply" class="form-vertical" method="post" action="index.php">
<p><h4>{$t_reply}:</h4></p>
<table>
{if $ticket_status neq 3} {if $ticket_status neq 3}
<legend>{$t_reply}:</legend> <tr>
<div class="control-group"> <td><textarea cols="50" id="Content" name="Content"><br><br><br></textarea></td>
<label class="control-label">{$t_fill}</label> </tr>
<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"} {if isset($isMod) and $isMod eq "TRUE"}
<div class="control-group"> <tr>
<label class="control-label">Options</label> <td><input type="checkbox" name="hidden">Hide reply for user.</td>
<div class="controls"> </tr>
<div class="input-prepend">
<input type="checkbox" name="hidden">Hide reply for user.
</div>
</div>
</div>
{/if} {/if}
{/if} {/if}
<tr>
<td>
{if isset($isMod) and $isMod eq "TRUE"} {if isset($isMod) and $isMod eq "TRUE"}
<div class="control-group" style="display: inline-block;"> <table>
<label class="control-label">Change status to</label> <tr>
<div class="controls"> <td>
Change status to
<select name="ChangeStatus"> <select name="ChangeStatus">
{foreach from=$statusList key=k item=v} {foreach from=$statusList key=k item=v}
<option value="{$k}">{$v}</option> <option value="{$k}">{$v}</option>
{/foreach} {/foreach}
</select> </select>
</div> </td>
</div> <td>
<div class="control-group" style="display: inline-block; margin-left:10px;""> Change priority to
<label class="control-label">Change priority to</label>
<div class="controls">
<select name="ChangePriority"> <select name="ChangePriority">
{foreach from=$ticket_priorities key=k item=v} {foreach from=$ticket_priorities key=k item=v}
<option value="{$k}" {if $k eq $ticket_priority}selected="selected"{/if}>{$v}</option> <option value="{$k}" {if $k eq $ticket_priority}selected="selected"{/if}>{$v}</option>
{/foreach} {/foreach}
</select> </select>
</div> </td>
</div> </tr>
</table>
{/if} {/if}
</td>
</tr>
<tr>
<td>
<input type="hidden" name="function" value="reply_on_ticket"> <input type="hidden" name="function" value="reply_on_ticket">
<input type="hidden" name="ticket_id" value="{$ticket_id}"> <input type="hidden" name="ticket_id" value="{$ticket_id}">
<div class="control-group"> <input type="submit" value="{$t_send}"/>
<label class="control-label"></label> </td>
<div class="controls"> </tr>
<button type="submit" class="btn btn-primary" >{$t_send}</button> </table>
</div>
</div>
</form> </form>
</td> </td>
</tr> </tr>
</tbody>
</table> </table>
</div> </td></tr>
</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"} {if isset($isMod) and $isMod eq "TRUE"}
<tr><td>
<legend style="margin-bottom:9px;">Ticket Assigning</legend> <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} {if $ticket_assignedTo eq 0}
<form id="assign_ticket" class="form-vertical" method="post" action="" style="margin:0px 0px 0px;"> <form id="assign_ticket" method="post" action="">
<input type="hidden" name="ticket_id" value="{$ticket_tId}"> <input type="hidden" name="ticket_id" value="{$ticket_tId}">
<input type="hidden" name="action" value="assignTicket"> <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> <input type="submit" value="Assign Ticket"/>
</form> </form>
{else if $ticket_assignedTo eq $user_id} {else if $ticket_assignedTo eq $user_id}
<form id="assign_ticket" class="form-vertical" method="post" action="" style="margin:0px 0px 0px;"> <form id="assign_ticket" method="post" action="">
<input type="hidden" name="ticket_id" value="{$ticket_tId}"> <input type="hidden" name="ticket_id" value="{$ticket_tId}">
<input type="hidden" name="action" value="unAssignTicket"> <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> <input type="submit"value="Remove Assign"/>
</form> </form>
{/if} {/if}
</p>
{if isset($ACTION_RESULT) and $ACTION_RESULT eq "SUCCESS_ASSIGNED"} {if isset($ACTION_RESULT) and $ACTION_RESULT eq "SUCCESS_ASSIGNED"}
<div class="alert alert-success"> <p>
{$success_assigned} <font color="green">{$success_assigned}</font>
</div> </p>
{else if isset($ACTION_RESULT) and $ACTION_RESULT eq "SUCCESS_UNASSIGNED"} {else if isset($ACTION_RESULT) and $ACTION_RESULT eq "SUCCESS_UNASSIGNED"}
<div class="alert alert-success"> <p>
{$success_unassigned} <font color="green">{$success_unassigned}</font>
</div> </p>
{else if isset($ACTION_RESULT) and $ACTION_RESULT eq "TICKET_NOT_EXISTING"} {else if isset($ACTION_RESULT) and $ACTION_RESULT eq "TICKET_NOT_EXISTING"}
<div class="alert alert-error"> <p>
{$ticket_not_existing} <font color="red">{$ticket_not_existing}</font>
</div> </p>
{else if isset($ACTION_RESULT) and $ACTION_RESULT eq "ALREADY_ASSIGNED"} {else if isset($ACTION_RESULT) and $ACTION_RESULT eq "ALREADY_ASSIGNED"}
<div class="alert alert-error"> <p>
{$ticket_already_assigned} <font color="red">{$ticket_already_assigned}</font>
</div> </p>
{else if isset($ACTION_RESULT) and $ACTION_RESULT eq "NOT_ASSIGNED"} {else if isset($ACTION_RESULT) and $ACTION_RESULT eq "NOT_ASSIGNED"}
<div class="alert alert-error"> <p>
{$ticket_not_assigned} <font color="red">{$ticket_not_assigned}</font>
</div> </p>
{/if} {/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"> </td>
<div class="controls" > <td>
<p>
Forward to Group:
<form id="forward" method="post" action="" >
<select name="group"> <select name="group">
<option></option> <option></option>
{foreach from=$sGroups key=k item=v} {foreach from=$sGroups key=k item=v}
<option value="{$k}">{$v}</option> <option value="{$k}">{$v}</option>
{/foreach} {/foreach}
</select> </select>
</div>
</div>
<input type="hidden" name="ticket_id" value="{$ticket_tId}"> <input type="hidden" name="ticket_id" value="{$ticket_tId}">
<input type="hidden" name="action" value="forward"> <input type="hidden" name="action" value="forward">
<div class="control-group"> <input type="submit"value="Forward"/>
<div class="controls">
<button type="submit" class="btn btn-primary" >Forward</button>
</div>
</div>
</form> </form>
</p>
{if isset($ACTION_RESULT) and $ACTION_RESULT eq "INVALID_SGROUP"} {if isset($ACTION_RESULT) and $ACTION_RESULT eq "INVALID_SGROUP"}
<div class="alert alert-error"> <p>
{$invalid_sgroup} <font color="red">{$invalid_sgroup}</font>
</div> </p>
{else if isset($ACTION_RESULT) and $ACTION_RESULT eq "TICKET_NOT_EXISTING"} {else if isset($ACTION_RESULT) and $ACTION_RESULT eq "TICKET_NOT_EXISTING"}
<div class="alert alert-error"> <p>
{$ticket_not_existing} <font color="red">{$ticket_not_existing}</font>
</div> </p>
{else if isset($ACTION_RESULT) and $ACTION_RESULT eq "SUCCESS_FORWARDED"} {else if isset($ACTION_RESULT) and $ACTION_RESULT eq "SUCCESS_FORWARDED"}
<div class="alert alert-success"> <p>
{$success_forwarded} <font color="green">{$success_forwarded}</font>
</div> </p>
{/if} {/if}
</td>
</tr>
</table>
</td></tr>
</table>
</td></tr>
<tr><td>
{/if} {/if}
<legend style="margin-bottom:9px;">Other actions</legend>
<div class="btn-group"> </table>
<button class="btn btn-primary btn-large dropdown-toggle" data-toggle="dropdown">Actions<span class="caret"></span></button> </td></tr>
<ul class="dropdown-menu"> </table>
<li class="divider"></li> </td></tr>
{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} </table>
<li><a href="index.php?page=createticket&user_id={$target_id}">Send Other Ticket</a></li> </td></tr>
<li class="divider"></li> </table>
</ul> </td>
</div> </tr>
</div> </table>
</div>
</div> </td></tr>
</div><!--/row-->
{/block} {/block}

View file

@ -139,7 +139,7 @@
<tr> <tr>
<td>{$ticket.tId}</td> <td>{$ticket.tId}</td>
<td><a href ="index.php?page=show_ticket&id={$ticket.tId}">{$ticket.title}</a></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">{$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> <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!" success_forwarded = "The ticket was forwarded successfully!"
public_sgroup = "Public" public_sgroup = "Public"
not_assigned = "None" 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] [show_user]