summaryrefslogtreecommitdiffstats
path: root/web/template
diff options
context:
space:
mode:
authorLukas Fleischer <lfleischer@archlinux.org>2017-04-19 17:21:15 +0200
committerLukas Fleischer <lfleischer@archlinux.org>2017-04-20 07:03:54 +0200
commit4abde895a5b579fb798e062806c8fef2289f0d8f (patch)
tree6898017bad6285e6a2c9c76c89dc39506f357570 /web/template
parent44858e06188946c0082bb09061fcfa6cbb33938b (diff)
downloadaur-4abde895a5b579fb798e062806c8fef2289f0d8f.tar.gz
aur-4abde895a5b579fb798e062806c8fef2289f0d8f.tar.xz
Use JavaScript to collapse long comments
Instead of using CSS to limit the height of package comments as implemented in 7b13203 (Limit comment height to 15 lines, 2016-03-12), use JavaScript to collapse long comments and add a link to expand them. Clicking the same link twice results in the corresponding comment being collapsed again. If JavaScript is disabled, the full comments are shown (without any possibility to collapse or expand). Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
Diffstat (limited to 'web/template')
-rw-r--r--web/template/pkg_comments.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/web/template/pkg_comments.php b/web/template/pkg_comments.php
index fee1898c..c23ec421 100644
--- a/web/template/pkg_comments.php
+++ b/web/template/pkg_comments.php
@@ -102,7 +102,7 @@ if (!isset($count)) {
</form>
<?php endif; ?>
</h4>
- <div class="article-content<?php if ($is_deleted): ?> comment-deleted<?php endif; ?>">
+ <div id="<?= isset($pinned) ? "pinned-" : "comment-" ?><?= $row['ID'] ?>-content" class="article-content<?php if ($is_deleted): ?> comment-deleted<?php endif; ?>">
<p>
<?= parse_comment($row['Comments']) ?>
</p>