Jump to content

How to change Ticket Reply List Order for the Mobile Edition??


Recommended Posts

Hello,

I'm looking for a way to change Ticket Reply List Order for the Mobile Edition.

 

I tried to add the code below to the viewticket.tpl, but it's not fully work.

 

{php}

if (is_array($this->_tpl_vars['replies'])) {

$this->assign(replies,array_reverse($this->_tpl_vars['replies'],true));

}

{/php}

 

It reversed the order list (newest first), but the first message/reply is still showing at the top (not sure why?). Do you know how to make this work fully?

 

This is the viewticket.tpl of mobile edition:

{include file='header.tpl'}

 

<a name="top"></a>

 

<table bgcolor="#ffffff" cellspacing="1">

<tr><td width="60">Department:</td><td>{$department}</td></tr>

<tr><td>Date:</td><td>{$date}</td></tr>

<tr><td>Subject:</td><td>{$subject}</td></tr>

<tr><td>Ticket #:</td><td>#{$tid}</td></tr>

<tr><td>Status:</td><td>{$status}</td></tr>

<tr><td>Urgency:</td><td>{$urgency}</td></tr>

</table>

 

<br>

 

<p align="center">Change Status to: <a href="{$smarty.server.PHP_SELF}?id={$id}&action=open">Open</a> |

<a href="{$smarty.server.PHP_SELF}?id={$id}&action=answered">Answered</a> |

<a href="{$smarty.server.PHP_SELF}?id={$id}&action=customerreply">Customer-Reply</a> |

<a href="{$smarty.server.PHP_SELF}?id={$id}&action=onhold">On Hold</a> |

<a href="{$smarty.server.PHP_SELF}?id={$id}&action=inprogress">In Progress</a> |

<a href="{$smarty.server.PHP_SELF}?id={$id}&action=closed">Closed</a></p>

 

<div align="right"><a href="#bottom" style="text-decoration:none;">Jump to Bottom</a></div>

 

<table cellspacing=1 cellpadding=3 width="100%" bgcolor=#cccccc>

<tr><td bgcolor=#f4f4f4 valign=top>{$user}</td><td bgcolor=#f4f4f4 align=right>{$date}</td></tr>

<tr><td bgcolor=#ffffff valign=top colspan=2>{$message}</td></tr>

{foreach key=num item=reply from=$replies}

<tr><td bgcolor=#f4f4f4 valign=top>{$reply.user}</td><td bgcolor=#f4f4f4 align=right>{$reply.date}</td></tr>

<tr><td bgcolor=#ffffff valign=top colspan=2>{$reply.message}</td></tr>

{/foreach}

</table>

 

<p><b>Reply</b></p>

<form method="post" action="{$smarty.server.PHP_SELF}?id={$id}">

<p align="center"><textarea name="message" rows="8" cols="50">

 

 

{$signature}</textarea>

<select name="postaction">

<option value="return">Set to Answered & Return to Ticket View</option>

<option value="onhold">Set to On Hold & Return to Ticket View</option>

<option value="inprogress">Set to In Progress & Return to Ticket View</option>

<option value="close">Close & Return to Active Ticket List</option>

<option value="note">Add as a Private Ticket Note</option>

</select><br />

<input type="submit" value="Add Response" name="postreply"></p>

</form>

 

<a name="bottom"></a>

 

<p align="center"><a href="ticketnotes.php?id={$id}">Ticket Notes ({$numticketnotes})</a> | <a href="ticketoptions.php?id={$id}">Ticket Options</a> | <a href="#top">Jump to Top</a></p>

 

{include file='footer.tpl'}

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated