diff options
author | Chad Kieffer <chad@2tbsp.com> | 2009-01-09 07:33:22 +0000 |
---|---|---|
committer | Chad Kieffer <chad@2tbsp.com> | 2009-01-09 07:33:22 +0000 |
commit | f97d7da720e5327807423c1468ad52496504b17c (patch) | |
tree | 711bc889a7db743641a0a096f88b7bccc869633c | |
parent | a0f3c09a07f2673f0ce2fac67c13df607d72061e (diff) |
Reformated comment admin table layout. Added bulk action checkboxes and menu, reply link, and edit link, all of which need to be wired up.
-rw-r--r-- | modules/comment/views/admin_comments.html.php | 189 | ||||
-rw-r--r-- | themes/admin_default/css/screen.css | 13 | ||||
-rw-r--r-- | themes/default/css/screen.css | 6 |
3 files changed, 115 insertions, 93 deletions
diff --git a/modules/comment/views/admin_comments.html.php b/modules/comment/views/admin_comments.html.php index b9f5148b..388f5d6b 100644 --- a/modules/comment/views/admin_comments.html.php +++ b/modules/comment/views/admin_comments.html.php @@ -53,88 +53,115 @@ </p> </div> <? endif ?> - + + <form id="gBulkAction" action="#" method="post"> + <label for="bulk_actions"><?= t("Bulk actions")?></label> + <select id="bulk_actions"> + <option></option> + <option><?= t("Unapprove")?></option> + <option><?= t("Spam")?></option> + <option><?= t("Delete")?></option> + </select> + <input type="submit" value="Apply" /> + + <table id="gAdminCommentsList"> + <tr> + <th> + <input type="checkbox" /> + </th> + <th> + <?= t("Author") ?> + </th> + <th> + <?= t("Comment") ?> + </th> + <th> + <?= t("Date") ?> + </th> + <th> + <?= t("Actions") ?> + </th> + <th> + <?= t("Subject")?> + </th> + </tr> + <? foreach ($comments as $comment): ?> + <tr id="gComment-<?= $comment->id ?>"> + <td> + <input type="checkbox" name="delete_comments[]" value="<?= $comment->id ?>" /> + </td> + <td> + <a href="#"><img src="<?= $theme->url("images/avatar.jpg") ?>" + alt="<?= $comment->author ?>"/></a><br/> + <a href="mailto:<?= $comment->email ?>" + title="<?= $comment->email ?>"> <?= $comment->author ?> </a> + </td> + <td> + <?= $comment->text ?> + </td> + <td> + <?= date("Y-M-d", $comment->created); ?> + </td> + <td> + <ul> + <? if ($comment->state != "unpublished"): ?> + <li> + <a href="javascript:set_state('unpublished',<?=$comment->id?>)"> + <?= t("Unapprove") ?> + </a> + </li> + <? endif ?> + + <? if ($comment->state != "published"): ?> + <li> + <a href="javascript:set_state('published',<?=$comment->id?>)"> + <?= t("Approve") ?> + </a> + </li> + <? endif ?> + + <? if ($comment->state != "spam"): ?> + <li> + <a href="javascript:set_state('spam',<?=$comment->id?>)"> + <?= t("Spam") ?> + </a> + </li> + <? endif ?> + + <li> + <a href="javascript:reply(<?=$comment->id?>)"> + <?= t("Reply") ?> + </a> + </li> + <li> + <a href="javascript:Edit(<?=$comment->id?>)"> + <?= t("Edit") ?> + </a> + </li> + <li> + <a href="javascript:del(<?=$comment->id?>)"> + <?= t("Delete") ?> + </a> + </li> + </ul> + </td> + <td> + <? $item = $comment->item(); ?> + <a href="<?= $item->url() ?>"> + <img src="<?= $item->thumb_url() ?>" + alt="<?= $item->title ?>" + <?= photo::img_dimensions($item->thumb_width, $item->thumb_height, 75) ?> + /> + </a> + <a href="<?= $item->url() ?>"> <?= $item->title ?> </a> + </td> + </tr> + <? endforeach ?> + </table> + </form> + + <div class="pager"> <?= $pager ?> </div> - - <div id="gAdminCommentsList"> - <table> - <tr> - <th> - <?= t("Comment") ?> - </th> - <th style="width: 100px"> - <?= t("Date") ?> - </th> - <th> - <?= t("Actions") ?> - </th> - </tr> - <? foreach ($comments as $comment): ?> - <tr id="gComment-<?= $comment->id ?>"> - <td> - <div> - <img src="<?= $theme->url("images/avatar.jpg") ?>"/> - <b> <?= $comment->author ?> </b> - </div> - <ul> - <li> <?= $comment->url ?> </li> - <li> <?= $comment->email ?> </li> - </ul> - <div> - <?= $comment->text ?> - </div> - <div> - <? $item = $comment->item(); ?> - <a href="<?= $item->url() ?>"> - <img src="<?= $item->thumb_url() ?>" - alt="<?= $item->title ?>" - <?= photo::img_dimensions($item->thumb_width, $item->thumb_height, 75) ?> - /> - </a> - <?= t("Comment left on {{item_title}}", - array("item_title" => sprintf("<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="javascript:set_state('unpublished',<?=$comment->id?>)"> - <?= t("Unapprove") ?> - </a> - </li> - <? endif ?> - - <? if ($comment->state != "published"): ?> - <li> - <a href="javascript:set_state('published',<?=$comment->id?>)"> - <?= t("Approve") ?> - </a> - </li> - <? endif ?> - - <? if ($comment->state != "spam"): ?> - <li> - <a href="javascript:set_state('spam',<?=$comment->id?>)"> - <?= t("Spam") ?> - </a> - </li> - <? endif ?> - - <li> - <a href="javascript:del(<?=$comment->id?>)"> - <?= t("Delete") ?> - </a> - </li> - </ul> - </td> - </tr> - <? endforeach ?> - </table> - </div> </div> diff --git a/themes/admin_default/css/screen.css b/themes/admin_default/css/screen.css index 56bb03f1..8c6a9ed2 100644 --- a/themes/admin_default/css/screen.css +++ b/themes/admin_default/css/screen.css @@ -2,13 +2,6 @@ * Gallery 3 Default Admin Theme Screen Styles * * Extends themes/default/css/screen.css - * - * - * @todo Default user icon (user w/ camera) - * @todo Group Credits and gLoginMenu seperator styles - * @todo Apply :hover bg image to #gViewMenu (will clear fix correct this?) - * @todo Refactor form layout styles to reserve room for validation messages in default state. This - * will eliminate layout shifts when validation messages are displayed. */ /** ******************************************************************* @@ -88,3 +81,9 @@ height: 0; visibility: hidden; } + +#gBulkAction label, +#gBulkAction input[type="submit"], +#gBulkAction select { + display: inline; +} diff --git a/themes/default/css/screen.css b/themes/default/css/screen.css index f81fc2b0..c433970b 100644 --- a/themes/default/css/screen.css +++ b/themes/default/css/screen.css @@ -131,8 +131,7 @@ label { } input[type="text"], -input[type="password"], -select { +input[type="password"] { width: 50%; } @@ -175,9 +174,6 @@ input[type="submit"] { option { } -optgroup { -} - select { } |