add unread tasks tab

This commit is contained in:
Dennis Eichhorn 2023-05-06 23:16:36 +00:00
parent 4be63bbeba
commit 262c488f21

View File

@ -26,132 +26,262 @@ $open = $this->getData('open');
echo $this->getData('nav')->render(); ?> echo $this->getData('nav')->render(); ?>
<?php <div class="tabview tab-2">
if ($open !== null) : <div class="box wf-100 col-xs-12">
?> <ul class="tab-links">
<div class="row"> <li><label for="c-tab-1"><?= $this->getHtml('Overview'); ?></label></li>
<div class="col-xs-12"> <li><label for="c-tab-2"><?= $this->getHtml('Unread'); ?></label></li>
<div class="portlet"> </ul>
<div class="portlet-head"><?= $this->getHtml('Open'); ?> (<?= \count($open); ?>)<i class="fa fa-download floatRight download btn"></i></div> </div>
<div class="slider"> <div class="tab-content">
<table id="taskList" class="default sticky"> <input type="radio" id="c-tab-1" name="tabular-2"<?= $this->request->uri->fragment === 'c-tab-1' ? ' checked' : ''; ?>>
<thead> <div class="tab">
<td><?= $this->getHtml('Status'); ?><i class="sort-asc fa fa-chevron-up"></i><i class="sort-desc fa fa-chevron-down"></i> <div class="row">
<td><?= $this->getHtml('Due/Priority'); ?><i class="sort-asc fa fa-chevron-up"></i><i class="sort-desc fa fa-chevron-down"></i> <div class="col-xs-12">
<td class="wf-100"><?= $this->getHtml('Title'); ?><i class="sort-asc fa fa-chevron-up"></i><i class="sort-desc fa fa-chevron-down"></i> <div class="portlet">
<td><?= $this->getHtml('Tag'); ?> <div class="portlet-head"><?= $this->getHtml('YourOpen'); ?> (<?= \count($open); ?>)<i class="fa fa-download floatRight download btn"></i></div>
<td><?= $this->getHtml('Creator'); ?><i class="sort-asc fa fa-chevron-up"></i><i class="sort-desc fa fa-chevron-down"></i> <div class="slider">
<td><?= $this->getHtml('Created'); ?><i class="sort-asc fa fa-chevron-up"></i><i class="sort-desc fa fa-chevron-down"></i> <table id="taskList" class="default sticky">
<tbody> <thead>
<?php <td><?= $this->getHtml('Status'); ?><i class="sort-asc fa fa-chevron-up"></i><i class="sort-desc fa fa-chevron-down"></i>
$c = 0; <td><?= $this->getHtml('Due/Priority'); ?><i class="sort-asc fa fa-chevron-up"></i><i class="sort-desc fa fa-chevron-down"></i>
foreach ($open as $key => $task) : ++$c; <td class="wf-100"><?= $this->getHtml('Title'); ?><i class="sort-asc fa fa-chevron-up"></i><i class="sort-desc fa fa-chevron-down"></i>
$url = UriFactory::build(!empty($task->redirect) <td><?= $this->getHtml('Tag'); ?>
? '{/lang}{/app}/' . $task->redirect <td><?= $this->getHtml('Creator'); ?><i class="sort-asc fa fa-chevron-up"></i><i class="sort-desc fa fa-chevron-down"></i>
: ('task/single?{?}&id=' . $task->id), <td><?= $this->getHtml('Created'); ?><i class="sort-asc fa fa-chevron-up"></i><i class="sort-desc fa fa-chevron-down"></i>
['$id' => $task->id] <tbody>
); <?php
?> $c = 0;
<tr tabindex="0" data-href="<?= $url; ?>"> foreach ($open as $key => $task) : ++$c;
<td data-label="<?= $this->getHtml('Status'); ?>"> $url = UriFactory::build(!empty($task->redirect)
<a href="<?= $url; ?>"> ? '{/lang}{/app}/' . $task->redirect
<span class="tag <?= $this->printHtml('task-status-' . $task->getStatus()); ?>"> : ('task/single?{?}&id=' . $task->id),
<?= $this->getHtml('S' . $task->getStatus()); ?> ['$id' => $task->id]
</span> );
</a> ?>
<td data-label="<?= $this->getHtml('Due/Priority'); ?>"> <tr tabindex="0" data-href="<?= $url; ?>">
<a href="<?= $url; ?>"> <td data-label="<?= $this->getHtml('Status'); ?>">
<?php if ($task->getPriority() === TaskPriority::NONE) : ?> <a href="<?= $url; ?>">
<?= $this->printHtml($task->due->format('Y-m-d H:i')); ?> <span class="tag <?= $this->printHtml('task-status-' . $task->getStatus()); ?>">
<?php else : ?> <?= $this->getHtml('S' . $task->getStatus()); ?>
<?= $this->getHtml('P' . $task->getPriority()); ?> </span>
</a>
<td data-label="<?= $this->getHtml('Due/Priority'); ?>">
<a href="<?= $url; ?>">
<?php if ($task->getPriority() === TaskPriority::NONE) : ?>
<?= $this->printHtml($task->due->format('Y-m-d H:i')); ?>
<?php else : ?>
<?= $this->getHtml('P' . $task->getPriority()); ?>
<?php endif; ?>
</a>
<td data-label="<?= $this->getHtml('Title'); ?>">
<a href="<?= $url; ?>"><?= $this->printHtml($task->title); ?></a>
<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>
</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>
<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) : ?>
<tr><td colspan="6" class="empty"><?= $this->getHtml('Empty', '0', '0'); ?>
<?php endif; ?>
</table>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-xs-12">
<div class="portlet">
<div class="portlet-head"><?= $this->getHtml('OpenGiven'); ?> (<?= \count($open); ?>)<i class="fa fa-download floatRight download btn"></i></div>
<div class="slider">
<table id="taskList" class="default sticky">
<thead>
<td><?= $this->getHtml('Status'); ?><i class="sort-asc fa fa-chevron-up"></i><i class="sort-desc fa fa-chevron-down"></i>
<td><?= $this->getHtml('Due/Priority'); ?><i class="sort-asc fa fa-chevron-up"></i><i class="sort-desc fa fa-chevron-down"></i>
<td class="wf-100"><?= $this->getHtml('Title'); ?><i class="sort-asc fa fa-chevron-up"></i><i class="sort-desc fa fa-chevron-down"></i>
<td><?= $this->getHtml('Tag'); ?>
<td><?= $this->getHtml('For'); ?><i class="sort-asc fa fa-chevron-up"></i><i class="sort-desc fa fa-chevron-down"></i>
<td><?= $this->getHtml('Created'); ?><i class="sort-asc fa fa-chevron-up"></i><i class="sort-desc fa fa-chevron-down"></i>
<tbody>
<?php
$c = 0;
foreach ($open as $key => $task) : ++$c;
$url = UriFactory::build(!empty($task->redirect)
? '{/lang}{/app}/' . $task->redirect
: ('task/single?{?}&id=' . $task->id),
['$id' => $task->id]
);
?>
<tr tabindex="0" data-href="<?= $url; ?>">
<td data-label="<?= $this->getHtml('Status'); ?>">
<a href="<?= $url; ?>">
<span class="tag <?= $this->printHtml('task-status-' . $task->getStatus()); ?>">
<?= $this->getHtml('S' . $task->getStatus()); ?>
</span>
</a>
<td data-label="<?= $this->getHtml('Due/Priority'); ?>">
<a href="<?= $url; ?>">
<?php if ($task->getPriority() === TaskPriority::NONE) : ?>
<?= $this->printHtml($task->due->format('Y-m-d H:i')); ?>
<?php else : ?>
<?= $this->getHtml('P' . $task->getPriority()); ?>
<?php endif; ?>
</a>
<td data-label="<?= $this->getHtml('Title'); ?>">
<a href="<?= $url; ?>"><?= $this->printHtml($task->title); ?></a>
<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>
</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>
<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) : ?>
<tr><td colspan="6" class="empty"><?= $this->getHtml('Empty', '0', '0'); ?>
<?php endif; ?>
</table>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-xs-12">
<div class="portlet">
<div class="portlet-head"><?= $this->getHtml('AllTasks'); ?><i class="fa fa-download floatRight download btn"></i></div>
<div class="slider">
<table id="taskList" class="default sticky">
<thead>
<td><?= $this->getHtml('Status'); ?><i class="sort-asc fa fa-chevron-up"></i><i class="sort-desc fa fa-chevron-down"></i>
<td><?= $this->getHtml('Due/Priority'); ?><i class="sort-asc fa fa-chevron-up"></i><i class="sort-desc fa fa-chevron-down"></i>
<td class="wf-100"><?= $this->getHtml('Title'); ?><i class="sort-asc fa fa-chevron-up"></i><i class="sort-desc fa fa-chevron-down"></i>
<td><?= $this->getHtml('Tag'); ?>
<td><?= $this->getHtml('Creator'); ?><i class="sort-asc fa fa-chevron-up"></i><i class="sort-desc fa fa-chevron-down"></i>
<td><?= $this->getHtml('Created'); ?><i class="sort-asc fa fa-chevron-up"></i><i class="sort-desc fa fa-chevron-down"></i>
<tbody>
<?php
$c = 0;
foreach ($tasks as $key => $task) :
if ($open !== null && isset($open[$task->id])) {
continue;
}
++$c;
$url = UriFactory::build(!empty($task->redirect)
? '{/lang}{/app}/' . $task->redirect
: ('task/single?{?}&id=' . $task->id),
['$id' => $task->id]
);
?>
<tr tabindex="0" data-href="<?= $url; ?>">
<td data-label="<?= $this->getHtml('Status'); ?>">
<a href="<?= $url; ?>">
<span class="tag <?= $this->printHtml('task-status-' . $task->getStatus()); ?>">
<?= $this->getHtml('S' . $task->getStatus()); ?>
</span>
</a>
<td data-label="<?= $this->getHtml('Due/Priority'); ?>">
<a href="<?= $url; ?>">
<?php if ($task->getPriority() === TaskPriority::NONE) : ?>
<?= $this->printHtml($task->due->format('Y-m-d H:i')); ?>
<?php else : ?>
<?= $this->getHtml('P' . $task->getPriority()); ?>
<?php endif; ?>
</a>
<td data-label="<?= $this->getHtml('Title'); ?>">
<a href="<?= $url; ?>"><?= $this->printHtml($task->title); ?></a>
<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>
</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>
<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) : ?>
<tr><td colspan="6" class="empty"><?= $this->getHtml('Empty', '0', '0'); ?>
<?php endif; ?> <?php endif; ?>
</a> </table>
<td data-label="<?= $this->getHtml('Title'); ?>"> </div>
<a href="<?= $url; ?>"><?= $this->printHtml($task->title); ?></a> <div class="portlet-foot">
<td data-label="<?= $this->getHtml('Tag'); ?>"> <a class="button" href="<?= UriFactory::build($previous); ?>"><?= $this->getHtml('Previous', '0', '0'); ?></a>
<?php $tags = $task->getTags(); foreach ($tags as $tag) : ?> <a class="button" href="<?= UriFactory::build($next); ?>"><?= $this->getHtml('Next', '0', '0'); ?></a>
<a href="<?= $url; ?>"> </div>
<span class="tag" style="background: <?= $this->printHtml($tag->color); ?>"><?= !empty($tag->icon) ? '<i class="' . $this->printHtml($tag->icon) . '"></i>' : ''; ?><?= $this->printHtml($tag->getL11n()); ?></span> </div>
</a> </div>
<?php endforeach; ?> </div>
<td data-label="<?= $this->getHtml('Creator'); ?>"> </div>
<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'); ?>"> <input type="radio" id="c-tab-2" name="tabular-2"<?= $this->request->uri->fragment === 'c-tab-1' ? ' checked' : ''; ?>>
<a href="<?= $url; ?>"><?= $this->printHtml($task->createdAt->format('Y-m-d H:i')); ?></a> <div class="tab">
<?php endforeach; if ($c == 0) : ?> <div class="row">
<tr><td colspan="6" class="empty"><?= $this->getHtml('Empty', '0', '0'); ?> <div class="col-xs-12">
<?php endif; ?> <div class="portlet">
</table> <div class="portlet-head"><?= $this->getHtml('UnreadChanges'); ?> (<?= \count($open); ?>)<i class="fa fa-download floatRight download btn"></i></div>
</div> <div class="slider">
</div> <table id="taskList" class="default sticky">
</div> <thead>
</div> <td><?= $this->getHtml('Status'); ?><i class="sort-asc fa fa-chevron-up"></i><i class="sort-desc fa fa-chevron-down"></i>
<?php endif; ?> <td><?= $this->getHtml('Due/Priority'); ?><i class="sort-asc fa fa-chevron-up"></i><i class="sort-desc fa fa-chevron-down"></i>
<td class="wf-100"><?= $this->getHtml('Title'); ?><i class="sort-asc fa fa-chevron-up"></i><i class="sort-desc fa fa-chevron-down"></i>
<div class="row"> <td><?= $this->getHtml('Tag'); ?>
<div class="col-xs-12"> <td><?= $this->getHtml('Creator'); ?><i class="sort-asc fa fa-chevron-up"></i><i class="sort-desc fa fa-chevron-down"></i>
<div class="portlet"> <td><?= $this->getHtml('Created'); ?><i class="sort-asc fa fa-chevron-up"></i><i class="sort-desc fa fa-chevron-down"></i>
<div class="portlet-head"><?= $this->getHtml('Tasks'); ?><i class="fa fa-download floatRight download btn"></i></div> <tbody>
<div class="slider"> <?php
<table id="taskList" class="default sticky"> $c = 0;
<thead> foreach ($open as $key => $task) : ++$c;
<td><?= $this->getHtml('Status'); ?><i class="sort-asc fa fa-chevron-up"></i><i class="sort-desc fa fa-chevron-down"></i> $url = UriFactory::build(!empty($task->redirect)
<td><?= $this->getHtml('Due/Priority'); ?><i class="sort-asc fa fa-chevron-up"></i><i class="sort-desc fa fa-chevron-down"></i> ? '{/lang}{/app}/' . $task->redirect
<td class="wf-100"><?= $this->getHtml('Title'); ?><i class="sort-asc fa fa-chevron-up"></i><i class="sort-desc fa fa-chevron-down"></i> : ('task/single?{?}&id=' . $task->id),
<td><?= $this->getHtml('Tag'); ?> ['$id' => $task->id]
<td><?= $this->getHtml('Creator'); ?><i class="sort-asc fa fa-chevron-up"></i><i class="sort-desc fa fa-chevron-down"></i> );
<td><?= $this->getHtml('Created'); ?><i class="sort-asc fa fa-chevron-up"></i><i class="sort-desc fa fa-chevron-down"></i> ?>
<tbody> <tr tabindex="0" data-href="<?= $url; ?>">
<?php <td data-label="<?= $this->getHtml('Status'); ?>">
$c = 0; <a href="<?= $url; ?>">
foreach ($tasks as $key => $task) : <span class="tag <?= $this->printHtml('task-status-' . $task->getStatus()); ?>">
if ($open !== null && isset($open[$task->id])) { <?= $this->getHtml('S' . $task->getStatus()); ?>
continue; </span>
} </a>
<td data-label="<?= $this->getHtml('Due/Priority'); ?>">
++$c; <a href="<?= $url; ?>">
$url = UriFactory::build(!empty($task->redirect) <?php if ($task->getPriority() === TaskPriority::NONE) : ?>
? '{/lang}{/app}/' . $task->redirect <?= $this->printHtml($task->due->format('Y-m-d H:i')); ?>
: ('task/single?{?}&id=' . $task->id), <?php else : ?>
['$id' => $task->id] <?= $this->getHtml('P' . $task->getPriority()); ?>
); <?php endif; ?>
?> </a>
<tr tabindex="0" data-href="<?= $url; ?>"> <td data-label="<?= $this->getHtml('Title'); ?>">
<td data-label="<?= $this->getHtml('Status'); ?>"> <a href="<?= $url; ?>"><?= $this->printHtml($task->title); ?></a>
<a href="<?= $url; ?>"> <td data-label="<?= $this->getHtml('Tag'); ?>">
<span class="tag <?= $this->printHtml('task-status-' . $task->getStatus()); ?>"> <?php $tags = $task->getTags(); foreach ($tags as $tag) : ?>
<?= $this->getHtml('S' . $task->getStatus()); ?> <a href="<?= $url; ?>">
</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> </a>
<td data-label="<?= $this->getHtml('Due/Priority'); ?>"> <?php endforeach; ?>
<a href="<?= $url; ?>"> <td data-label="<?= $this->getHtml('Creator'); ?>">
<?php if ($task->getPriority() === TaskPriority::NONE) : ?> <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>
<?= $this->printHtml($task->due->format('Y-m-d H:i')); ?> <td data-label="<?= $this->getHtml('Created'); ?>">
<?php else : ?> <a href="<?= $url; ?>"><?= $this->printHtml($task->createdAt->format('Y-m-d H:i')); ?></a>
<?= $this->getHtml('P' . $task->getPriority()); ?> <?php endforeach; if ($c == 0) : ?>
<?php endif; ?> <tr><td colspan="6" class="empty"><?= $this->getHtml('Empty', '0', '0'); ?>
</a> <?php endif; ?>
<td data-label="<?= $this->getHtml('Title'); ?>"> </table>
<a href="<?= $url; ?>"><?= $this->printHtml($task->title); ?></a> </div>
<td data-label="<?= $this->getHtml('Tag'); ?>"> </div>
<?php $tags = $task->getTags(); foreach ($tags as $tag) : ?> </div>
<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>
</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>
<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) : ?>
<tr><td colspan="6" class="empty"><?= $this->getHtml('Empty', '0', '0'); ?>
<?php endif; ?>
</table>
</div>
<div class="portlet-foot">
<a class="button" href="<?= UriFactory::build($previous); ?>"><?= $this->getHtml('Previous', '0', '0'); ?></a>
<a class="button" href="<?= UriFactory::build($next); ?>"><?= $this->getHtml('Next', '0', '0'); ?></a>
</div> </div>
</div> </div>
</div> </div>