summaryrefslogtreecommitdiffstats
path: root/web/template/pkg_comments.php
diff options
context:
space:
mode:
authorMarcel Korpel <marcel.korpel@gmail.com>2015-07-10 18:47:31 +0200
committerLukas Fleischer <lfleischer@archlinux.org>2015-08-08 12:59:23 +0200
commit92e19e95f3c07745e7ba7c6e358921b7789f8abe (patch)
tree33b79d9247d96e25fdbb5cfd960808a7cf67dc5f /web/template/pkg_comments.php
parent8375d212106918b602911f6286d2e4fd172d446e (diff)
downloadaur-92e19e95f3c07745e7ba7c6e358921b7789f8abe.tar.gz
aur-92e19e95f3c07745e7ba7c6e358921b7789f8abe.tar.xz
Add comment edit icon and form
Show an icon next to the comment deletion icon, which leads to a comment edit form. Signed-off-by: Marcel Korpel <marcel.korpel@gmail.com> Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
Diffstat (limited to 'web/template/pkg_comments.php')
-rw-r--r--web/template/pkg_comments.php3
1 files changed, 3 insertions, 0 deletions
diff --git a/web/template/pkg_comments.php b/web/template/pkg_comments.php
index 03a65817..6cc95555 100644
--- a/web/template/pkg_comments.php
+++ b/web/template/pkg_comments.php
@@ -39,6 +39,9 @@ $count = pkgbase_comments_count($base_id, $include_deleted);
</fieldset>
</form>
<?php endif; ?>
+ <?php if (!$row['DelUsersID'] && can_edit_comment_array($row)): ?>
+ <a href="<?= htmlspecialchars(get_pkgbase_uri($pkgbase_name) . 'edit-comment/?comment_id=' . $row['ID'], ENT_QUOTES) ?>" class="edit-comment" title="<?= __('Edit comment') ?>"><img src="/images/pencil.min.svg" alt="<?= __('Edit comment') ?>" width="11" height="11"></a>
+ <?php endif; ?>
</h4>
<div class="article-content<?php if ($row['DelUsersID']): ?> comment-deleted<?php endif; ?>">
<p>