summaryrefslogtreecommitdiff
path: root/templates/libertypagination.tpl
blob: 9f7192423dcbf1f5848134dfbecfb9415bb5db81 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
{strip}
<div class="pagination">
	{if $pgnPage gt 1}
		{if $ajaxId}
			<a href="javascript:ajax_updater( '{$ajaxId}', '{$smarty.const.LIBERTY_PKG_URL}ajax_attachment_browser.php', '{$pgnName}={$pgnPage-1}{$pgnVars}' );">&laquo;</a>&nbsp;
		{else}
			<a href="{$smarty.server.SCRIPT_URL}?{$pgnName}={$pgnPage-1}{$pgnVars}">&laquo;</a>&nbsp;
		{/if}
	{else}
		&nbsp;&nbsp;
	{/if}

	{tr}Page {$pgnPage} of {$numPages}{/tr}

	{if $pgnPage lt $numPages}
		{if $ajaxId}
			<a href="javascript:ajax_updater( '{$ajaxId}', '{$smarty.const.LIBERTY_PKG_URL}ajax_attachment_browser.php', '{$pgnName}={$pgnPage+1}{$pgnVars}' );">&raquo;</a>
		{else}
			&nbsp;<a href="{$smarty.server.SCRIPT_URL}?{$pgnName}={$pgnPage+1}{$pgnVars}">&raquo;</a>
		{/if}
	{else}
		&nbsp;&nbsp;
	{/if}

	<br />

	{* MSIE dies when we use a form in the pagination when doing ajax stuff *}
	{if $gBitSystem->isFeatureActive( 'site_direct_pagination' ) or $ajaxId}
		{foreach from=$pgnPages item=link}
			{$link}&nbsp;
		{/foreach}
	{else}
		{form id="fPageSelect"}
			<input type="hidden" name="comments_maxComments" value="{$maxComments}" />
			<input type="hidden" name="comments_style" value="{$comments_style}" />
			<input type="hidden" name="comments_sort_mode" value="{$comments_sort_mode}" />

			<input type="hidden" name="find" value="{$find}" />
			<input type="hidden" name="sort_mode" value="{$sort_mode}" />
			{foreach from=$pgnHidden key=name item=value}
				<input type="hidden" name="{$name}" value="{$value}" />
			{/foreach}
			{tr}Go to page{/tr} <input class="gotopage" type="text" size="3" maxlength="4" name="{$pgnName}" />
		{/form}
	{/if}
</div><!-- end .pagination -->
{/strip}