diff options
| author | Bharat Mediratta <bharat@menalto.com> | 2009-05-11 20:15:24 +0000 |
|---|---|---|
| committer | Bharat Mediratta <bharat@menalto.com> | 2009-05-11 20:15:24 +0000 |
| commit | de812e1e8225f49deec27063d96a81ce4431ebcc (patch) | |
| tree | 4479ec0d45507b33c1d6727c8b8d1f80523ddbbd /modules/comment/views | |
| parent | a2c188ac37a748734f4a9f3413eae44152750d4a (diff) | |
Refactor to support pagination and simplify the code.
- Simplify the public controller methods
- Fix a bug where missing thumbnails would cause a divide by zero error
- actually pay attention to the page # for pagination and limit the query accordingly.
Diffstat (limited to 'modules/comment/views')
| -rw-r--r-- | modules/comment/views/admin_comments.html.php | 23 |
1 files changed, 18 insertions, 5 deletions
diff --git a/modules/comment/views/admin_comments.html.php b/modules/comment/views/admin_comments.html.php index 63b1a394..16816636 100644 --- a/modules/comment/views/admin_comments.html.php +++ b/modules/comment/views/admin_comments.html.php @@ -44,11 +44,20 @@ <!-- @todo: Remove after setting active option? --> <h2> - <?= $title ?> + <? if ($state == "published"): ?> + <?= t("Approved Comments") ?> + <? elseif ($state == "unpublished"): ?> + <?= t("Comments Awaiting Moderation") ?> + <? elseif ($state == "spam"): ?> + <?= t("Spam Comments") ?> + <? elseif ($state == "deleted"): ?> + <?= t("Recently Deleted Comments") ?> + <? endif ?> </h2> - <? if ($queue == "spam"): ?> + <? if ($state == "spam"): ?> <div> + <? $spam_caught = module::get_var("comment", "spam_caught") ?> <? if ($spam_caught > 0): ?> <p> <?= t2("Gallery has caught %count spam for you since you installed spam filtering.", @@ -57,10 +66,10 @@ </p> <? endif ?> <p> - <? if ($spam->count()): ?> + <? if ($counts->spam): ?> <?= t2("There is currently one comment in your spam queue. You can delete it with a single click, but there is no undo operation so you may want to check the message first to make sure that it really is spam.", "There are currently %count comments in your spam queue. You can delete them all with a single click, but there is no undo operation so you may want to check the messages first to make sure that they really are spam. All spam messages will be deleted after 7 days automatically.", - $spam->count()) ?> + $counts->spam) ?> </p> <p> <a href="<?= url::site("admin/comments/delete_all_spam?csrf=$csrf") ?>"> @@ -73,7 +82,7 @@ </div> <? endif ?> - <? if ($queue == "deleted"): ?> + <? if ($state == "deleted"): ?> <div> <p> <?= t("These are messages that have been recently deleted. They will be permanently erased automatically after 7 days.") ?> @@ -111,10 +120,14 @@ <? $item = $comment->item(); ?> <div class="gItem gPhoto"> <a href="<?= $item->url() ?>"> + <? if ($item->has_thumb()): ?> <img src="<?= $item->thumb_url() ?>" alt="<?= $item->title ?>" <?= photo::img_dimensions($item->thumb_width, $item->thumb_height, 75) ?> /> + <? else: ?> + <?= t("No thumbnail") ?> + <? endif ?> </a> </div> </div> |
