From 6e6bae7e1d08dd5f9ad36f6a82d0dd7b9b5d831f Mon Sep 17 00:00:00 2001 From: tp_dhu Date: Mon, 17 Feb 2025 01:22:07 +0000 Subject: [PATCH] initial project commit --- app/controllers/ProjectController.php | 29 ++++++ public/index.php | 9 +- ui/templates/layout.html | 1 + ui/views/project/index.html | 134 ++++++++++++++++++++++++++ ui/views/project/view.html | 0 5 files changed, 172 insertions(+), 1 deletion(-) create mode 100644 app/controllers/ProjectController.php create mode 100644 ui/views/project/index.html create mode 100644 ui/views/project/view.html diff --git a/app/controllers/ProjectController.php b/app/controllers/ProjectController.php new file mode 100644 index 0000000..322559f --- /dev/null +++ b/app/controllers/ProjectController.php @@ -0,0 +1,29 @@ +check_access($f3); + $f3->set('content', '../ui/views/project/index.html'); + echo \Template::instance()->render('../ui/templates/layout.html'); + } + + // create a new project + public function createForm($f3){ + + } + public function create($f3){ + + } + + // show project details including links, tickets, events, tasks + public function view($f3){} + + // update project details + public function editForm($f3){} + public function update($f3){} + + } \ No newline at end of file diff --git a/public/index.php b/public/index.php index 540bbf8..24c553b 100644 --- a/public/index.php +++ b/public/index.php @@ -84,8 +84,15 @@ $f3->route('POST /parsedown/preview', 'ParsedownPreview->view'); // dashboard $f3->route('GET /dashboard', 'DashboardController->index'); +// projects +$f3->route('GET /projects', 'ProjectController->index'); +$f3->route('GET /project/@id', 'ProjectController->view'); +$f3->route('GET /project/create', 'ProjectController->createForm'); +$f3->route('POST /project/create', 'ProjectController->create'); +$f3->route('GET /project/@id/edit', 'ProjectController->editForm'); +$f3->route('POST /project/@id/update', 'ProjectController->update'); -// additional routes +// additional routes - user $f3->route('GET /users', 'UserController->index'); $f3->route('GET /user/@id/edit', 'UserController->editForm'); $f3->route('POST /user/@id/update', 'UserController->update'); diff --git a/ui/templates/layout.html b/ui/templates/layout.html index d1e4475..672f845 100644 --- a/ui/templates/layout.html +++ b/ui/templates/layout.html @@ -42,6 +42,7 @@