Jump to content

Closed Ticket Chart - Pagination only for this group and not the rest


Recommended Posts

Hi everyone.


I am currently working on something where the submitticketlist.tpl shows a seperate table for the "closed tickets" which I have working.... however .... the pagenation and the records limit continue to work for the entire page - even the pulled out closed ticket page. Does anyone know how I would force the pagenation and records limit to "ONLY" work for the closed table ?


Here is the closed table portion with the pagenation included even though it works for entire page.


<div class="table_title">

<h3>Closed Tickets</h3>



<table class="zebra-striped">



<th><a href="supporttickets.php?orderby=date">{$LANG.supportticketsdate}</a></th>

<th><a href="supporttickets.php?orderby=dept">{$LANG.supportticketsdepartment}</a></th>

<th><a href="supporttickets.php?orderby=subject">{$LANG.supportticketssubject}</a></th>

<th><a href="supporttickets.php?orderby=status">{$LANG.supportticketsstatus}</a></th>

<th class="headerSortdesc"><a href="supporttickets.php?orderby=lastreply">{$LANG.supportticketsticketlastupdated}</a></th>

<th> </th>




{foreach from=$tickets item=ticket}

<tr>{if $ticket.status eq '<span style="color:#888888">Closed</span>'}



<td><img src="images/article.png" alt="Ticket" /> <a href="viewticket.php?tid={$ticket.tid}&c={$ticket.c}">{if $ticket.unread}<strong>{/if}#{$ticket.tid} - {$ticket.subject}{if $ticket.unread}</strong>{/if}</a></td>



<td class="textcenter"><form method="get" action="viewticket.php"><input type="hidden" name="tid" value="{$ticket.tid}" /><input type="hidden" name="c" value="{$ticket.c}" /><input type="submit" value="{$LANG.supportticketsviewticket}" class="infoButton info" /></form></td>

{/if} </tr>



<td colspan="6" class="textcenter">There are currently no closed support tickets</td>






<div class="recordslimit">

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

<select name="itemlimit" onchange="submit()">


<option value="10"{if $itemlimit==10} selected{/if}>10</option>

<option value="25"{if $itemlimit==25} selected{/if}>25</option>

<option value="50"{if $itemlimit==50} selected{/if}>50</option>

<option value="100"{if $itemlimit==100} selected{/if}>100</option>

<option value="all"{if $itemlimit==99999999} selected{/if}>{$LANG.clientareaunlimited}</option>





<div class="pagination">

<div class="pageCount">

{$LANG.page} {$pagenumber} {$LANG.pageof} {$totalpages}




<li class="prev{if !$prevpage} disabled{/if}"><a href="{if $prevpage}supporttickets.php?page={$prevpage}{else}javascript:return false;{/if}">← {$LANG.previouspage}</a></li>


<li class="next{if !$nextpage} disabled{/if}"><a href="{if $nextpage}supporttickets.php?page={$nextpage}{else}javascript:return false;{/if}">{$LANG.nextpage} →</a></li>



Edited by jerett
forgot some code
Link to comment
Share on other sites

Basically looking for a quick way to make the pagenation and recordslimit work only for this table and not the rest of the tables on the page. I also noticed that the table filters work for all tables too instead of table specific. Really need help.

Link to comment
Share on other sites

If i'm understanding correctly you cannot do this because pagination and sorting is done in the backend so the $tickets array is filled and sorted with the data for that page. If you wanted a seperate list of tickets for page and sorting you would probably have to do this query on your own using the {php}{/php} tags in smarty.


also, i beleive $tickets has a rawstatus key, if so you wouldnt have to match against that messy html.


{if $ticket.rawstatus eq "Closed"}{/if}


also {debug} is your friend!

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.

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