From 83c255383258747fb0f9afd2520a6d43323f30e2 Mon Sep 17 00:00:00 2001 From: Zachary Doll Date: Tue, 12 Nov 2013 10:16:31 -0600 Subject: [PATCH] Moved actions controller to action controller for consistency --- ...ionscontroller.php => class.actioncontroller.php} | 12 ++++++------ views/{actions => action}/add.php | 0 views/{actions => action}/settings.php | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) rename controllers/{class.actionscontroller.php => class.actioncontroller.php} (87%) rename views/{actions => action}/add.php (100%) rename views/{actions => action}/settings.php (73%) diff --git a/controllers/class.actionscontroller.php b/controllers/class.actioncontroller.php similarity index 87% rename from controllers/class.actionscontroller.php rename to controllers/class.actioncontroller.php index 9f31253..42096a0 100644 --- a/controllers/class.actionscontroller.php +++ b/controllers/class.actioncontroller.php @@ -2,12 +2,12 @@ /* Copyright 2013 Zachary Doll */ /** - * All is the base class for controllers throughout the gamification applicati0n. + * Manage actions that are available for reactions * * @since 1.0 * @package Yaga */ -class ActionsController extends DashboardController { +class ActionController extends DashboardController { /** @var array List of objects to prep. They will be available as $this->$Name. */ public $Uses = array('Form', 'ActionModel'); @@ -42,7 +42,7 @@ class ActionsController extends DashboardController { public function Settings($Page = '') { $this->Permission('Yaga.Reactions.Manage'); - $this->AddSideMenu('actions/settings'); + $this->AddSideMenu('action/settings'); $this->Title('Manage Reactions'); @@ -54,7 +54,7 @@ class ActionsController extends DashboardController { public function Edit($ActionID = NULL) { $this->Permission('Yaga.Reactions.Manage'); - $this->AddSideMenu('actions/settings'); + $this->AddSideMenu('action/settings'); $this->Form->SetModel($this->ActionModel); $Edit = FALSE; @@ -83,7 +83,7 @@ class ActionsController extends DashboardController { $NewActionRow .= "$Action->Description"; $NewActionRow .= "$Action->Tooltip"; $NewActionRow .= "$Action->AwardValue"; - $NewActionRow .= '' . Anchor(T('Edit'), 'yaga/actions/edit/' . $Action->ActionID, array('class' => 'Popup SmallButton')) . Anchor(T('Delete'), 'yaga/actions/delete/' . $Action->ActionID, array('class' => 'Hijack SmallButton')) . ''; + $NewActionRow .= '' . Anchor(T('Edit'), 'yaga/action/edit/' . $Action->ActionID, array('class' => 'Popup SmallButton')) . Anchor(T('Delete'), 'yaga/action/delete/' . $Action->ActionID, array('class' => 'Hijack SmallButton')) . ''; $NewActionRow .= ''; if($Edit) { $this->JsonTarget('#ActionID_' . $this->Action->ActionID, $NewActionRow, 'ReplaceWith'); @@ -108,7 +108,7 @@ class ActionsController extends DashboardController { throw PermissionException('Javascript'); } $this->Permission('Yaga.Reactions.Manage'); - $this->AddSideMenu('actions/settings'); + $this->AddSideMenu('action/settings'); $this->ActionModel->DeleteAction($ActionID); diff --git a/views/actions/add.php b/views/action/add.php similarity index 100% rename from views/actions/add.php rename to views/action/add.php diff --git a/views/actions/settings.php b/views/action/settings.php similarity index 73% rename from views/actions/settings.php rename to views/action/settings.php index e8ef690..c8b180d 100644 --- a/views/actions/settings.php +++ b/views/action/settings.php @@ -3,7 +3,7 @@ echo Wrap($this->Title(), 'h1'); echo Wrap(Wrap('Add or edit the available actions that can be used as reactions.', 'div'), 'div', array('class' => 'Wrap')); -echo Wrap(Anchor('Add Action', 'yaga/actions/add', array('class' => 'Popup SmallButton')), 'div', array('class' => 'Wrap')); +echo Wrap(Anchor('Add Action', 'yaga/action/add', array('class' => 'Popup SmallButton')), 'div', array('class' => 'Wrap')); ?> @@ -27,7 +27,7 @@ echo Wrap(Anchor('Add Action', 'yaga/actions/add', array('class' => 'Popup Small echo ""; echo ""; echo ""; - echo ''; + echo ''; echo ''; } ?>
$Action->Description$Action->Tooltip$Action->AwardValue' . Anchor(T('Edit'), 'yaga/actions/edit/' . $Action->ActionID, array('class' => 'Popup SmallButton')) . Anchor(T('Delete'), 'yaga/actions/delete/' . $Action->ActionID, array('class' => 'Hijack SmallButton')) . '' . Anchor(T('Edit'), 'yaga/action/edit/' . $Action->ActionID, array('class' => 'Popup SmallButton')) . Anchor(T('Delete'), 'yaga/action/delete/' . $Action->ActionID, array('class' => 'Hijack SmallButton')) . '