template fixes + bug fixes + style fixes

This commit is contained in:
Dennis Eichhorn 2024-04-02 21:40:47 +00:00
parent 5ae8ab5c0d
commit e894f1de2f
6 changed files with 20 additions and 11 deletions

View File

@ -73,7 +73,7 @@ return [
],
],
],
'^/checklist/template/task(\?.*$|$)' => [
'^/checklist/template/task/view(\?.*$|$)' => [
[
'dest' => '\Modules\Checklist\Controller\BackendController:viewChecklistTemplateTaskView',
'verb' => RouteVerb::GET,
@ -84,4 +84,15 @@ return [
],
],
],
'^/checklist/template/task/create(\?.*$|$)' => [
[
'dest' => '\Modules\Checklist\Controller\BackendController:viewChecklistTemplateTaskCreate',
'verb' => RouteVerb::GET,
'permission' => [
'module' => BackendController::NAME,
'type' => PermissionType::CREATE,
'state' => PermissionCategory::TEMPLATE,
],
],
],
];

View File

@ -53,7 +53,7 @@ final class BackendController extends Controller
$view->data['checklists'] = ChecklistMapper::getAll()
->sort('id', OrderType::DESC)
->execute();
->executeGetArray();
return $view;
}
@ -110,7 +110,7 @@ final class BackendController extends Controller
$view->data['templates'] = ChecklistTemplateMapper::getAll()
->sort('id', OrderType::DESC)
->execute();
->executeGetArray();
return $view;
}

View File

@ -26,7 +26,7 @@ return ['Checklist' => [
'Templates' => 'Vorlagen',
'TimeInMinutes' => 'Zeit in Minuten.',
'Title' => 'Titel',
'Template' => 'Template',
'Template' => 'Template',
'Start' => 'Start',
'End' => 'Ende',
'End' => 'Ende',
]];

View File

@ -26,7 +26,7 @@ return ['Checklist' => [
'Templates' => 'Templates',
'TimeInMinutes' => 'Time in minutes',
'Title' => 'Title',
'Template' => 'Template',
'Template' => 'Template',
'Start' => 'Start',
'End' => 'End',
'End' => 'End',
]];

View File

@ -12,8 +12,6 @@
*/
declare(strict_types=1);
use phpOMS\Uri\UriFactory;
/**
* @var \phpOMS\Views\View $this
*/

View File

@ -92,7 +92,7 @@ echo $this->data['nav']->render(); ?>
<div class="portlet-head">
<?= $this->getHtml('Tasks'); ?>
<span class="end-xs">
<a class="button" href="<?= \phpOMS\Uri\UriFactory::build('{/base}/checklist/template/task?{?}&csrf={$CSRF}'); ?>"><?= $this->getHtml('Add', '0', '0'); ?></a>
<a class="button" href="<?= \phpOMS\Uri\UriFactory::build('{/base}/checklist/template/task/create?{?}&csrf={$CSRF}'); ?>"><?= $this->getHtml('Add', '0', '0'); ?></a>
</span>
</div>
<div class="slider">
@ -105,7 +105,7 @@ echo $this->data['nav']->render(); ?>
<tbody>
<?php $c = 0;
foreach ($this->data['template']->tasks as $key => $task) : ++$c;
$url = \phpOMS\Uri\UriFactory::build('{/base}/checklist/template/task?{?}&id=' . $task->id);
$url = \phpOMS\Uri\UriFactory::build('{/base}/checklist/template/task/view?{?}&id=' . $task->id);
?>
<tr data-href="<?= $url; ?>">
<td><?php if ($task->priority === TaskPriority::NONE) : ?>