mirror of
https://github.com/Pathduck/gallery3.git
synced 2026-05-20 03:19:13 -04:00
Add very basic comment listing which shows the different queues
(approved, unapproved, spam).
This commit is contained in:
85
modules/comment/views/admin_comments.html.php
Normal file
85
modules/comment/views/admin_comments.html.php
Normal file
@@ -0,0 +1,85 @@
|
||||
<?php defined("SYSPATH") or die("No direct script access.") ?>
|
||||
<div id="gAdminComments">
|
||||
<h1> <?= _("Comments") ?> </h1>
|
||||
|
||||
<div id="gAdminCommentsMenu">
|
||||
<?= $menu ?>
|
||||
</div>
|
||||
|
||||
<div id="gAdminCommentsList">
|
||||
<table>
|
||||
<tr>
|
||||
<th>
|
||||
<?= _("Comment") ?>
|
||||
</th>
|
||||
<th>
|
||||
<?= _("Date") ?>
|
||||
</th>
|
||||
<th>
|
||||
<?= _("Actions") ?>
|
||||
</th>
|
||||
</tr>
|
||||
<? foreach ($comments as $comment): ?>
|
||||
<tr>
|
||||
<td>
|
||||
<div>
|
||||
<b> <?= $comment->author ?> </b>
|
||||
</div>
|
||||
<div>
|
||||
<b> <?= $comment->url ?> </b> | <b> <?= $comment->email ?> </b>
|
||||
</div>
|
||||
<div>
|
||||
<?= $comment->text ?>
|
||||
</div>
|
||||
<div>
|
||||
<? $item = $comment->item(); ?>
|
||||
<img src="<?= $item->thumb_url() ?>"
|
||||
alt="<?= $item->title ?>"
|
||||
<?= photo::img_dimensions($item->thumb_width, $item->thumb_height, 75) ?>
|
||||
/>
|
||||
<?= sprintf(_("Comment left on <a href=\"%s\">%s</a>"), $item->url(), $item->title) ?>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<?= date("Y-M-d", $comment->created); ?>
|
||||
</td>
|
||||
<td>
|
||||
<ul>
|
||||
<? if ($comment->state != "unpublished"): ?>
|
||||
<li>
|
||||
<a href="<?= url::site("admin/comments/mark/unpublished/$comment->id?csrf=" . access::csrf_token()) ?>">
|
||||
<?= _("Unapprove") ?>
|
||||
</a>
|
||||
</li>
|
||||
<? endif ?>
|
||||
|
||||
<? if ($comment->state != "published"): ?>
|
||||
<li>
|
||||
<a href="<?= url::site("admin/comments/mark/published/$comment->id?csrf=" . access::csrf_token()) ?>">
|
||||
<?= _("Approve") ?>
|
||||
</a>
|
||||
</li>
|
||||
<? endif ?>
|
||||
|
||||
<? if ($comment->state != "spam"): ?>
|
||||
<li>
|
||||
<a href="<?= url::site("admin/comments/mark/spam/$comment->id?csrf=" . access::csrf_token()) ?>">
|
||||
<?= _("Spam") ?>
|
||||
</a>
|
||||
</li>
|
||||
<? endif ?>
|
||||
|
||||
<? if ($comment->state != "spam"): ?>
|
||||
<li>
|
||||
<a href="<?= url::site("admin/comments/mark/spam/$comment->id?csrf=" . access::csrf_token()) ?>">
|
||||
<?= _("Delete") ?>
|
||||
</a>
|
||||
</li>
|
||||
<? endif ?>
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
<? endforeach ?>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
Reference in New Issue
Block a user