From d8f7264898d59a261c0e65e525502143259415ad Mon Sep 17 00:00:00 2001 From: Malf Furious Date: Wed, 8 Jun 2016 21:29:32 -0400 Subject: Create blank view for groups Finish initializing the Obj MVC by writing an empty view/action for groups. --- app/controller/obj.control.php | 5 +++-- app/model/obj.mod.php | 8 ++++++++ app/view/obj/group.view.php | 27 +++++++++++++++++++++++++++ 3 files changed, 38 insertions(+), 2 deletions(-) create mode 100644 app/view/obj/group.view.php diff --git a/app/controller/obj.control.php b/app/controller/obj.control.php index f341b48..08172b5 100644 --- a/app/controller/obj.control.php +++ b/app/controller/obj.control.php @@ -34,14 +34,15 @@ class Obj extends Controller switch ($obj->type) { case "group": - $this->action_group($mod, $argv[0]); + $this->action_group($mod, $obj->guid); break; } } function action_group($mod, $guid) { - /* TODO */ + $mod->initGroup($guid); + include "view/obj/group.view.php"; } } diff --git a/app/model/obj.mod.php b/app/model/obj.mod.php index bccef93..07be4b4 100644 --- a/app/model/obj.mod.php +++ b/app/model/obj.mod.php @@ -15,9 +15,17 @@ */ require_once "model/common.mod.php"; +require_once "class/group.class.php"; class ObjModel extends CommonModel { + /* + * Initialize a group view + */ + function initGroup($guid) + { + $this->group = new Group($guid); + } } ?> diff --git a/app/view/obj/group.view.php b/app/view/obj/group.view.php new file mode 100644 index 0000000..3c0a1cb --- /dev/null +++ b/app/view/obj/group.view.php @@ -0,0 +1,27 @@ + + + + + + + + Scrott - <?=$mod->group->name?> + + + + + + + -- cgit v1.2.3