This commit is contained in:
Dennis Eichhorn 2022-12-10 22:17:54 +01:00
parent 53f95ed962
commit 813d6b73f7
3 changed files with 7 additions and 7 deletions

View File

@ -5,7 +5,7 @@
"type": 2, "type": 2,
"subtype": 1, "subtype": 1,
"name": "Contract", "name": "Contract",
"uri": "{/prefix}contract/list?{?}", "uri": "{/lang}/{/app}/contract/list?{?}",
"target": "self", "target": "self",
"icon": null, "icon": null,
"order": 45, "order": 45,
@ -19,7 +19,7 @@
"type": 3, "type": 3,
"subtype": 1, "subtype": 1,
"name": "Contracts", "name": "Contracts",
"uri": "{/prefix}contract/list?{?}", "uri": "{/lang}/{/app}/contract/list?{?}",
"target": "self", "target": "self",
"icon": null, "icon": null,
"order": 1, "order": 1,

View File

@ -20,8 +20,8 @@ use phpOMS\Uri\UriFactory;
*/ */
$contracts = $this->getData('contracts') ?? []; $contracts = $this->getData('contracts') ?? [];
$previous = empty($contracts) ? 'contract/list' : 'contract/list?{?}&id=' . \reset($contracts)->getId() . '&ptype=p'; $previous = empty($contracts) ? '{/lang}/{/app}/contract/list' : '{/lang}/{/app}/contract/list?{?}&id=' . \reset($contracts)->getId() . '&ptype=p';
$next = empty($contracts) ? 'contract/list' : 'contract/list?{?}&id=' . \end($contracts)->getId() . '&ptype=n'; $next = empty($contracts) ? '{/lang}/{/app}/contract/list' : '{/lang}/{/app}/contract/list?{?}&id=' . \end($contracts)->getId() . '&ptype=n';
$now = new \DateTime('now'); $now = new \DateTime('now');
@ -73,7 +73,7 @@ echo $this->getData('nav')->render(); ?>
</label> </label>
<tbody> <tbody>
<?php foreach ($contracts as $key => $value) : <?php foreach ($contracts as $key => $value) :
$url = UriFactory::build('contract/single?{?}&id=' . $value->getId()); $url = UriFactory::build('{/lang}/{/app}/contract/single?{?}&id=' . $value->getId());
$type = 'ok'; $type = 'ok';
if (($value->end->getTimestamp() < $now->getTimestamp() && $value->end->getTimestamp() + 7776000 > $now->getTimestamp()) if (($value->end->getTimestamp() < $now->getTimestamp() && $value->end->getTimestamp() + 7776000 > $now->getTimestamp())
@ -88,7 +88,7 @@ echo $this->getData('nav')->render(); ?>
?> ?>
<tr tabindex="0" data-href="<?= $url; ?>"> <tr tabindex="0" data-href="<?= $url; ?>">
<td data-label="<?= $this->getHtml('Title'); ?>"><a href="<?= $url; ?>"><?= $this->printHtml($value->title); ?></a> <td data-label="<?= $this->getHtml('Title'); ?>"><a href="<?= $url; ?>"><?= $this->printHtml($value->title); ?></a>
<td data-label="<?= $this->getHtml('Account'); ?>"><a class="content" href="<?= UriFactory::build('profile/single?{?}&for=' . $value->account->getId()); ?>"><?= $this->printHtml($value->account->name1); ?> <?= $this->printHtml($value->account->name2); ?></a> <td data-label="<?= $this->getHtml('Account'); ?>"><a class="content" href="<?= UriFactory::build('{/lang}/{/app}/profile/single?{?}&for=' . $value->account->getId()); ?>"><?= $this->printHtml($value->account->name1); ?> <?= $this->printHtml($value->account->name2); ?></a>
<td data-label="<?= $this->getHtml('End'); ?>"><a href="<?= $url; ?>"><span class="tag <?= $type; ?>"><?= $value->end !== null ? $value->end->format('Y-m-d') : ''; ?></span></a> <td data-label="<?= $this->getHtml('End'); ?>"><a href="<?= $url; ?>"><span class="tag <?= $type; ?>"><?= $value->end !== null ? $value->end->format('Y-m-d') : ''; ?></span></a>
<?php endforeach; ?> <?php endforeach; ?>
</table> </table>

View File

@ -12,7 +12,7 @@
}, },
"creator": { "creator": {
"name": "Karaka", "name": "Karaka",
"website": "www.spl1nes.com" "website": "jingga.app"
}, },
"description": "ContractManagement module.", "description": "ContractManagement module.",
"directory": "ContractManagement", "directory": "ContractManagement",