From 9954e59224e1cf010a0e79059e83d1c43f8b4223 Mon Sep 17 00:00:00 2001 From: Dennis Eichhorn Date: Thu, 2 May 2024 22:54:39 +0000 Subject: [PATCH] Went through todos --- Controller/ApiController.php | 3 +-- Models/QAAnswer.php | 4 ++++ Models/QAQuestion.php | 4 ++++ Theme/Backend/qa-question.tpl.php | 10 +++++----- Theme/Backend/qa-tag-list.tpl.php | 2 +- 5 files changed, 15 insertions(+), 8 deletions(-) diff --git a/Controller/ApiController.php b/Controller/ApiController.php index 4dbb763..da78f01 100755 --- a/Controller/ApiController.php +++ b/Controller/ApiController.php @@ -60,8 +60,7 @@ final class ApiController extends Controller * * @return void * - * @todo Create another notification whenever a comment is created for a question or answer - * The question/answer owner should receive a notification + * @performance This should happen in the cli if possible? * * @since 1.0.0 */ diff --git a/Models/QAAnswer.php b/Models/QAAnswer.php index d6e53b9..359b88a 100755 --- a/Models/QAAnswer.php +++ b/Models/QAAnswer.php @@ -78,6 +78,10 @@ class QAAnswer implements \JsonSerializable /** * Created by. * + * @todo Answers and questions reference a profile. + * This goes against almost every other model. Use the account instead. + * https://github.com/Karaka-Management/oms-QA/issues/8 + * * @var Profile * @since 1.0.0 */ diff --git a/Models/QAQuestion.php b/Models/QAQuestion.php index acc0760..f739d9a 100755 --- a/Models/QAQuestion.php +++ b/Models/QAQuestion.php @@ -80,6 +80,10 @@ class QAQuestion implements \JsonSerializable /** * Created by. * + * @todo Answers and questions reference a profile. + * This goes against almost every other model. Use the account instead. + * https://github.com/Karaka-Management/oms-QA/issues/8 + * * @var Profile * @since 1.0.0 */ diff --git a/Theme/Backend/qa-question.tpl.php b/Theme/Backend/qa-question.tpl.php index 2f52c7e..a4db191 100755 --- a/Theme/Backend/qa-question.tpl.php +++ b/Theme/Backend/qa-question.tpl.php @@ -38,7 +38,7 @@ echo $this->data['nav']->render(); "key": 1, "listener": "click", "action": [ {"key": 1, "type": "event.prevent"}, {"key": 2, "type": "message.request", "uri": "id);?>&type=1", "method": "PUT", "request_type": "json"}, - {"key": 3, "type": "dom.reload", "delay": 0} + {"key": 3, "type": "redirect", "uri": "{%}", "delay": 0} ] } ]' href="#"> @@ -53,7 +53,7 @@ echo $this->data['nav']->render(); "key": 1, "listener": "click", "action": [ {"key": 1, "type": "event.prevent"}, {"key": 2, "type": "message.request", "uri": "id);?>&type=-1", "method": "PUT", "request_type": "json"}, - {"key": 3, "type": "dom.reload", "delay": 0} + {"key": 3, "type": "redirect", "uri": "{%}", "delay": 0} ] } ]' href="#"> @@ -143,7 +143,7 @@ echo $this->data['nav']->render(); "key": 1, "listener": "click", "action": [ {"key": 1, "type": "event.prevent"}, {"key": 2, "type": "message.request", "uri": "id);?>&type=1", "method": "PUT", "request_type": "json"}, - {"key": 3, "type": "dom.reload", "delay": 0} + {"key": 3, "type": "redirect", "uri": "{%}", "delay": 0} ] } ]' href="#"> @@ -158,7 +158,7 @@ echo $this->data['nav']->render(); "key": 1, "listener": "click", "action": [ {"key": 1, "type": "event.prevent"}, {"key": 2, "type": "message.request", "uri": "id);?>&type=-1", "method": "PUT", "request_type": "json"}, - {"key": 3, "type": "dom.reload", "delay": 0} + {"key": 3, "type": "redirect", "uri": "{%}", "delay": 0} ] } ]' href="#"> @@ -173,7 +173,7 @@ echo $this->data['nav']->render(); "key": 1, "listener": "click", "action": [ {"key": 1, "type": "event.prevent"}, {"key": 2, "type": "message.request", "uri": "id);?>&type=1", "method": "PUT", "request_type": "json"}, - {"key": 3, "type": "dom.reload", "delay": 0} + {"key": 3, "type": "redirect", "uri": "{%}", "delay": 0} ] } ]' href="#"> diff --git a/Theme/Backend/qa-tag-list.tpl.php b/Theme/Backend/qa-tag-list.tpl.php index d3b1640..f8628e9 100755 --- a/Theme/Backend/qa-tag-list.tpl.php +++ b/Theme/Backend/qa-tag-list.tpl.php @@ -30,7 +30,7 @@ echo $this->data['nav']->render(); data['tags'] as $key => $value) : ++$c; - $url = \phpOMS\Uri\UriFactory::build('{/base}/admin/account/settings?{?}&id=' . $value->id); ?> + $url = \phpOMS\Uri\UriFactory::build('{/base}/admin/account/view?{?}&id=' . $value->id); ?> id; ?> printHtml($value->name); ?>