Path fixes

This commit is contained in:
Dennis Eichhorn 2017-02-12 16:02:22 +01:00
parent 5afabf7a3e
commit 208a7470d0
3 changed files with 86 additions and 3 deletions

View File

@ -20,7 +20,7 @@ return ['ProjectManagement' => [
'Created' => 'Created',
'Creator' => 'Creator',
'Description' => 'Description',
'Due' => 'Due',
'End' => 'End',
'Files' => 'Files',
'Finished' => 'Finished',
'Hold' => 'Hold',

View File

@ -19,6 +19,8 @@ $footerView->setTemplate('/Web/Templates/Lists/Footer/PaginationBig');
$footerView->setPages(20);
$footerView->setPage(1);
$list = $this->getData('projects');
echo $this->getData('nav')->render(); ?>
<div class="row">
@ -28,7 +30,6 @@ echo $this->getData('nav')->render(); ?>
<caption><?= $this->getText('Projects') ?></caption>
<thead>
<tr>
<td><?= $this->getText('Status'); ?>
<td class="wf-100"><?= $this->getText('Title'); ?>
<td><?= $this->getText('Start'); ?>
<td><?= $this->getText('Due'); ?>
@ -36,7 +37,11 @@ echo $this->getData('nav')->render(); ?>
<tr>
<td colspan="5"><?= $footerView->render(); ?>
<tbody>
<?php $count = 0; foreach([] as $key => $value) : $count++; ?>
<?php $count = 0; foreach($list as $key => $value) : $count++;
$url = \phpOMS\Uri\UriFactory::build('/{/lang}/backend/projectmanagement/profile?{?}&id=' . $value->getId());?>
<td><a href="<?= $url; ?>"><?= $value->getName(); ?></a>
<td><a href="<?= $url; ?>"><?= $value->getStart()->format('Y-m-d'); ?></a>
<td><a href="<?= $url; ?>"><?= $value->getEnd()->format('Y-m-d'); ?></a>
<?php endforeach; ?>
<?php if($count === 0) : ?>
<tr><td colspan="5" class="empty"><?= $this->getText('Empty', 0, 0); ?>

View File

@ -13,4 +13,82 @@
* @version 1.0.0
* @link http://orange-management.com
*/
$project = $this->getData('project');
$tasks = $project->getTasks();
echo $this->getData('nav')->render(); ?>
<div class="row">
<div class="col-xs-12 col-md-6">
<section class="box wf-100">
<header><h1><?= $project->getName(); ?></h1></header>
<div class="inner">
<form id="fProject" method="POST" action="<?= \phpOMS\Uri\UriFactory::build('/{/lang}/api/projectmanagement?{?}&csrf={$CSRF}'); ?>">
<table class="layout wf-100">
<tbody>
<tr><td colspan="2"><label for="iName"><?= $this->getText('Name'); ?></label>
<tr><td colspan="2"><input type="text" id="iName" name="name" placeholder="&#xf007; Name" value="<?= $project->getName(); ?>" required>
<tr><td><label for="iStart"><?= $this->getText('Start'); ?></label>
<td><label for="iEnd"><?= $this->getText('End'); ?></label>
<tr><td><input type="datetime-local" id="iStart" name="start" value="<?= $project->getStart()->format('Y-m-d\TH:i:s'); ?>">
<td><input type="datetime-local" id="iEnd" name="end" value="<?= $project->getEnd()->format('Y-m-d\TH:i:s'); ?>">
<tr><td colspan="2"><label for="iDescription"><?= $this->getText('Description'); ?></label>
<tr><td colspan="2"><textarea id="iDescription" name="desc" value="<?= $project->getDescription(); ?>"></textarea>
<tr><td colspan="2"><input type="submit" value="<?= $this->getText('Save', 0, 0); ?>">
</table>
</form>
</div>
</section>
</div>
<div class="col-xs-12 col-md-6">
<div class="box wf-100">
<table class="table">
<caption><?= $this->getText('Tasks', 'Tasks'); ?></caption>
<thead>
<td><?= $this->getText('Status'); ?>
<td><?= $this->getText('Due', 'Tasks'); ?>
<td class="full"><?= $this->getText('Title'); ?>
<tfoot>
<tbody>
<?php $c = 0; foreach($tasks as $key => $task) : $c++;
$url = \phpOMS\Uri\UriFactory::build('/{/lang}/backend/task/single?{?}&id=' . $task->getId());
$color = 'darkred';
if($task->getStatus() === \Modules\Tasks\Models\TaskStatus::DONE) { $color = 'green'; }
elseif($task->getStatus() === \Modules\Tasks\Models\TaskStatus::OPEN) { $color = 'darkblue'; }
elseif($task->getStatus() === \Modules\Tasks\Models\TaskStatus::WORKING) { $color = 'purple'; }
elseif($task->getStatus() === \Modules\Tasks\Models\TaskStatus::CANCELED) { $color = 'red'; }
elseif($task->getStatus() === \Modules\Tasks\Models\TaskStatus::SUSPENDED) { $color = 'yellow'; } ;?>
<tr>
<td><a href="<?= $url; ?>"><span class="tag <?= $color; ?>"><?= $this->getText('S' . $task->getStatus(), 'Tasks'); ?></span></a>
<td><a href="<?= $url; ?>"><?= $task->getDue()->format('Y-m-d H:i'); ?></a>
<td><a href="<?= $url; ?>"><?= $task->getTitle(); ?></a>
<?php endforeach; if($c == 0) : ?>
<tr><td colspan="6" class="empty"><?= $this->getText('Empty', 0, 0); ?>
<?php endif; ?>
</table>
</div>
</div>
</div>
<div class="row">
<div class="col-xs-12 col-md-6">
<section class="box wf-100">
<header><h1>Calendar</h1></header>
</section>
</div>
<div class="col-xs-12 col-md-6">
<section class="box wf-100">
<header><h1>Media</h1></header>
</section>
</div>
</div>
<div class="row">
<div class="col-xs-12 col-md-6">
<section class="box wf-100">
<header><h1>Finances</h1></header>
</section>
</div>
</div>