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

View File

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

View File

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

View File

@ -184,6 +184,22 @@ echo $this->getData('nav')->render(); ?>
</section> </section>
<?php endif; ?> <?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() !== '') : ?> <?php if ($element->getDescription() !== '') : ?>
<section id="taskelmenet-<?= $element->getId(); ?>" class="portlet taskElement" <section id="taskelmenet-<?= $element->getId(); ?>" class="portlet taskElement"
data-update-content="#elements" data-update-content="#elements"