add custom paging support

This commit is contained in:
SJ 2013-11-15 22:04:26 +01:00
parent 83a223e96e
commit aaeedb7305
4 changed files with 15 additions and 8 deletions

View File

@ -247,6 +247,14 @@ $themes = array(
);
$paging = array(
10,
20,
30,
50
);
$letters = array('A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z');

View File

@ -61,6 +61,7 @@ if(MEMCACHED_ENABLED) {
Registry::set('counters', $counters);
Registry::set('langs', $langs);
Registry::set('paging', $paging);
Registry::set('themes', $themes);
Registry::set('letters', $letters);
Registry::set('ldap_types', array("AD", "iredmail", "lotus", "zimbra"));

View File

@ -55,10 +55,9 @@
<label class="control-label" for="pagelen"><?php print $text_page_length; ?></label>
<div class="controls">
<select name="pagelen">
<option value="10"<?php if($page_len == 10) { ?> selected="selected"<?php } ?>>10
<option value="20"<?php if($page_len == 20) { ?> selected="selected"<?php } ?>>20
<option value="30"<?php if($page_len == 30) { ?> selected="selected"<?php } ?>>30
<option value="50"<?php if($page_len == 50) { ?> selected="selected"<?php } ?>>50
<?php foreach(Registry::get('paging') as $t) { ?>
<option value="<?php print $t; ?>"<?php if($page_len == $t) { ?> selected="selected"<?php } ?>><?php print $t; ?></option>
<?php } ?>
</select>
</div>
</div>

View File

@ -61,10 +61,9 @@
<div class="logincell"><?php print $text_page_length; ?>:</div>
<div class="tcell">
<select name="pagelen">
<option value="10"<?php if($page_len == 10) { ?> selected="selected"<?php } ?>>10
<option value="20"<?php if($page_len == 20) { ?> selected="selected"<?php } ?>>20
<option value="30"<?php if($page_len == 30) { ?> selected="selected"<?php } ?>>30
<option value="50"<?php if($page_len == 50) { ?> selected="selected"<?php } ?>>50
<?php foreach(Registry::get('paging') as $t) { ?>
<option value="<?php print $t; ?>"<?php if($page_len == $t) { ?> selected="selected"<?php } ?>><?php print $t; ?></option>
<?php } ?>
</select>
</div>
</div>