diff --git a/README.md b/README.md index fb57e5a..cf25db8 100644 --- a/README.md +++ b/README.md @@ -7,4 +7,8 @@ Used to keep track of ongoing projects/tasks, allow to view and search historic ## Plesk - quest notes - plesk ext composer --application -register -domain desk.tinylink.uk -path desk.tinylink.uk/tp_servicedesk - ~ https://www.plesk.com/kb/support/how-to-change-in-the-php-composer-extension-the-path-of-the-composer-json-file/ \ No newline at end of file + ~ https://www.plesk.com/kb/support/how-to-change-in-the-php-composer-extension-the-path-of-the-composer-json-file/ + +## Milestones +- Database created locally +- .gitignore added diff --git a/app/controllers/HomeController.php b/app/controllers/HomeController.php new file mode 100644 index 0000000..61e3cd2 --- /dev/null +++ b/app/controllers/HomeController.php @@ -0,0 +1,15 @@ +get('DB'); + // echo \Template::instance()->render('../ui/views/home.html'); + + echo \Template::instance()->render('../ui/views/home.html'); + + // Query + // View + } + // ... +} \ No newline at end of file diff --git a/public/index.php b/public/index.php new file mode 100644 index 0000000..7a58777 --- /dev/null +++ b/public/index.php @@ -0,0 +1,39 @@ +set('DEBUG', 3); // development debug +$f3->config('../app/.env.cfg'); + +// Routing and Controller Setup + +// home +$f3->route('GET /', 'HomeController->display'); + +// auth +$f3->route('GET /login', 'Auth->login'); +$f3->route('POST /login', 'Auth->login'); +$f3->route('GET /logout', 'Auth->logout'); + +// tickets - CRUD (CREATE, READ, UPDATE, DELETE) +$f3->route('GET /tickets', 'Tickets->list'); // view all tickets +$f3->route('GET /ticket/create', 'Tickets->create'); // show form to create +$f3->route('POST /ticket/create', 'Tickets->create'); // save +$f3->route('GET /ticket/@id', 'Tickets->read'); // view ticket details +$f3->route('GET /ticket/@id/edit', 'Tickets->edit'); // edit ticket +$f3->route('POST /ticket/@id/update', 'Tickets->update(PARAMS.id)'); // + + +// knowledgebase +$f3->route('GET /kb', 'KB->list'); +$f3->route('GET /kb/create', 'KB->create'); +$f3->route('GET /kb/@id', 'KB->read'); +$f3->route('GET /kb/@id/edit', 'KB->edit'); +$f3->route('POST /kb/@id/edit', 'KB->update'); + +// tags +$f3->route('GET /tags', 'Tag->list'); +$f3->route('POST /tag/create', 'Tag->create'); + +$f3->run(); \ No newline at end of file diff --git a/public/logo.svg b/public/logo.svg new file mode 100644 index 0000000..b02f76f --- /dev/null +++ b/public/logo.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/public/style.css b/public/style.css new file mode 100644 index 0000000..41b2afb --- /dev/null +++ b/public/style.css @@ -0,0 +1,6 @@ +html, body {padding:0; margin:0;} +html, body, #sidebar, #page,#base_body { + min-height: 100% +} + +#page { min-height: calc(100vh - 170px - 52px) } \ No newline at end of file diff --git a/ui/views/home.html b/ui/views/home.html new file mode 100644 index 0000000..d9427c7 --- /dev/null +++ b/ui/views/home.html @@ -0,0 +1,76 @@ + + + + + + + Bulma Dashboard + + + + + + + + + + +
+
+ + @content +
+
+ + + + + + + + \ No newline at end of file