show priority changes like status changes

This commit is contained in:
Dennis Eichhorn 2020-06-11 11:04:36 +02:00
parent 47a3e9652d
commit bfefbd2bda
4 changed files with 22 additions and 4 deletions

View File

@ -40,6 +40,7 @@ return ['Tasks' => [
'Name' => 'Name',
'New' => 'Neu',
'Open' => 'Offen',
'priority_change' => '%s hat die Priorität am %s gesetzt zu',
'P0' => 'Nichts',
'P1' => 'Sehr Niedrig',
'P2' => 'Niedrig',
@ -62,7 +63,7 @@ return ['Tasks' => [
'Size' => 'Größe',
'Statistics' => 'Statistiken',
'Status' => 'Status',
'status_change' => '%s hat den Status am %s geändert zu',
'status_change' => '%s hat den Status am %s gesetzt zu',
'Task' => 'Task',
'Tasks' => 'Tasks',
'Template' => 'Template',

View File

@ -40,6 +40,7 @@ return ['Tasks' => [
'Name' => 'Name',
'New' => 'New',
'Open' => 'Open',
'priority_change' => '%s set the priority on %s to',
'P0' => 'None',
'P1' => 'Very Low',
'P2' => 'Low',
@ -51,7 +52,7 @@ return ['Tasks' => [
'Received' => 'Received',
'Redirected' => 'Redirected',
'S1' => 'Open',
'S2' => 'Working',
'S2' => 'In Progress',
'S3' => 'Suspended',
'S4' => 'Canceled',
'S5' => 'Done',
@ -62,7 +63,7 @@ return ['Tasks' => [
'Size' => 'Size',
'Statistics' => 'Statistics',
'Status' => 'Status',
'status_change' => '%s changed the status on %s to',
'status_change' => '%s set the status on %s to',
'Task' => 'Task',
'Tasks' => 'Tasks',
'Template' => 'Template',

View File

@ -49,7 +49,7 @@ echo $this->getData('nav')->render(); ?>
$c = 0; foreach ($tasks as $key => $task) : ++$c;
$url = UriFactory::build('{/prefix}task/single?{?}&id=' . $task->getId());
?>
<tr data-href="<?= $url; ?>">
<tr tabindex="0" data-href="<?= $url; ?>">
<td data-label="<?= $this->getHtml('Status') ?>">
<a href="<?= $url; ?>">
<span class="tag <?= $this->printHtml('task-status-' . $task->getStatus()); ?>">

View File

@ -184,6 +184,22 @@ echo $this->getData('nav')->render(); ?>
</section>
<?php endif; ?>
<?php if (($c === 1 && $element->getPriority() !== $task->getPriority())
|| ($previous !== null && $element->getPriority() !== $previous->getPriority())
) : ?>
<section class="box wf-100">
<div class="inner">
<?= $this->printHtml(\sprintf($this->getHtml('priority_change'),
$element->getCreatedBy()->getName1(),
$element->getCreatedAt()->format('Y-m-d H:i')
)); ?>
<span class="tag task-priority-<?= $this->printHtml($element->getPriority()); ?>">
<?= $this->getHtml('P' . $element->getPriority()) ?>
</span>
</div>
</section>
<?php endif; ?>
<?php if ($element->getDescription() !== '') : ?>
<section id="taskelmenet-<?= $element->getId(); ?>" class="portlet taskElement"
data-update-content="#elements"