Permalink
Browse files

Rename admin/comments to admin/manage_comments to make room for

admin/comments to be a settings page.
  • Loading branch information...
1 parent c682ba8 commit 2157285d9bc3373e9bd2f4d86f558a1b2554f412 @bharat bharat committed May 17, 2010
View
14 ...es/comment/controllers/admin_comments.php → ...ent/controllers/admin_manage_comments.php
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
*/
-class Admin_Comments_Controller extends Admin_Controller {
+class Admin_Manage_Comments_Controller extends Admin_Controller {
private static $items_per_page = 20;
public function index() {
@@ -29,7 +29,7 @@ public function index() {
->execute();
// Redirect to the appropriate queue
- url::redirect("admin/comments/queue/unpublished");
+ url::redirect("admin/manage_comments/queue/unpublished");
}
public function menu_labels() {
@@ -71,25 +71,25 @@ private function _menu($counts) {
->label(t2("Awaiting Moderation (%count)",
"Awaiting Moderation (%count)",
$counts->unpublished))
- ->url(url::site("admin/comments/queue/unpublished")))
+ ->url(url::site("admin/manage_comments/queue/unpublished")))
->append(Menu::factory("link")
->id("published")
->label(t2("Approved (%count)",
"Approved (%count)",
$counts->published))
- ->url(url::site("admin/comments/queue/published")))
+ ->url(url::site("admin/manage_comments/queue/published")))
->append(Menu::factory("link")
->id("spam")
->label(t2("Spam (%count)",
"Spam (%count)",
$counts->spam))
- ->url(url::site("admin/comments/queue/spam")))
+ ->url(url::site("admin/manage_comments/queue/spam")))
->append(Menu::factory("link")
->id("deleted")
->label(t2("Recently Deleted (%count)",
"Recently Deleted (%count)",
$counts->deleted))
- ->url(url::site("admin/comments/queue/deleted")));
+ ->url(url::site("admin/manage_comments/queue/deleted")));
}
private function _counts() {
@@ -127,7 +127,7 @@ public function delete_all_spam() {
->delete("comments")
->where("state", "=", "spam")
->execute();
- url::redirect("admin/comments/queue/spam");
+ url::redirect("admin/manage_comments/queue/spam");
}
}
View
10 modules/comment/helpers/comment_event.php
@@ -51,11 +51,19 @@ static function identity_provider_changed($old_provider, $new_provider) {
}
static function admin_menu($menu, $theme) {
+ /*
+ $menu->get("settings_menu")
+ ->append(Menu::factory("link")
+ ->id("comment")
+ ->label(t("Comments"))
+ ->url(url::site("admin/comments")));
+ */
+
$menu->get("content_menu")
->append(Menu::factory("link")
->id("comments")
->label(t("Comments"))
- ->url(url::site("admin/comments")));
+ ->url(url::site("admin/manage_comments")));
}
static function photo_menu($menu, $theme) {
View
8 modules/comment/views/admin_comments.html.php
@@ -1,7 +1,7 @@
<?php defined("SYSPATH") or die("No direct script access.") ?>
<script type="text/javascript">
var set_state_url =
- <?= html::js_string(url::site("admin/comments/set_state/__ID__/__STATE__?csrf=$csrf")) ?>;
+ <?= html::js_string(url::site("admin/manage_comments/set_state/__ID__/__STATE__?csrf=$csrf")) ?>;
function set_state(state, id) {
$.get(set_state_url.replace("__STATE__", state).replace("__ID__", id),
{},
@@ -12,7 +12,7 @@ function() {
}
var delete_url =
- <?= html::js_string(url::site("admin/comments/delete/__ID__?csrf=$csrf")) ?>;
+ <?= html::js_string(url::site("admin/manage_comments/delete/__ID__?csrf=$csrf")) ?>;
function del(id) {
$.get(delete_url.replace("__ID__", id),
@@ -24,7 +24,7 @@ function() {
}
function update_menu() {
- $.get(<?= html::js_string(url::site("admin/comments/menu_labels")) ?>, {},
+ $.get(<?= html::js_string(url::site("admin/manage_comments/menu_labels")) ?>, {},
function(data) {
for (var i = 0; i < data.length; i++) {
$("#g-admin-comments-menu li:eq(" + i + ") a").html(data[i]);
@@ -73,7 +73,7 @@ function(data) {
$counts->spam) ?>
</p>
<p>
- <a href="<?= url::site("admin/comments/delete_all_spam?csrf=$csrf") ?>">
+ <a href="<?= url::site("admin/manage_comments/delete_all_spam?csrf=$csrf") ?>">
<?= t("Delete all spam") ?>
</a>
<? else: ?>

0 comments on commit 2157285

Please sign in to comment.