Fix increment to pre-increment

This commit is contained in:
Dennis Eichhorn 2019-05-19 19:08:35 +02:00
parent e90478480f
commit a058470e57
3 changed files with 3 additions and 3 deletions

View File

@ -6,7 +6,7 @@
<td class="full"><?= $this->getHtml('Title', 'Tasks') ?>
<tfoot>
<tbody>
<?php $c = 0; foreach ($this->tasks as $key => $task) : $c++;
<?php $c = 0; foreach ($this->tasks as $key => $task) : ++$c;
$url = \phpOMS\Uri\UriFactory::build('{/prefix}task/single?{?}&id=' . $task->getId());
$color = 'darkred';
if ($task->getStatus() === \Modules\Tasks\Models\TaskStatus::DONE) { $color = 'green'; }

View File

@ -35,7 +35,7 @@ echo $this->getData('nav')->render(); ?>
<tfoot>
<tbody>
<?php
$c = 0; foreach ($tasks as $key => $task) : $c++;
$c = 0; foreach ($tasks as $key => $task) : ++$c;
$url = \phpOMS\Uri\UriFactory::build('{/prefix}task/single?{?}&id=' . $task->getId());
?>
<tr data-href="<?= $url; ?>">

View File

@ -122,7 +122,7 @@ echo $this->getData('nav')->render(); ?>
</div>
</template>
<?php $c = 0; $previous = null;
foreach ($elements as $key => $element) : $c++;
foreach ($elements as $key => $element) : ++$c;
if ($element->getDescription() !== '') :
?>
<section id="taskelmenet-<?= $c; ?>" class="box wf-100 taskelement"