summaryrefslogtreecommitdiffstats
path: root/web/template/pkg_comments.php
diff options
context:
space:
mode:
authorLoui Chang <louipc.ist@gmail.com>2010-04-15 22:52:55 +0200
committerLoui Chang <louipc.ist@gmail.com>2010-04-15 22:52:55 +0200
commit5b8b0757f4f938f86bed86ae56fa3511704e006f (patch)
tree5e9576e04a93309c1e931afc7836d844af26cd89 /web/template/pkg_comments.php
parent94da2bf1dceeff037933755912dd333302ca5ec9 (diff)
downloadaur-5b8b0757f4f938f86bed86ae56fa3511704e006f.tar.gz
aur-5b8b0757f4f938f86bed86ae56fa3511704e006f.tar.xz
pkg_comments: Only display 10 comments by default.
Add a mechanism to view all comments. Signed-off-by: Loui Chang <louipc.ist@gmail.com>
Diffstat (limited to 'web/template/pkg_comments.php')
-rw-r--r--web/template/pkg_comments.php12
1 files changed, 11 insertions, 1 deletions
diff --git a/web/template/pkg_comments.php b/web/template/pkg_comments.php
index 7c42ac16..02171a03 100644
--- a/web/template/pkg_comments.php
+++ b/web/template/pkg_comments.php
@@ -24,5 +24,15 @@ while (list($indx, $carr) = each($comments)) { ?>
</div>
</blockquote>
<?php
-} ?>
+}
+?>
</div>
+
+<?php
+$count = package_comments_count($_GET['ID']);
+if ($count > 10 && !isset($_GET['comments'])) {
+ echo '<div class="pgbox">';
+ echo '<a href="'. $_SERVER['PHP_SELF'] . '?ID=' . $_REQUEST['ID'] . '&comments=all">'. __('Show all %s comments', $count) . '</a>';
+ echo '</div>';
+}
+?>