Dynamic language loading

This commit is contained in:
Dennis Eichhorn 2016-07-05 19:00:30 +02:00
parent 00b20b93fe
commit 2e8d03dd06
8 changed files with 108 additions and 108 deletions

View File

@ -19,32 +19,32 @@
echo $this->getData('nav')->render(); ?> echo $this->getData('nav')->render(); ?>
<section class="box w-50 floatLeft"> <section class="box w-50 floatLeft">
<header><h1><?= $this->l11n->getText('Tasks', 'Account'); ?></h1></header> <header><h1><?= $this->l11n->getText('Tasks', 'Backend', 'Account'); ?></h1></header>
<div class="inner"> <div class="inner">
<form> <form>
<table class="layout wf-100"> <table class="layout wf-100">
<tr><td><label for="iAccount"><?= $this->l11n->getText('Tasks', 'Account'); ?></label> <tr><td><label for="iAccount"><?= $this->l11n->getText('Tasks', 'Backend', 'Account'); ?></label>
<tr><td><span class="input"><button type="button" formaction=""><i class="fa fa-book"></i></button><input type="number" min="1" id="iAccount" name="account" placeholder="&#xf007; Guest" required></span> <tr><td><span class="input"><button type="button" formaction=""><i class="fa fa-book"></i></button><input type="number" min="1" id="iAccount" name="account" placeholder="&#xf007; Guest" required></span>
<tr><td><label for="iFrom"><?= $this->l11n->getText('Tasks', 'From'); ?></label> <tr><td><label for="iFrom"><?= $this->l11n->getText('Tasks', 'Backend', 'From'); ?></label>
<tr><td><input type="datetime-local" id="iFrom" name="from" value="<?= (new \DateTime('NOW'))->format('Y-m-d\TH:i:s') ?>"> <tr><td><input type="datetime-local" id="iFrom" name="from" value="<?= (new \DateTime('NOW'))->format('Y-m-d\TH:i:s') ?>">
<tr><td><label for="iTo"><?= $this->l11n->getText('Tasks', 'To'); ?></label> <tr><td><label for="iTo"><?= $this->l11n->getText('Tasks', 'Backend', 'To'); ?></label>
<tr><td><input type="datetime-local" id="iTo" name="to" value="<?= (new \DateTime('NOW'))->format('Y-m-d\TH:i:s') ?>"> <tr><td><input type="datetime-local" id="iTo" name="to" value="<?= (new \DateTime('NOW'))->format('Y-m-d\TH:i:s') ?>">
<tr><td><input type="submit" value="<?= $this->l11n->getText(0, 'Submit'); ?>"> <tr><td><input type="submit" value="<?= $this->l11n->getText(0, 'Backend', 'Submit'); ?>">
</table> </table>
</form> </form>
</div> </div>
</section> </section>
<section class="box w-50 floatLeft"> <section class="box w-50 floatLeft">
<header><h1><?= $this->l11n->getText('Tasks', 'Statistics'); ?></h1></header> <header><h1><?= $this->l11n->getText('Tasks', 'Backend', 'Statistics'); ?></h1></header>
<div class="inner"> <div class="inner">
<table class="list wf-100"> <table class="list wf-100">
<tr><td><?= $this->l11n->getText('Tasks', 'Received'); ?><td>0 <tr><td><?= $this->l11n->getText('Tasks', 'Backend', 'Received'); ?><td>0
<tr><td><?= $this->l11n->getText('Tasks', 'Created'); ?><td>0 <tr><td><?= $this->l11n->getText('Tasks', 'Backend', 'Created'); ?><td>0
<tr><td><?= $this->l11n->getText('Tasks', 'Forwarded'); ?><td>0 <tr><td><?= $this->l11n->getText('Tasks', 'Backend', 'Forwarded'); ?><td>0
<tr><td><?= $this->l11n->getText('Tasks', 'AverageAmount'); ?><td>0 <tr><td><?= $this->l11n->getText('Tasks', 'Backend', 'AverageAmount'); ?><td>0
<tr><td><?= $this->l11n->getText('Tasks', 'AverageProcessTime'); ?><td>0 <tr><td><?= $this->l11n->getText('Tasks', 'Backend', 'AverageProcessTime'); ?><td>0
<tr><td><?= $this->l11n->getText('Tasks', 'InTime'); ?><td>0 <tr><td><?= $this->l11n->getText('Tasks', 'Backend', 'InTime'); ?><td>0
</table> </table>
</div> </div>
</section> </section>

View File

@ -19,38 +19,38 @@
echo $this->getData('nav')->render(); ?> echo $this->getData('nav')->render(); ?>
<section class="box w-50 floatLeft"> <section class="box w-50 floatLeft">
<header><h1><?= $this->l11n->getText('Tasks', 'Task'); ?></h1></header> <header><h1><?= $this->l11n->getText('Tasks', 'Backend', 'Task'); ?></h1></header>
<div class="inner"> <div class="inner">
<form id="fTask" method="POST" action="<?= \phpOMS\Uri\UriFactory::build('/{/lang}/api/task/create'); ?>"> <form id="fTask" method="POST" action="<?= \phpOMS\Uri\UriFactory::build('/{/lang}/api/task/create'); ?>">
<table class="layout wf-100"> <table class="layout wf-100">
<tbody> <tbody>
<tr><td colspan="2"><label for="iReceiver"><?= $this->l11n->getText('Tasks', 'To'); ?></label> <tr><td colspan="2"><label for="iReceiver"><?= $this->l11n->getText('Tasks', 'Backend', 'To'); ?></label>
<tr><td><span class="input"><button type="button" data-action='[{"type": "popup", "tpl": "acc-grp-tpl", "aniIn": "fadeIn", "aniOut": "fadeOut", "stay": 5000}]' formaction=""><i class="fa fa-book"></i></button><input type="number" min="1" id="iReceiver" name="receiver" placeholder="&#xf007; Guest" required></span><td><button><?= $this->l11n->getText(0, 'Add'); ?></button> <tr><td><span class="input"><button type="button" data-action='[{"type": "popup", "tpl": "acc-grp-tpl", "aniIn": "fadeIn", "aniOut": "fadeOut", "stay": 5000}]' formaction=""><i class="fa fa-book"></i></button><input type="number" min="1" id="iReceiver" name="receiver" placeholder="&#xf007; Guest" required></span><td><button><?= $this->l11n->getText(0, 'Backend', 'Add'); ?></button>
<tr><td colspan="2"><label for="iObserver"><?= $this->l11n->getText('Tasks', 'CC'); ?></label> <tr><td colspan="2"><label for="iObserver"><?= $this->l11n->getText('Tasks', 'Backend', 'CC'); ?></label>
<tr><td><span class="input"><button type="button" formaction=""><i class="fa fa-book"></i></button><input type="number" min="1" id="iObserver" name="observer" placeholder="&#xf007; Guest" required></span><td><button><?= $this->l11n->getText(0, 'Add'); ?></button> <tr><td><span class="input"><button type="button" formaction=""><i class="fa fa-book"></i></button><input type="number" min="1" id="iObserver" name="observer" placeholder="&#xf007; Guest" required></span><td><button><?= $this->l11n->getText(0, 'Backend', 'Add'); ?></button>
<tr><td colspan="2"><label for="iDue"><?= $this->l11n->getText('Tasks', 'Due'); ?></label> <tr><td colspan="2"><label for="iDue"><?= $this->l11n->getText('Tasks', 'Backend', 'Due'); ?></label>
<tr><td><input type="datetime-local" id="iDue" name="due" value="<?= (new \DateTime('NOW'))->format('Y-m-d\TH:i:s') ?>"><td> <tr><td><input type="datetime-local" id="iDue" name="due" value="<?= (new \DateTime('NOW'))->format('Y-m-d\TH:i:s') ?>"><td>
<tr><td colspan="2"><label for="iTitle"><?= $this->l11n->getText('Tasks', 'Title'); ?></label> <tr><td colspan="2"><label for="iTitle"><?= $this->l11n->getText('Tasks', 'Backend', 'Title'); ?></label>
<tr><td><input type="text" id="iTitle" name="title" placeholder="&#xf040; <?= $this->l11n->getText('Tasks', 'Title'); ?>"><td> <tr><td><input type="text" id="iTitle" name="title" placeholder="&#xf040; <?= $this->l11n->getText('Tasks', 'Backend', 'Title'); ?>"><td>
<tr><td colspan="2"><label for="iMessage"><?= $this->l11n->getText('Tasks', 'Message'); ?></label> <tr><td colspan="2"><label for="iMessage"><?= $this->l11n->getText('Tasks', 'Backend', 'Message'); ?></label>
<tr><td><textarea id="iMessage" name="description" placeholder="&#xf040;"></textarea><td> <tr><td><textarea id="iMessage" name="description" placeholder="&#xf040;"></textarea><td>
<tr><td colspan="2"><input type="submit" value="<?= $this->l11n->getText(0, 'Create'); ?>"><input type="hidden" name="type" value="<?= \Modules\Tasks\Models\TaskType::SINGLE; ?>"> <tr><td colspan="2"><input type="submit" value="<?= $this->l11n->getText(0, 'Backend', 'Create'); ?>"><input type="hidden" name="type" value="<?= \Modules\Tasks\Models\TaskType::SINGLE; ?>">
</table> </table>
</form> </form>
</div> </div>
</section> </section>
<section class="box w-50 floatLeft"> <section class="box w-50 floatLeft">
<header><h1><?= $this->l11n->getText('Tasks', 'Media'); ?></h1></header> <header><h1><?= $this->l11n->getText('Tasks', 'Backend', 'Media'); ?></h1></header>
<div class="inner"> <div class="inner">
<form> <form>
<table class="layout wf-100"> <table class="layout wf-100">
<tbody> <tbody>
<tr><td colspan="2"><label for="iMedia"><?= $this->l11n->getText('Tasks', 'Media'); ?></label> <tr><td colspan="2"><label for="iMedia"><?= $this->l11n->getText('Tasks', 'Backend', 'Media'); ?></label>
<tr><td><input type="text" id="iMedia" placeholder="&#xf15b; File"><td><button><?= $this->l11n->getText(0, 'Select'); ?></button> <tr><td><input type="text" id="iMedia" placeholder="&#xf15b; File"><td><button><?= $this->l11n->getText(0, 'Backend', 'Select'); ?></button>
<tr><td colspan="2"><label for="iUpload"><?= $this->l11n->getText('Tasks', 'Upload'); ?></label> <tr><td colspan="2"><label for="iUpload"><?= $this->l11n->getText('Tasks', 'Backend', 'Upload'); ?></label>
<tr><td><input type="file" id="iUpload" form="fTask"><input form="fTask" type="hidden" name="type"><td> <tr><td><input type="file" id="iUpload" form="fTask"><input form="fTask" type="hidden" name="type"><td>
</table> </table>
</form> </form>

View File

@ -22,13 +22,13 @@ echo $this->getData('nav')->render(); ?>
<div class="box w-75 floatLeft"> <div class="box w-75 floatLeft">
<table class="table"> <table class="table">
<caption><?= $this->l11n->getText('Tasks', 'Tasks'); ?></caption> <caption><?= $this->l11n->getText('Tasks', 'Backend', 'Tasks'); ?></caption>
<thead> <thead>
<td><?= $this->l11n->getText('Tasks', 'Status'); ?> <td><?= $this->l11n->getText('Tasks', 'Backend', 'Status'); ?>
<td><?= $this->l11n->getText('Tasks', 'Due'); ?> <td><?= $this->l11n->getText('Tasks', 'Backend', 'Due'); ?>
<td class="full"><?= $this->l11n->getText('Tasks', 'Title'); ?> <td class="full"><?= $this->l11n->getText('Tasks', 'Backend', 'Title'); ?>
<td><?= $this->l11n->getText('Tasks', 'Creator'); ?> <td><?= $this->l11n->getText('Tasks', 'Backend', 'Creator'); ?>
<td><?= $this->l11n->getText('Tasks', 'Created'); ?> <td><?= $this->l11n->getText('Tasks', 'Backend', 'Created'); ?>
<tfoot> <tfoot>
<tbody> <tbody>
<?php $c = 0; foreach($tasks as $key => $task) : $c++; <?php $c = 0; foreach($tasks as $key => $task) : $c++;
@ -40,30 +40,30 @@ echo $this->getData('nav')->render(); ?>
elseif($task->getStatus() === \Modules\Tasks\Models\TaskStatus::CANCELED) { $color = 'red'; } elseif($task->getStatus() === \Modules\Tasks\Models\TaskStatus::CANCELED) { $color = 'red'; }
elseif($task->getStatus() === \Modules\Tasks\Models\TaskStatus::SUSPENDED) { $color = 'yellow'; } ;?> elseif($task->getStatus() === \Modules\Tasks\Models\TaskStatus::SUSPENDED) { $color = 'yellow'; } ;?>
<tr> <tr>
<td><a href="<?= $url; ?>"><span class="tag <?= $color; ?>"><?= $this->l11n->getText('Tasks', 'S' . $task->getStatus()); ?></span></a> <td><a href="<?= $url; ?>"><span class="tag <?= $color; ?>"><?= $this->l11n->getText('Tasks', 'Backend', 'S' . $task->getStatus()); ?></span></a>
<td><a href="<?= $url; ?>"><?= $task->getDue()->format('Y-m-d H:i'); ?></a> <td><a href="<?= $url; ?>"><?= $task->getDue()->format('Y-m-d H:i'); ?></a>
<td><a href="<?= $url; ?>"><?= $task->getTitle(); ?></a> <td><a href="<?= $url; ?>"><?= $task->getTitle(); ?></a>
<td><a href="<?= $url; ?>"><?= $task->getCreatedBy(); ?></a> <td><a href="<?= $url; ?>"><?= $task->getCreatedBy(); ?></a>
<td><a href="<?= $url; ?>"><?= $task->getCreatedAt()->format('Y-m-d H:i'); ?></a> <td><a href="<?= $url; ?>"><?= $task->getCreatedAt()->format('Y-m-d H:i'); ?></a>
<?php endforeach; if($c == 0) : ?> <?php endforeach; if($c == 0) : ?>
<tr><td colspan="6" class="empty"><?= $this->l11n->getText(0, 'Empty'); ?> <tr><td colspan="6" class="empty"><?= $this->l11n->getText(0, 'Backend', 'Empty'); ?>
<?php endif; ?> <?php endif; ?>
</table> </table>
</div> </div>
<section class="w-25 floatLeft"> <section class="w-25 floatLeft">
<section class="box w-100"> <section class="box w-100">
<header><h1><?= $this->l11n->getText('Tasks', 'Settings'); ?></h1></header> <header><h1><?= $this->l11n->getText('Tasks', 'Backend', 'Settings'); ?></h1></header>
<div class="inner"> <div class="inner">
<form> <form>
<table class="layout wf-100"> <table class="layout wf-100">
<tr><td><label for="iIntervarl"><?= $this->l11n->getText('Tasks', 'Interval'); ?></label> <tr><td><label for="iIntervarl"><?= $this->l11n->getText('Tasks', 'Backend', 'Interval'); ?></label>
<tr><td><select id="iIntervarl" name="interval"> <tr><td><select id="iIntervarl" name="interval">
<option><?= $this->l11n->getText('Tasks', 'All'); ?> <option><?= $this->l11n->getText('Tasks', 'Backend', 'All'); ?>
<option><?= $this->l11n->getText('Tasks', 'Day'); ?> <option><?= $this->l11n->getText('Tasks', 'Backend', 'Day'); ?>
<option><?= $this->l11n->getText('Tasks', 'Week'); ?> <option><?= $this->l11n->getText('Tasks', 'Backend', 'Week'); ?>
<option selected><?= $this->l11n->getText('Tasks', 'Month'); ?> <option selected><?= $this->l11n->getText('Tasks', 'Backend', 'Month'); ?>
<option><?= $this->l11n->getText('Tasks', 'Year'); ?> <option><?= $this->l11n->getText('Tasks', 'Backend', 'Year'); ?>
</select> </select>
</table> </table>
</form> </form>
@ -71,15 +71,15 @@ echo $this->getData('nav')->render(); ?>
</section> </section>
<section class="box w-100"> <section class="box w-100">
<header><h1><?= $this->l11n->getText('Tasks', 'Settings'); ?></h1></header> <header><h1><?= $this->l11n->getText('Tasks', 'Backend', 'Settings'); ?></h1></header>
<div class="inner"> <div class="inner">
<table class="list"> <table class="list">
<tr><th><?= $this->l11n->getText('Tasks', 'Received'); ?><td>0 <tr><th><?= $this->l11n->getText('Tasks', 'Backend', 'Received'); ?><td>0
<tr><th><?= $this->l11n->getText('Tasks', 'Created'); ?><td>0 <tr><th><?= $this->l11n->getText('Tasks', 'Backend', 'Created'); ?><td>0
<tr><th><?= $this->l11n->getText('Tasks', 'Forwarded'); ?><td>0 <tr><th><?= $this->l11n->getText('Tasks', 'Backend', 'Forwarded'); ?><td>0
<tr><th><?= $this->l11n->getText('Tasks', 'AverageAmount'); ?><td>0 <tr><th><?= $this->l11n->getText('Tasks', 'Backend', 'AverageAmount'); ?><td>0
<tr><th><?= $this->l11n->getText('Tasks', 'AverageProcessTime'); ?><td>0 <tr><th><?= $this->l11n->getText('Tasks', 'Backend', 'AverageProcessTime'); ?><td>0
<tr><th><?= $this->l11n->getText('Tasks', 'InTime'); ?><td>0 <tr><th><?= $this->l11n->getText('Tasks', 'Backend', 'InTime'); ?><td>0
</table> </table>
</div> </div>
</section> </section>

View File

@ -44,7 +44,7 @@ foreach ($elements as $key => $element) : $c++;
elseif($element->getStatus() === \Modules\Tasks\Models\TaskStatus::CANCELED) { $color = 'red'; } elseif($element->getStatus() === \Modules\Tasks\Models\TaskStatus::CANCELED) { $color = 'red'; }
elseif($element->getStatus() === \Modules\Tasks\Models\TaskStatus::SUSPENDED) { $color = 'yellow'; } ?> elseif($element->getStatus() === \Modules\Tasks\Models\TaskStatus::SUSPENDED) { $color = 'yellow'; } ?>
<section class="box w-50"> <section class="box w-50">
<div class="floatRight"><span class="tag <?= $color; ?>"><?= $this->l11n->getText('Tasks', 'S' . $element->getStatus()); ?></span></div> <div class="floatRight"><span class="tag <?= $color; ?>"><?= $this->l11n->getText('Tasks', 'Backend', 'S' . $element->getStatus()); ?></span></div>
<div><?= $element->getCreatedBy(); ?> - <?= $element->getCreatedAt()->format('Y-m-d H:i'); ?></div> <div><?= $element->getCreatedBy(); ?> - <?= $element->getCreatedAt()->format('Y-m-d H:i'); ?></div>
</section> </section>
<?php if ($element->getDescription() !== '') : ?> <?php if ($element->getDescription() !== '') : ?>
@ -73,17 +73,17 @@ foreach ($elements as $key => $element) : $c++;
<div class="inner"> <div class="inner">
<form> <form>
<table class="layout wf-100"> <table class="layout wf-100">
<tr><td><label for="iMessage"><?= $this->l11n->getText('Tasks', 'Message'); ?></label> <tr><td><label for="iMessage"><?= $this->l11n->getText('Tasks', 'Backend', 'Message'); ?></label>
<tr><td><textarea></textarea> <tr><td><textarea></textarea>
<tr><td><label for="iDue"><?= $this->l11n->getText('Tasks', 'Due'); ?></label> <tr><td><label for="iDue"><?= $this->l11n->getText('Tasks', 'Backend', 'Due'); ?></label>
<tr><td><input type="datetime-local"> <tr><td><input type="datetime-local">
<tr><td><label for="iReceiver"><?= $this->l11n->getText('Tasks', 'Status'); ?></label> <tr><td><label for="iReceiver"><?= $this->l11n->getText('Tasks', 'Backend', 'Status'); ?></label>
<tr><td><select> <tr><td><select>
<option> <option>
</select> </select>
<tr><td><label for="iReceiver"><?= $this->l11n->getText('Tasks', 'To'); ?></label> <tr><td><label for="iReceiver"><?= $this->l11n->getText('Tasks', 'Backend', 'To'); ?></label>
<tr><td><input type="text" id="iReceiver" placeholder="&#xf007; Guest"> <tr><td><input type="text" id="iReceiver" placeholder="&#xf007; Guest">
<tr><td><input type="submit" value="<?= $this->l11n->getText(0, 'Create'); ?>"><input type="hidden" name="type" value="1"> <tr><td><input type="submit" value="<?= $this->l11n->getText(0, 'Backend', 'Create'); ?>"><input type="hidden" name="type" value="1">
</table> </table>
</form> </form>
</div> </div>

View File

@ -19,32 +19,32 @@
echo $this->getData('nav')->render(); ?> echo $this->getData('nav')->render(); ?>
<section class="box w-50 floatLeft"> <section class="box w-50 floatLeft">
<header><h1><?= $this->l11n->getText('Tasks', 'Account'); ?></h1></header> <header><h1><?= $this->l11n->getText('Tasks', 'Backend', 'Account'); ?></h1></header>
<div class="inner"> <div class="inner">
<form> <form>
<table class="layout wf-100"> <table class="layout wf-100">
<tr><td><label for="iAccount"><?= $this->l11n->getText('Tasks', 'Account'); ?></label> <tr><td><label for="iAccount"><?= $this->l11n->getText('Tasks', 'Backend', 'Account'); ?></label>
<tr><td><span class="input"><button type="button" formaction=""><i class="fa fa-book"></i></button><input type="number" min="1" id="iAccount" name="account" placeholder="&#xf007; Guest" required></span> <tr><td><span class="input"><button type="button" formaction=""><i class="fa fa-book"></i></button><input type="number" min="1" id="iAccount" name="account" placeholder="&#xf007; Guest" required></span>
<tr><td><label for="iFrom"><?= $this->l11n->getText('Tasks', 'From'); ?></label> <tr><td><label for="iFrom"><?= $this->l11n->getText('Tasks', 'Backend', 'From'); ?></label>
<tr><td><input type="datetime-local" id="iFrom" name="from" value="<?= (new \DateTime('NOW'))->format('Y-m-d\TH:i:s') ?>"> <tr><td><input type="datetime-local" id="iFrom" name="from" value="<?= (new \DateTime('NOW'))->format('Y-m-d\TH:i:s') ?>">
<tr><td><label for="iTo"><?= $this->l11n->getText('Tasks', 'To'); ?></label> <tr><td><label for="iTo"><?= $this->l11n->getText('Tasks', 'Backend', 'To'); ?></label>
<tr><td><input type="datetime-local" id="iTo" name="to" value="<?= (new \DateTime('NOW'))->format('Y-m-d\TH:i:s') ?>"> <tr><td><input type="datetime-local" id="iTo" name="to" value="<?= (new \DateTime('NOW'))->format('Y-m-d\TH:i:s') ?>">
<tr><td><input type="submit" value="<?= $this->l11n->getText(0, 'Submit'); ?>"> <tr><td><input type="submit" value="<?= $this->l11n->getText(0, 'Backend', 'Submit'); ?>">
</table> </table>
</form> </form>
</div> </div>
</section> </section>
<section class="box w-50 floatLeft"> <section class="box w-50 floatLeft">
<header><h1><?= $this->l11n->getText('Tasks', 'Statistics'); ?></h1></header> <header><h1><?= $this->l11n->getText('Tasks', 'Backend', 'Statistics'); ?></h1></header>
<div class="inner"> <div class="inner">
<table class="list wf-100"> <table class="list wf-100">
<tr><td><?= $this->l11n->getText('Tasks', 'Received'); ?><td>0 <tr><td><?= $this->l11n->getText('Tasks', 'Backend', 'Received'); ?><td>0
<tr><td><?= $this->l11n->getText('Tasks', 'Created'); ?><td>0 <tr><td><?= $this->l11n->getText('Tasks', 'Backend', 'Created'); ?><td>0
<tr><td><?= $this->l11n->getText('Tasks', 'Forwarded'); ?><td>0 <tr><td><?= $this->l11n->getText('Tasks', 'Backend', 'Forwarded'); ?><td>0
<tr><td><?= $this->l11n->getText('Tasks', 'AverageAmount'); ?><td>0 <tr><td><?= $this->l11n->getText('Tasks', 'Backend', 'AverageAmount'); ?><td>0
<tr><td><?= $this->l11n->getText('Tasks', 'AverageProcessTime'); ?><td>0 <tr><td><?= $this->l11n->getText('Tasks', 'Backend', 'AverageProcessTime'); ?><td>0
<tr><td><?= $this->l11n->getText('Tasks', 'InTime'); ?><td>0 <tr><td><?= $this->l11n->getText('Tasks', 'Backend', 'InTime'); ?><td>0
</table> </table>
</div> </div>
</section> </section>

View File

@ -19,38 +19,38 @@
echo $this->getData('nav')->render(); ?> echo $this->getData('nav')->render(); ?>
<section class="box w-50 floatLeft"> <section class="box w-50 floatLeft">
<header><h1><?= $this->l11n->getText('Tasks', 'Task'); ?></h1></header> <header><h1><?= $this->l11n->getText('Tasks', 'Backend', 'Task'); ?></h1></header>
<div class="inner"> <div class="inner">
<form id="fTask" method="POST" action="<?= \phpOMS\Uri\UriFactory::build('/{/lang}/api/task/create'); ?>"> <form id="fTask" method="POST" action="<?= \phpOMS\Uri\UriFactory::build('/{/lang}/api/task/create'); ?>">
<table class="layout wf-100"> <table class="layout wf-100">
<tbody> <tbody>
<tr><td colspan="2"><label for="iReceiver"><?= $this->l11n->getText('Tasks', 'To'); ?></label> <tr><td colspan="2"><label for="iReceiver"><?= $this->l11n->getText('Tasks', 'Backend', 'To'); ?></label>
<tr><td><span class="input"><button type="button" data-action='[{"type": "popup", "tpl": "acc-grp-tpl", "aniIn": "fadeIn", "aniOut": "fadeOut", "stay": 5000}]' formaction=""><i class="fa fa-book"></i></button><input type="number" min="1" id="iReceiver" name="receiver" placeholder="&#xf007; Guest" required></span><td><button><?= $this->l11n->getText(0, 'Add'); ?></button> <tr><td><span class="input"><button type="button" data-action='[{"type": "popup", "tpl": "acc-grp-tpl", "aniIn": "fadeIn", "aniOut": "fadeOut", "stay": 5000}]' formaction=""><i class="fa fa-book"></i></button><input type="number" min="1" id="iReceiver" name="receiver" placeholder="&#xf007; Guest" required></span><td><button><?= $this->l11n->getText(0, 'Backend', 'Add'); ?></button>
<tr><td colspan="2"><label for="iObserver"><?= $this->l11n->getText('Tasks', 'CC'); ?></label> <tr><td colspan="2"><label for="iObserver"><?= $this->l11n->getText('Tasks', 'Backend', 'CC'); ?></label>
<tr><td><span class="input"><button type="button" formaction=""><i class="fa fa-book"></i></button><input type="number" min="1" id="iObserver" name="observer" placeholder="&#xf007; Guest" required></span><td><button><?= $this->l11n->getText(0, 'Add'); ?></button> <tr><td><span class="input"><button type="button" formaction=""><i class="fa fa-book"></i></button><input type="number" min="1" id="iObserver" name="observer" placeholder="&#xf007; Guest" required></span><td><button><?= $this->l11n->getText(0, 'Backend', 'Add'); ?></button>
<tr><td colspan="2"><label for="iDue"><?= $this->l11n->getText('Tasks', 'Due'); ?></label> <tr><td colspan="2"><label for="iDue"><?= $this->l11n->getText('Tasks', 'Backend', 'Due'); ?></label>
<tr><td><input type="datetime-local" id="iDue" name="due" value="<?= (new \DateTime('NOW'))->format('Y-m-d\TH:i:s') ?>"><td> <tr><td><input type="datetime-local" id="iDue" name="due" value="<?= (new \DateTime('NOW'))->format('Y-m-d\TH:i:s') ?>"><td>
<tr><td colspan="2"><label for="iTitle"><?= $this->l11n->getText('Tasks', 'Title'); ?></label> <tr><td colspan="2"><label for="iTitle"><?= $this->l11n->getText('Tasks', 'Backend', 'Title'); ?></label>
<tr><td><input type="text" id="iTitle" name="title" placeholder="&#xf040; <?= $this->l11n->getText('Tasks', 'Title'); ?>"><td> <tr><td><input type="text" id="iTitle" name="title" placeholder="&#xf040; <?= $this->l11n->getText('Tasks', 'Backend', 'Title'); ?>"><td>
<tr><td colspan="2"><label for="iMessage"><?= $this->l11n->getText('Tasks', 'Message'); ?></label> <tr><td colspan="2"><label for="iMessage"><?= $this->l11n->getText('Tasks', 'Backend', 'Message'); ?></label>
<tr><td><textarea id="iMessage" name="description" placeholder="&#xf040;"></textarea><td> <tr><td><textarea id="iMessage" name="description" placeholder="&#xf040;"></textarea><td>
<tr><td colspan="2"><input type="submit" value="<?= $this->l11n->getText(0, 'Create'); ?>"><input type="hidden" name="type" value="<?= \Modules\Tasks\Models\TaskType::SINGLE; ?>"> <tr><td colspan="2"><input type="submit" value="<?= $this->l11n->getText(0, 'Backend', 'Create'); ?>"><input type="hidden" name="type" value="<?= \Modules\Tasks\Models\TaskType::SINGLE; ?>">
</table> </table>
</form> </form>
</div> </div>
</section> </section>
<section class="box w-50 floatLeft"> <section class="box w-50 floatLeft">
<header><h1><?= $this->l11n->getText('Tasks', 'Media'); ?></h1></header> <header><h1><?= $this->l11n->getText('Tasks', 'Backend', 'Media'); ?></h1></header>
<div class="inner"> <div class="inner">
<form> <form>
<table class="layout wf-100"> <table class="layout wf-100">
<tbody> <tbody>
<tr><td colspan="2"><label for="iMedia"><?= $this->l11n->getText('Tasks', 'Media'); ?></label> <tr><td colspan="2"><label for="iMedia"><?= $this->l11n->getText('Tasks', 'Backend', 'Media'); ?></label>
<tr><td><input type="text" id="iMedia" placeholder="&#xf15b; File"><td><button><?= $this->l11n->getText(0, 'Select'); ?></button> <tr><td><input type="text" id="iMedia" placeholder="&#xf15b; File"><td><button><?= $this->l11n->getText(0, 'Backend', 'Select'); ?></button>
<tr><td colspan="2"><label for="iUpload"><?= $this->l11n->getText('Tasks', 'Upload'); ?></label> <tr><td colspan="2"><label for="iUpload"><?= $this->l11n->getText('Tasks', 'Backend', 'Upload'); ?></label>
<tr><td><input type="file" id="iUpload" form="fTask"><input form="fTask" type="hidden" name="type"><td> <tr><td><input type="file" id="iUpload" form="fTask"><input form="fTask" type="hidden" name="type"><td>
</table> </table>
</form> </form>

View File

@ -22,13 +22,13 @@ echo $this->getData('nav')->render(); ?>
<div class="box w-75 floatLeft"> <div class="box w-75 floatLeft">
<table class="table"> <table class="table">
<caption><?= $this->l11n->getText('Tasks', 'Tasks'); ?></caption> <caption><?= $this->l11n->getText('Tasks', 'Backend', 'Tasks'); ?></caption>
<thead> <thead>
<td><?= $this->l11n->getText('Tasks', 'Status'); ?> <td><?= $this->l11n->getText('Tasks', 'Backend', 'Status'); ?>
<td><?= $this->l11n->getText('Tasks', 'Due'); ?> <td><?= $this->l11n->getText('Tasks', 'Backend', 'Due'); ?>
<td class="full"><?= $this->l11n->getText('Tasks', 'Title'); ?> <td class="full"><?= $this->l11n->getText('Tasks', 'Backend', 'Title'); ?>
<td><?= $this->l11n->getText('Tasks', 'Creator'); ?> <td><?= $this->l11n->getText('Tasks', 'Backend', 'Creator'); ?>
<td><?= $this->l11n->getText('Tasks', 'Created'); ?> <td><?= $this->l11n->getText('Tasks', 'Backend', 'Created'); ?>
<tfoot> <tfoot>
<tbody> <tbody>
<?php $c = 0; foreach($tasks as $key => $task) : $c++; <?php $c = 0; foreach($tasks as $key => $task) : $c++;
@ -40,30 +40,30 @@ echo $this->getData('nav')->render(); ?>
elseif($task->getStatus() === \Modules\Tasks\Models\TaskStatus::CANCELED) { $color = 'red'; } elseif($task->getStatus() === \Modules\Tasks\Models\TaskStatus::CANCELED) { $color = 'red'; }
elseif($task->getStatus() === \Modules\Tasks\Models\TaskStatus::SUSPENDED) { $color = 'yellow'; } ;?> elseif($task->getStatus() === \Modules\Tasks\Models\TaskStatus::SUSPENDED) { $color = 'yellow'; } ;?>
<tr> <tr>
<td><a href="<?= $url; ?>"><span class="tag <?= $color; ?>"><?= $this->l11n->getText('Tasks', 'S' . $task->getStatus()); ?></span></a> <td><a href="<?= $url; ?>"><span class="tag <?= $color; ?>"><?= $this->l11n->getText('Tasks', 'Backend', 'S' . $task->getStatus()); ?></span></a>
<td><a href="<?= $url; ?>"><?= $task->getDue()->format('Y-m-d H:i'); ?></a> <td><a href="<?= $url; ?>"><?= $task->getDue()->format('Y-m-d H:i'); ?></a>
<td><a href="<?= $url; ?>"><?= $task->getTitle(); ?></a> <td><a href="<?= $url; ?>"><?= $task->getTitle(); ?></a>
<td><a href="<?= $url; ?>"><?= $task->getCreatedBy(); ?></a> <td><a href="<?= $url; ?>"><?= $task->getCreatedBy(); ?></a>
<td><a href="<?= $url; ?>"><?= $task->getCreatedAt()->format('Y-m-d H:i'); ?></a> <td><a href="<?= $url; ?>"><?= $task->getCreatedAt()->format('Y-m-d H:i'); ?></a>
<?php endforeach; if($c == 0) : ?> <?php endforeach; if($c == 0) : ?>
<tr><td colspan="6" class="empty"><?= $this->l11n->getText(0, 'Empty'); ?> <tr><td colspan="6" class="empty"><?= $this->l11n->getText(0, 'Backend', 'Empty'); ?>
<?php endif; ?> <?php endif; ?>
</table> </table>
</div> </div>
<section class="w-25 floatLeft"> <section class="w-25 floatLeft">
<section class="box w-100"> <section class="box w-100">
<header><h1><?= $this->l11n->getText('Tasks', 'Settings'); ?></h1></header> <header><h1><?= $this->l11n->getText('Tasks', 'Backend', 'Settings'); ?></h1></header>
<div class="inner"> <div class="inner">
<form> <form>
<table class="layout wf-100"> <table class="layout wf-100">
<tr><td><label for="iIntervarl"><?= $this->l11n->getText('Tasks', 'Interval'); ?></label> <tr><td><label for="iIntervarl"><?= $this->l11n->getText('Tasks', 'Backend', 'Interval'); ?></label>
<tr><td><select id="iIntervarl" name="interval"> <tr><td><select id="iIntervarl" name="interval">
<option><?= $this->l11n->getText('Tasks', 'All'); ?> <option><?= $this->l11n->getText('Tasks', 'Backend', 'All'); ?>
<option><?= $this->l11n->getText('Tasks', 'Day'); ?> <option><?= $this->l11n->getText('Tasks', 'Backend', 'Day'); ?>
<option><?= $this->l11n->getText('Tasks', 'Week'); ?> <option><?= $this->l11n->getText('Tasks', 'Backend', 'Week'); ?>
<option selected><?= $this->l11n->getText('Tasks', 'Month'); ?> <option selected><?= $this->l11n->getText('Tasks', 'Backend', 'Month'); ?>
<option><?= $this->l11n->getText('Tasks', 'Year'); ?> <option><?= $this->l11n->getText('Tasks', 'Backend', 'Year'); ?>
</select> </select>
</table> </table>
</form> </form>
@ -71,15 +71,15 @@ echo $this->getData('nav')->render(); ?>
</section> </section>
<section class="box w-100"> <section class="box w-100">
<header><h1><?= $this->l11n->getText('Tasks', 'Settings'); ?></h1></header> <header><h1><?= $this->l11n->getText('Tasks', 'Backend', 'Settings'); ?></h1></header>
<div class="inner"> <div class="inner">
<table class="list"> <table class="list">
<tr><th><?= $this->l11n->getText('Tasks', 'Received'); ?><td>0 <tr><th><?= $this->l11n->getText('Tasks', 'Backend', 'Received'); ?><td>0
<tr><th><?= $this->l11n->getText('Tasks', 'Created'); ?><td>0 <tr><th><?= $this->l11n->getText('Tasks', 'Backend', 'Created'); ?><td>0
<tr><th><?= $this->l11n->getText('Tasks', 'Forwarded'); ?><td>0 <tr><th><?= $this->l11n->getText('Tasks', 'Backend', 'Forwarded'); ?><td>0
<tr><th><?= $this->l11n->getText('Tasks', 'AverageAmount'); ?><td>0 <tr><th><?= $this->l11n->getText('Tasks', 'Backend', 'AverageAmount'); ?><td>0
<tr><th><?= $this->l11n->getText('Tasks', 'AverageProcessTime'); ?><td>0 <tr><th><?= $this->l11n->getText('Tasks', 'Backend', 'AverageProcessTime'); ?><td>0
<tr><th><?= $this->l11n->getText('Tasks', 'InTime'); ?><td>0 <tr><th><?= $this->l11n->getText('Tasks', 'Backend', 'InTime'); ?><td>0
</table> </table>
</div> </div>
</section> </section>

View File

@ -44,7 +44,7 @@ foreach ($elements as $key => $element) : $c++;
elseif($element->getStatus() === \Modules\Tasks\Models\TaskStatus::CANCELED) { $color = 'red'; } elseif($element->getStatus() === \Modules\Tasks\Models\TaskStatus::CANCELED) { $color = 'red'; }
elseif($element->getStatus() === \Modules\Tasks\Models\TaskStatus::SUSPENDED) { $color = 'yellow'; } ?> elseif($element->getStatus() === \Modules\Tasks\Models\TaskStatus::SUSPENDED) { $color = 'yellow'; } ?>
<section class="box w-50"> <section class="box w-50">
<div class="floatRight"><span class="tag <?= $color; ?>"><?= $this->l11n->getText('Tasks', 'S' . $element->getStatus()); ?></span></div> <div class="floatRight"><span class="tag <?= $color; ?>"><?= $this->l11n->getText('Tasks', 'Backend', 'S' . $element->getStatus()); ?></span></div>
<div><?= $element->getCreatedBy(); ?> - <?= $element->getCreatedAt()->format('Y-m-d H:i'); ?></div> <div><?= $element->getCreatedBy(); ?> - <?= $element->getCreatedAt()->format('Y-m-d H:i'); ?></div>
</section> </section>
<?php if ($element->getDescription() !== '') : ?> <?php if ($element->getDescription() !== '') : ?>
@ -73,17 +73,17 @@ foreach ($elements as $key => $element) : $c++;
<div class="inner"> <div class="inner">
<form> <form>
<table class="layout wf-100"> <table class="layout wf-100">
<tr><td><label for="iMessage"><?= $this->l11n->getText('Tasks', 'Message'); ?></label> <tr><td><label for="iMessage"><?= $this->l11n->getText('Tasks', 'Backend', 'Message'); ?></label>
<tr><td><textarea></textarea> <tr><td><textarea></textarea>
<tr><td><label for="iDue"><?= $this->l11n->getText('Tasks', 'Due'); ?></label> <tr><td><label for="iDue"><?= $this->l11n->getText('Tasks', 'Backend', 'Due'); ?></label>
<tr><td><input type="datetime-local"> <tr><td><input type="datetime-local">
<tr><td><label for="iReceiver"><?= $this->l11n->getText('Tasks', 'Status'); ?></label> <tr><td><label for="iReceiver"><?= $this->l11n->getText('Tasks', 'Backend', 'Status'); ?></label>
<tr><td><select> <tr><td><select>
<option> <option>
</select> </select>
<tr><td><label for="iReceiver"><?= $this->l11n->getText('Tasks', 'To'); ?></label> <tr><td><label for="iReceiver"><?= $this->l11n->getText('Tasks', 'Backend', 'To'); ?></label>
<tr><td><input type="text" id="iReceiver" placeholder="&#xf007; Guest"> <tr><td><input type="text" id="iReceiver" placeholder="&#xf007; Guest">
<tr><td><input type="submit" value="<?= $this->l11n->getText(0, 'Create'); ?>"><input type="hidden" name="type" value="1"> <tr><td><input type="submit" value="<?= $this->l11n->getText(0, 'Backend', 'Create'); ?>"><input type="hidden" name="type" value="1">
</table> </table>
</form> </form>
</div> </div>