aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--admin/comments.php24
-rw-r--r--admin/themes/default/template/comments.tpl7
-rw-r--r--admin/themes/default/theme.css3
3 files changed, 32 insertions, 2 deletions
diff --git a/admin/comments.php b/admin/comments.php
index e22771a78..7a391ceac 100644
--- a/admin/comments.php
+++ b/admin/comments.php
@@ -28,9 +28,19 @@ if (!defined('PHPWG_ROOT_PATH'))
include_once(PHPWG_ROOT_PATH.'admin/include/functions.php');
+if (isset($_GET['start']) and is_numeric($_GET['start']))
+{
+ $page['start'] = $_GET['start'];
+}
+else
+{
+ $page['start'] = 0;
+}
+
// +-----------------------------------------------------------------------+
// | Check Access and exit when user status is not ok |
// +-----------------------------------------------------------------------+
+
check_status(ACCESS_ADMINISTRATOR);
// +-----------------------------------------------------------------------+
@@ -165,6 +175,7 @@ SELECT
ON u.'.$conf['user_fields']['id'].' = c.author_id
WHERE '.implode(' AND ', $where_clauses).'
ORDER BY c.date DESC
+ LIMIT '.$page['start'].', '.$conf['comments_page_nb_comments'].'
;';
$result = pwg_query($query);
while ($row = pwg_db_fetch_assoc($result))
@@ -200,6 +211,19 @@ while ($row = pwg_db_fetch_assoc($result))
}
// +-----------------------------------------------------------------------+
+// | navigation bar |
+// +-----------------------------------------------------------------------+
+
+$navbar = create_navigation_bar(
+ get_root_url().'admin.php'.get_query_string_diff(array('start')),
+ ('pending' == $page['filter'] ? $nb_pending : $nb_total),
+ $page['start'],
+ $conf['comments_page_nb_comments']
+ );
+
+$template->assign('navbar', $navbar);
+
+// +-----------------------------------------------------------------------+
// | sending html code |
// +-----------------------------------------------------------------------+
diff --git a/admin/themes/default/template/comments.tpl b/admin/themes/default/template/comments.tpl
index 908ffbe49..3b3a40422 100644
--- a/admin/themes/default/template/comments.tpl
+++ b/admin/themes/default/template/comments.tpl
@@ -45,10 +45,13 @@ jQuery(document).ready(function(){
<h2>{'User comments'|@translate} {$TABSHEET_TITLE}</h2>
-<p style="text-align:left;margin-left:1em;">
+<div class="commentFilter">
<a href="{$F_ACTION}&amp;filter=all" class="{if $filter == 'all'}commentFilterSelected{/if}">{'All'|@translate}</a> ({$nb_total})
| <a href="{$F_ACTION}&amp;filter=pending" class="{if $filter == 'pending'}commentFilterSelected{/if}">{'Waiting'|@translate}</a> ({$nb_pending})
-</p>
+{if !empty($navbar) }{include file='navigation_bar.tpl'|@get_extent:'navbar'}{/if}
+</div>
+
+
{if !empty($comments) }
<form method="post" action="{$F_ACTION}" id="pendingComments">
diff --git a/admin/themes/default/theme.css b/admin/themes/default/theme.css
index 46c3ea176..77a263266 100644
--- a/admin/themes/default/theme.css
+++ b/admin/themes/default/theme.css
@@ -1044,6 +1044,9 @@ p#uploadModeInfos {text-align:left;margin-top:1em;font-size:90%;color:#999;}
text-align:left;
}
+.commentFilter {text-align:left;margin:5px 1em;}
+.commentFilter .navigationBar {float:right; margin:0;}
+
FORM#categoryOrdering p.albumTitle {margin:0;}
FORM#categoryOrdering p.albumActions {visibility:hidden; margin:0}
FORM#categoryOrdering .categoryLi:hover p.albumActions {visibility:visible;}