improve formatting

This commit is contained in:
Dennis Eichhorn 2023-10-19 23:42:53 +00:00
parent f47ec80d30
commit d9f94c9396
3 changed files with 70 additions and 11 deletions

View File

@ -38,7 +38,10 @@ $tasksList = $this->data['tasks'] ?? [];
);
?>
<tr data-href="<?= $url; ?>">
<td><a href="<?= $url; ?>"><span class="tag <?= $this->printHtml('task-status-' . $task->getStatus()); ?>"><?= $this->getHtml('S' . $task->getStatus(), 'Tasks'); ?></span></a>
<td><a href="<?= $url; ?>">
<span class="tag <?= $this->printHtml('task-status-' . $task->getStatus()); ?>">
<?= $this->getHtml('S' . $task->getStatus(), 'Tasks'); ?>
</span></a>
<td><a href="<?= $url; ?>">
<?php if ($task->getPriority() === TaskPriority::NONE) : ?>
<?= $this->printHtml($task->due->format('Y-m-d H:i')); ?>

View File

@ -81,11 +81,24 @@ echo $this->data['nav']->render(); ?>
<td data-label="<?= $this->getHtml('Tag'); ?>">
<?php $tags = $task->getTags(); foreach ($tags as $tag) : ?>
<a href="<?= $url; ?>">
<span class="tag" style="background: <?= $this->printHtml($tag->color); ?>"><?= empty($tag->icon) ? '' : '<i class="' . $this->printHtml($tag->icon) . '"></i>'; ?><?= $this->printHtml($tag->getL11n()); ?></span>
<span class="tag" style="background: <?= $this->printHtml($tag->color); ?>">
<?= empty($tag->icon) ? '' : '<i class="' . $this->printHtml($tag->icon) . '"></i>'; ?>
<?= $this->printHtml($tag->getL11n()); ?>
</span>
</a>
<?php endforeach; ?>
<td data-label="<?= $this->getHtml('Creator'); ?>">
<a class="content" href="<?= UriFactory::build('{/base}/profile/single?{?}&for=' . $task->createdBy->id); ?>"><?= $this->printHtml($this->renderUserName('%3$s %2$s %1$s', [$task->createdBy->name1, $task->createdBy->name2, $task->createdBy->name3, $task->createdBy->login ?? ''])); ?></a>
<a class="content" href="<?= UriFactory::build('{/base}/profile/single?{?}&for=' . $task->createdBy->id); ?>">
<?= $this->printHtml($this->renderUserName(
'%3$s %2$s %1$s',
[
$task->createdBy->name1,
$task->createdBy->name2,
$task->createdBy->name3,
$task->createdBy->login ?? ''
])
); ?>
</a>
<td data-label="<?= $this->getHtml('Created'); ?>">
<a href="<?= $url; ?>"><?= $this->printHtml($task->createdAt->format('Y-m-d H:i')); ?></a>
<?php endforeach; if ($c == 0) : ?>
@ -142,11 +155,24 @@ echo $this->data['nav']->render(); ?>
<td data-label="<?= $this->getHtml('Tag'); ?>">
<?php $tags = $task->getTags(); foreach ($tags as $tag) : ?>
<a href="<?= $url; ?>">
<span class="tag" style="background: <?= $this->printHtml($tag->color); ?>"><?= empty($tag->icon) ? '' : '<i class="' . $this->printHtml($tag->icon) . '"></i>'; ?><?= $this->printHtml($tag->getL11n()); ?></span>
<span class="tag" style="background: <?= $this->printHtml($tag->color); ?>">
<?= empty($tag->icon) ? '' : '<i class="' . $this->printHtml($tag->icon) . '"></i>'; ?>
<?= $this->printHtml($tag->getL11n()); ?>
</span>
</a>
<?php endforeach; ?>
<td data-label="<?= $this->getHtml('Creator'); ?>">
<a class="content" href="<?= UriFactory::build('{/base}/profile/single?{?}&for=' . $task->createdBy->id); ?>"><?= $this->printHtml($this->renderUserName('%3$s %2$s %1$s', [$task->createdBy->name1, $task->createdBy->name2, $task->createdBy->name3, $task->createdBy->login ?? ''])); ?></a>
<a class="content" href="<?= UriFactory::build('{/base}/profile/single?{?}&for=' . $task->createdBy->id); ?>">
<?= $this->printHtml($this->renderUserName(
'%3$s %2$s %1$s',
[
$task->createdBy->name1,
$task->createdBy->name2,
$task->createdBy->name3,
$task->createdBy->login ?? ''
])
); ?>
</a>
<td data-label="<?= $this->getHtml('Created'); ?>">
<a href="<?= $url; ?>"><?= $this->printHtml($task->createdAt->format('Y-m-d H:i')); ?></a>
<?php endforeach; if ($c == 0) : ?>
@ -208,11 +234,24 @@ echo $this->data['nav']->render(); ?>
<td data-label="<?= $this->getHtml('Tag'); ?>">
<?php $tags = $task->getTags(); foreach ($tags as $tag) : ?>
<a href="<?= $url; ?>">
<span class="tag" style="background: <?= $this->printHtml($tag->color); ?>"><?= empty($tag->icon) ? '' : '<i class="' . $this->printHtml($tag->icon) . '"></i>'; ?><?= $this->printHtml($tag->getL11n()); ?></span>
<span class="tag" style="background: <?= $this->printHtml($tag->color); ?>">
<?= empty($tag->icon) ? '' : '<i class="' . $this->printHtml($tag->icon) . '"></i>'; ?>
<?= $this->printHtml($tag->getL11n()); ?>
</span>
</a>
<?php endforeach; ?>
<td data-label="<?= $this->getHtml('Creator'); ?>">
<a class="content" href="<?= UriFactory::build('{/base}/profile/single?{?}&for=' . $task->createdBy->id); ?>"><?= $this->printHtml($this->renderUserName('%3$s %2$s %1$s', [$task->createdBy->name1, $task->createdBy->name2, $task->createdBy->name3, $task->createdBy->login ?? ''])); ?></a>
<a class="content" href="<?= UriFactory::build('{/base}/profile/single?{?}&for=' . $task->createdBy->id); ?>">
<?= $this->printHtml($this->renderUserName(
'%3$s %2$s %1$s',
[
$task->createdBy->name1,
$task->createdBy->name2,
$task->createdBy->name3,
$task->createdBy->login ?? ''
])
); ?>
</a>
<td data-label="<?= $this->getHtml('Created'); ?>">
<a href="<?= $url; ?>"><?= $this->printHtml($task->createdAt->format('Y-m-d H:i')); ?></a>
<?php endforeach; if ($c == 0) : ?>
@ -280,11 +319,24 @@ echo $this->data['nav']->render(); ?>
<td data-label="<?= $this->getHtml('Tag'); ?>">
<?php $tags = $task->getTags(); foreach ($tags as $tag) : ?>
<a href="<?= $url; ?>">
<span class="tag" style="background: <?= $this->printHtml($tag->color); ?>"><?= empty($tag->icon) ? '' : '<i class="' . $this->printHtml($tag->icon) . '"></i>'; ?><?= $this->printHtml($tag->getL11n()); ?></span>
<span class="tag" style="background: <?= $this->printHtml($tag->color); ?>">
<?= empty($tag->icon) ? '' : '<i class="' . $this->printHtml($tag->icon) . '"></i>'; ?>
<?= $this->printHtml($tag->getL11n()); ?>
</span>
</a>
<?php endforeach; ?>
<td data-label="<?= $this->getHtml('Creator'); ?>">
<a class="content" href="<?= UriFactory::build('{/base}/profile/single?{?}&for=' . $task->createdBy->id); ?>"><?= $this->printHtml($this->renderUserName('%3$s %2$s %1$s', [$task->createdBy->name1, $task->createdBy->name2, $task->createdBy->name3, $task->createdBy->login ?? ''])); ?></a>
<a class="content" href="<?= UriFactory::build('{/base}/profile/single?{?}&for=' . $task->createdBy->id); ?>">
<?= $this->printHtml($this->renderUserName(
'%3$s %2$s %1$s',
[
$task->createdBy->name1,
$task->createdBy->name2,
$task->createdBy->name3,
$task->createdBy->login ?? ''
])
); ?>
</a>
<td data-label="<?= $this->getHtml('Created'); ?>">
<a href="<?= $url; ?>"><?= $this->printHtml($task->createdAt->format('Y-m-d H:i')); ?></a>
<?php endforeach; if ($c == 0) : ?>

View File

@ -87,12 +87,16 @@ echo $this->data['nav']->render(); ?>
<?php
$tags = $task->getTags();
foreach ($tags as $tag) : ?>
<span class="tag" style="background: <?= $this->printHtml($tag->color); ?>"><?= empty($tag->icon) ? '' : '<i class="' . $this->printHtml($tag->icon) . '"></i>'; ?><?= $this->printHtml($tag->getL11n()); ?></span>
<span class="tag" style="background: <?= $this->printHtml($tag->color); ?>">
<?= empty($tag->icon) ? '' : '<i class="' . $this->printHtml($tag->icon) . '"></i>'; ?><?= $this->printHtml($tag->getL11n()); ?>
</span>
<?php endforeach; ?>
<?php if (!empty($taskMedia)) : ?>
<div>
<?php foreach ($taskMedia as $media) : ?>
<span><a class="content" href="<?= UriFactory::build('{/base}/media/single?id=' . $media->id);?>"><?= $media->name; ?></a></span>
<span>
<a class="content" href="<?= UriFactory::build('{/base}/media/single?id=' . $media->id);?>"><?= $media->name; ?></a>
</span>
<?php endforeach; ?>
</div>
<?php endif; ?>