Today I made another modification into osTicket version 1.6 RC5. It was about the page limit or displaying the ticket list page based on the maximum record per page. I wanted the ability for client to choose and also to change how many records per page will be displayed in the My Ticket page. After I modified, then there will be a new selection for page limit upon the ticket list on that page. When client choose a specific number from that selection or combobox, then the page will be automatically adjust to that specific number and updating the ticket list properly. So here is the code.
-
Open your \include\client\tickets.inc.php file, and find this code:
75
<div style="margin: 10px 0 60px 0;">
after the last line of that code above, please insert this following code:
76 77 78 79 80 81 82 83
<script language="JavaScript"> function submitForm() { param=document.form.limit.options[document.form.limit.selectedIndex].value; url="?limit="+param+""; location.href=url; } </script> <form name="form">
Find again this code:
86
<td width="60%" class="msg"><?=$showing?> <?=$results_type?>
after that line, please insert this following code:
87 88 89 90 91 92 93 94 95
Limit: <select name='limit' onChange="submitForm(this.form)"> <?php for ($x = 5; $x <= 50; $x += 5) { ?> <option value="<?=$x?>" <?=($pagelimit==$x )?'selected':''?>><?=$x?></option> <?php } ?> </select> Find again this code:
104
</table>
after that line, please insert this following code:
105
</form>
That’s all. Now client can choose the page limit when displaying the ticket list from My Ticket page.


Recent Comments