jerett Posted June 1, 2012 Share Posted June 1, 2012 (edited) 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> </div> <table class="zebra-striped"> <thead> <tr> <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> </tr> </thead> <tbody> {foreach from=$tickets item=ticket} <tr>{if $ticket.status eq '<span style="color:#888888">Closed</span>'} <td>{$ticket.date}</td> <td>{$ticket.department}</td> <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>{$ticket.status}</td> <td>{$ticket.lastreply}</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> {foreachelse} <tr> <td colspan="6" class="textcenter">There are currently no closed support tickets</td> </tr> {/foreach} </tbody> </table> <div class="recordslimit"> <form method="post" action="{$smarty.server.PHP_SELF}" /> <select name="itemlimit" onchange="submit()"> <option>{$LANG.resultsperpage}</option> <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> </select> </form> </div> <div class="pagination"> <div class="pageCount"> {$LANG.page} {$pagenumber} {$LANG.pageof} {$totalpages} </div> <ul> <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> </ul> </div> Edited June 1, 2012 by jerett forgot some code 0 Quote Link to comment Share on other sites More sharing options...
jerett Posted June 2, 2012 Author Share Posted June 2, 2012 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. 0 Quote Link to comment Share on other sites More sharing options...
Guest Posted June 3, 2012 Share Posted June 3, 2012 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! 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.