aboutsummaryrefslogtreecommitdiffstats
path: root/admin
diff options
context:
space:
mode:
authormistic100 <mistic@piwigo.org>2012-09-23 11:19:26 +0000
committermistic100 <mistic@piwigo.org>2012-09-23 11:19:26 +0000
commit4e65d9af4667f3d8556522843f776f1fa074ea21 (patch)
treeea39e514f64b1cea7cd8df375eae4f1fc38e3682 /admin
parent7e33b84e770ddab61ef1d5c67061cd41c189f20e (diff)
feature 2614: pagination on albums
git-svn-id: http://piwigo.org/svn/trunk@18165 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r--admin/configuration.php8
-rw-r--r--admin/themes/default/template/configuration.tpl7
2 files changed, 14 insertions, 1 deletions
diff --git a/admin/configuration.php b/admin/configuration.php
index c615d64f1..8a7094864 100644
--- a/admin/configuration.php
+++ b/admin/configuration.php
@@ -222,6 +222,11 @@ if (isset($_POST['submit']))
}
case 'display' :
{
+ if (!preg_match($int_pattern, $_POST['nb_categories_page'])
+ or $_POST['nb_categories_page'] < 4)
+ {
+ array_push($page['errors'], l10n('The number of albums a page must be above 4.'));
+ }
foreach( $display_checkboxes as $checkbox)
{
$_POST[$checkbox] = empty($_POST[$checkbox])?'false':'true';
@@ -422,7 +427,8 @@ switch ($page['section'])
$template->append(
'display',
array(
- 'picture_informations' => unserialize($conf['picture_informations'])
+ 'picture_informations' => unserialize($conf['picture_informations']),
+ 'NB_CATEGORIES_PAGE' => $conf['nb_categories_page'],
),
true
);
diff --git a/admin/themes/default/template/configuration.tpl b/admin/themes/default/template/configuration.tpl
index 388e26d0d..a2520b0c3 100644
--- a/admin/themes/default/template/configuration.tpl
+++ b/admin/themes/default/template/configuration.tpl
@@ -645,6 +645,13 @@ jQuery(document).ready(function() {
{'slideshow'|@translate|@ucfirst|@string_format:$pwg->l10n('Activate icon "%s"')}
</label>
</li>
+
+ <li>
+ <label>
+ {'Number of albums per page'|@translate}
+ <input type="text" size="3" maxlength="4" name="nb_categories_page" id="nb_categories_page" value="{$display.NB_CATEGORIES_PAGE}">
+ </label>
+ </li>
</ul>
</fieldset>