Commit 2eba3549 authored by mose's avatar mose

[FIX] maxrecords pref, sorting out local/global setup

parent d0a67dcc
{* $Header: /cvsroot/tikiwiki/tiki/templates/find.tpl,v 1.9 2007-10-04 22:17:35 nyloth Exp $ *}
{* $Header: /cvsroot/tikiwiki/tiki/templates/find.tpl,v 1.10 2007-10-12 21:57:31 mose Exp $ *}
<div align="center">
<form method="post" action="{$smarty.server.PHP_SELF}">
......@@ -60,7 +60,7 @@
</td>
{/if}
<td class="findtitle">{tr}Number of displayed rows{/tr}</td><td class="findtitle"><input type="text" name="maxRecords" value="{$prefs.maxRecords|escape}" size="3" /></td>
<td class="findtitle">{tr}Number of displayed rows{/tr}</td><td class="findtitle"><input type="text" name="maxRecords" value="{$maxRecords|escape}" size="3" /></td>
<td class="findtitle"><input type="submit" name="search" value="{tr}Find{/tr}" /></td>
</tr>
......
{* $Header: /cvsroot/tikiwiki/tiki/templates/tiki-admin_structures.tpl,v 1.50 2007-10-12 12:42:40 sylvieg Exp $ *}
{* $Header: /cvsroot/tikiwiki/tiki/templates/tiki-admin_structures.tpl,v 1.51 2007-10-12 21:57:31 mose Exp $ *}
<h1><a href="tiki-admin_structures.php" class="pagetitle">{tr}Structures{/tr}</a>
{if $prefs.feature_help eq 'y'}
......@@ -93,17 +93,17 @@
<div class="mini">
{if $prev_offset >= 0}
[<a class="galprevnext" href="tiki-admin_structures.php?offset={$prev_offset}&amp;sort_mode={$sort_mode}&amp;maxRecords={$prefs.maxRecords}{if $exact_match eq 'y'}&amp;exact_match=on{/if}{if !empty($lang)}&amp;lang={$lang}{/if}{if !empty($categId)}&amp;categId={$categId}{/if}">{tr}Prev{/tr}</a>]&nbsp;
[<a class="galprevnext" href="tiki-admin_structures.php?offset={$prev_offset}&amp;sort_mode={$sort_mode}&amp;maxRecords={$maxRecords}{if $exact_match eq 'y'}&amp;exact_match=on{/if}{if !empty($lang)}&amp;lang={$lang}{/if}{if !empty($categId)}&amp;categId={$categId}{/if}&amp;maxRecords={$maxRecords}">{tr}Prev{/tr}</a>]&nbsp;
{/if}
{tr}Page{/tr}: {$actual_page}/{$cant_pages}
{if $next_offset >= 0}
&nbsp;[<a class="galprevnext" href="tiki-admin_structures.php?offset={$next_offset}&amp;sort_mode={$sort_mode}&amp;maxRecords={$prefs.maxRecords}{if $exact_match eq 'y'}&amp;exact_match=on{/if}{if !empty($lang)}&amp;lang={$lang}{/if}{if !empty($categId)}&amp;categId={$categId}{/if}">{tr}Next{/tr}</a>]
&nbsp;[<a class="galprevnext" href="tiki-admin_structures.php?offset={$next_offset}&amp;sort_mode={$sort_mode}&amp;maxRecords={$maxRecords}{if $exact_match eq 'y'}&amp;exact_match=on{/if}{if !empty($lang)}&amp;lang={$lang}{/if}{if !empty($categId)}&amp;categId={$categId}{/if}&amp;maxRecords={$maxRecords}">{tr}Next{/tr}</a>]
{/if}
{if $prefs.direct_pagination eq 'y'}
<br />
{section loop=$cant_pages name=foo}
{assign var=selector_offset value=$smarty.section.foo.index|times:$prefs.maxRecords}
<a class="prevnext" href="tiki-admin_structures.php?offset={$selector_offset}&amp;sort_mode={$sort_mode}">
{assign var=selector_offset value=$smarty.section.foo.index|times:$maxRecords}
<a class="prevnext" href="tiki-admin_structures.php?offset={$selector_offset}&amp;sort_mode={$sort_mode}&amp;maxRecords={$maxRecords}">
{$smarty.section.foo.index_next}</a>&nbsp;
{/section}
{/if}
......
{* $Header: /cvsroot/tikiwiki/tiki/templates/tiki-list_articles.tpl,v 1.49 2007-10-04 22:17:41 nyloth Exp $ *}
{* $Header: /cvsroot/tikiwiki/tiki/templates/tiki-list_articles.tpl,v 1.50 2007-10-12 21:57:31 mose Exp $ *}
<h1><a class="pagetitle" href="tiki-list_articles.php">{tr}Articles{/tr}</a>
......@@ -30,33 +30,33 @@
<table class="normal">
<tr>
{if $prefs.art_list_title eq 'y'}
<td class="heading"><a class="tableheading" href="tiki-list_articles.php?topic={$find_topic}&amp;type={$find_type}&amp;offset={$offset}&amp;sort_mode={if $sort_mode eq 'title_desc'}title_asc{else}title_desc{/if}">{tr}Title{/tr}</a></td>
<td class="heading"><a class="tableheading" href="tiki-list_articles.php?topic={$find_topic}&amp;type={$find_type}&amp;offset={$offset}&amp;sort_mode={if $sort_mode eq 'title_desc'}title_asc{else}title_desc{/if}&amp;maxRecords={$maxRecords}">{tr}Title{/tr}</a></td>
{/if}
{if $prefs.art_list_type eq 'y'}
<td class="heading"><a class="tableheading" href="tiki-list_articles.php?topic={$find_topic}&amp;type={$find_type}&amp;offset={$offset}&amp;sort_mode={if $sort_mode eq 'type_desc'}type_asc{else}type_desc{/if}">{tr}Type{/tr}</a></td>
<td class="heading"><a class="tableheading" href="tiki-list_articles.php?topic={$find_topic}&amp;type={$find_type}&amp;offset={$offset}&amp;sort_mode={if $sort_mode eq 'type_desc'}type_asc{else}type_desc{/if}&amp;maxRecords={$maxRecords}">{tr}Type{/tr}</a></td>
{/if}
{if $prefs.art_list_topic eq 'y'}
<td class="heading"><a class="tableheading" href="tiki-list_articles.php?topic={$find_topic}&amp;type={$find_type}&amp;offset={$offset}&amp;sort_mode={if $sort_mode eq 'topicName_desc'}topicName_asc{else}topicName_desc{/if}">{tr}Topic{/tr}</a></td>
<td class="heading"><a class="tableheading" href="tiki-list_articles.php?topic={$find_topic}&amp;type={$find_type}&amp;offset={$offset}&amp;sort_mode={if $sort_mode eq 'topicName_desc'}topicName_asc{else}topicName_desc{/if}&amp;maxRecords={$maxRecords}">{tr}Topic{/tr}</a></td>
{/if}
{if $prefs.art_list_date eq 'y'}
<td class="heading"><a class="tableheading" href="tiki-list_articles.php?topic={$find_topic}&amp;type={$find_type}&amp;offset={$offset}&amp;sort_mode={if $sort_mode eq 'publishDate_desc'}publishDate_asc{else}publishDate_desc{/if}">{tr}PublishDate{/tr}</a></td>
<td class="heading"><a class="tableheading" href="tiki-list_articles.php?topic={$find_topic}&amp;type={$find_type}&amp;offset={$offset}&amp;sort_mode={if $sort_mode eq 'publishDate_desc'}publishDate_asc{else}publishDate_desc{/if}&amp;maxRecords={$maxRecords}">{tr}PublishDate{/tr}</a></td>
{/if}
{if $prefs.art_list_expire eq 'y'}
<td class="heading"><a class="tableheading" href="tiki-list_articles.php?topic={$find_topic}&amp;type={$find_type}&amp;offset={$offset}&amp;sort_mode={if $sort_mode eq 'expireDate_desc'}expireDate_asc{else}expireDate_desc{/if}">{tr}ExpireDate{/tr}</a></td>
<td class="heading"><a class="tableheading" href="tiki-list_articles.php?topic={$find_topic}&amp;type={$find_type}&amp;offset={$offset}&amp;sort_mode={if $sort_mode eq 'expireDate_desc'}expireDate_asc{else}expireDate_desc{/if}&amp;maxRecords={$maxRecords}">{tr}ExpireDate{/tr}</a></td>
{/if}
{if $prefs.art_list_visible eq 'y'}
<td class="heading"><span class="tableheading">{tr}Visible{/tr}</span></td>
{/if}
{if $prefs.art_list_author eq 'y'}
<td class="heading"><a class="tableheading" href="tiki-list_articles.php?topic={$find_topic}&amp;type={$find_type}&amp;offset={$offset}&amp;sort_mode={if $sort_mode eq 'authorName_desc'}authorName_asc{else}authorName_desc{/if}">{tr}AuthorName{/tr}</a></td>
<td class="heading"><a class="tableheading" href="tiki-list_articles.php?topic={$find_topic}&amp;type={$find_type}&amp;offset={$offset}&amp;sort_mode={if $sort_mode eq 'authorName_desc'}authorName_asc{else}authorName_desc{/if}&amp;maxRecords={$maxRecords}">{tr}AuthorName{/tr}</a></td>
{/if}
{if $prefs.art_list_reads eq 'y'}
<td style="text-align:right;" class="heading"><a class="tableheading"
href="tiki-list_articles.php?topic={$find_topic}&amp;type={$find_type}&amp;offset={$offset}&amp;sort_mode={if
$sort_mode eq 'nbreads_desc'}nbreads_asc{else}nbreads_desc{/if}">{tr}Reads{/tr}</a></td>
$sort_mode eq 'nbreads_desc'}nbreads_asc{else}nbreads_desc{/if}&amp;maxRecords={$maxRecords}">{tr}Reads{/tr}</a></td>
{/if}
{if $prefs.art_list_size eq 'y'}
<td style="text-align:right;" class="heading"><a class="tableheading" href="tiki-list_articles.php?topic={$find_topic}&amp;type={$find_type}&amp;offset={$offset}&amp;sort_mode={if $sort_mode eq 'size_desc'}size_asc{else}size_desc{/if}">{tr}Size{/tr}</a></td>
<td style="text-align:right;" class="heading"><a class="tableheading" href="tiki-list_articles.php?topic={$find_topic}&amp;type={$find_type}&amp;offset={$offset}&amp;sort_mode={if $sort_mode eq 'size_desc'}size_asc{else}size_desc{/if}&amp;maxRecords={$maxRecords}">{tr}Size{/tr}</a></td>
{/if}
{if $prefs.art_list_img eq 'y'}
<td class="heading">{tr}Img{/tr}</td>
......@@ -123,17 +123,17 @@ $sort_mode eq 'nbreads_desc'}nbreads_asc{else}nbreads_desc{/if}">{tr}Reads{/tr}<
{if count($listpages) > 0}
<div class="mini">
{if $prev_offset >= 0}
[<a class="artprevnext" href="tiki-list_articles.php?topic={$find_topic}&amp;type={$find_type}&amp;find={$find}&amp;offset={$prev_offset}&amp;sort_mode={$sort_mode}">{tr}Prev{/tr}</a>]&nbsp;
[<a class="artprevnext" href="tiki-list_articles.php?topic={$find_topic}&amp;type={$find_type}&amp;find={$find}&amp;offset={$prev_offset}&amp;sort_mode={$sort_mode}&amp;maxRecords={$maxRecords}">{tr}Prev{/tr}</a>]&nbsp;
{/if}
{tr}Page{/tr}: {$actual_page}/{$cant_pages}
{if $next_offset >= 0}
&nbsp;[<a class="artprevnext" href="tiki-list_articles.php?topic={$find_topic}&amp;type={$find_type}&amp;find={$find}&amp;offset={$next_offset}&amp;sort_mode={$sort_mode}">{tr}Next{/tr}</a>]
&nbsp;[<a class="artprevnext" href="tiki-list_articles.php?topic={$find_topic}&amp;type={$find_type}&amp;find={$find}&amp;offset={$next_offset}&amp;sort_mode={$sort_mode}&amp;maxRecords={$maxRecords}">{tr}Next{/tr}</a>]
{/if}
{if $prefs.direct_pagination eq 'y'}
<br />
{section loop=$cant_pages name=foo}
{assign var=selector_offset value=$smarty.section.foo.index|times:$prefs.maxRecords}
<a class="prevnext" href="tiki-list_articles.php?topic={$find_topic}&amp;type={$find_type}&amp;find={$find}&amp;offset={$selector_offset}&amp;sort_mode={$sort_mode}">
{assign var=selector_offset value=$smarty.section.foo.index|times:$maxRecords}
<a class="prevnext" href="tiki-list_articles.php?topic={$find_topic}&amp;type={$find_type}&amp;find={$find}&amp;offset={$selector_offset}&amp;sort_mode={$sort_mode}&amp;maxRecords={$maxRecords}">
{$smarty.section.foo.index_next}</a>&nbsp;
{/section}
{/if}
......
{* $Header: /cvsroot/tikiwiki/tiki/templates/tiki-listpages.tpl,v 1.52 2007-10-04 22:17:41 nyloth Exp $ *}
{* $Header: /cvsroot/tikiwiki/tiki/templates/tiki-listpages.tpl,v 1.53 2007-10-12 21:57:31 mose Exp $ *}
<h1><a href="tiki-listpages.php" class="pagetitle">{tr}Pages{/tr}</a></h1>
{if $tiki_p_admin eq 'y'}
......@@ -11,7 +11,7 @@
<input type="hidden" name="offset" value="{$offset|escape}" />
<input type="hidden" name="sort_mode" value="{$sort_mode|escape}" />
<input type="hidden" name="find" value="{$find|escape}" />
{if !empty($prefs.maxRecords)}<input type="hidden" name="maxRecords" value="{$prefs.maxRecords}" />{/if}
<input type="hidden" name="maxRecords" value="{$maxRecords|escape}" />
</form>
<div id="tiki-listpages-content">
......
This diff is collapsed.
<?php
// $Header: /cvsroot/tikiwiki/tiki/tiki-admin_structures.php,v 1.34 2007-10-12 12:42:40 sylvieg Exp $
// $Header: /cvsroot/tikiwiki/tiki/tiki-admin_structures.php,v 1.35 2007-10-12 21:57:31 mose Exp $
// Copyright (c) 2002-2007, Luis Argerich, Garland Foster, Eduardo Polidor, et. al.
// All Rights Reserved. See copyright.txt for details and a complete list of authors.
......@@ -238,8 +238,10 @@ $smarty->assign_by_ref('sort_mode', $sort_mode);
if (isset($_REQUEST['maxRecords'])) {
$maxRecords = $_REQUEST['maxRecords'];
$smarty->assign('maxRecords', $maxRecords);
} else {
$maxRecords = $prefs['maxRecords'];
}
$smarty->assign('maxRecords', $maxRecords);
$filter = '';
if (!empty($_REQUEST['lang'])) {
......
<?php
// $Header: /cvsroot/tikiwiki/tiki/tiki-list_articles.php,v 1.36 2007-10-12 07:55:28 nyloth Exp $
// $Header: /cvsroot/tikiwiki/tiki/tiki-list_articles.php,v 1.37 2007-10-12 21:57:31 mose Exp $
// Copyright (c) 2002-2007, Luis Argerich, Garland Foster, Eduardo Polidor, et. al.
// All Rights Reserved. See copyright.txt for details and a complete list of authors.
......@@ -66,8 +66,10 @@ if (!isset($_REQUEST["offset"])) {
$smarty->assign_by_ref('offset', $offset);
if (!empty($_REQUEST['maxRecords'])) {
$maxRecords = $_REQUEST['maxRecords'];
$smarty->assign('maxRecords', $maxRecords);
} else {
$maxRecords = $prefs['maxRecords'];
}
$smarty->assign('maxRecords', $maxRecords);
if( ($tiki_p_admin == 'y') || ($tiki_p_admin_cms == 'y') ) {
$pdate = '';
......
<?php
// $Header: /cvsroot/tikiwiki/tiki/tiki-listpages.php,v 1.52 2007-10-12 07:55:28 nyloth Exp $
// $Header: /cvsroot/tikiwiki/tiki/tiki-listpages.php,v 1.53 2007-10-12 21:57:31 mose Exp $
// Copyright (c) 2002-2007, Luis Argerich, Garland Foster, Eduardo Polidor, et. al.
// All Rights Reserved. See copyright.txt for details and a complete list of authors.
......@@ -104,8 +104,10 @@ if ( ! empty($multiprint_pages) ) {
// it will default to 1 recovering information for today
if (isset($_REQUEST['maxRecords'])) {
$maxRecords = $_REQUEST['maxRecords'];
$smarty->assign('maxRecords', $maxRecords);
} else {
$maxRecords = $prefs['maxRecords'];
}
$smarty->assign('maxRecords', $maxRecords);
if (!isset($_REQUEST["sort_mode"])) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment