mirror of
https://github.com/Karaka-Management/oms-ContractManagement.git
synced 2026-01-11 17:48:40 +00:00
fix urls
This commit is contained in:
parent
53f95ed962
commit
813d6b73f7
|
|
@ -5,7 +5,7 @@
|
|||
"type": 2,
|
||||
"subtype": 1,
|
||||
"name": "Contract",
|
||||
"uri": "{/prefix}contract/list?{?}",
|
||||
"uri": "{/lang}/{/app}/contract/list?{?}",
|
||||
"target": "self",
|
||||
"icon": null,
|
||||
"order": 45,
|
||||
|
|
@ -19,7 +19,7 @@
|
|||
"type": 3,
|
||||
"subtype": 1,
|
||||
"name": "Contracts",
|
||||
"uri": "{/prefix}contract/list?{?}",
|
||||
"uri": "{/lang}/{/app}/contract/list?{?}",
|
||||
"target": "self",
|
||||
"icon": null,
|
||||
"order": 1,
|
||||
|
|
|
|||
|
|
@ -20,8 +20,8 @@ use phpOMS\Uri\UriFactory;
|
|||
*/
|
||||
$contracts = $this->getData('contracts') ?? [];
|
||||
|
||||
$previous = empty($contracts) ? 'contract/list' : 'contract/list?{?}&id=' . \reset($contracts)->getId() . '&ptype=p';
|
||||
$next = empty($contracts) ? 'contract/list' : 'contract/list?{?}&id=' . \end($contracts)->getId() . '&ptype=n';
|
||||
$previous = empty($contracts) ? '{/lang}/{/app}/contract/list' : '{/lang}/{/app}/contract/list?{?}&id=' . \reset($contracts)->getId() . '&ptype=p';
|
||||
$next = empty($contracts) ? '{/lang}/{/app}/contract/list' : '{/lang}/{/app}/contract/list?{?}&id=' . \end($contracts)->getId() . '&ptype=n';
|
||||
|
||||
$now = new \DateTime('now');
|
||||
|
||||
|
|
@ -73,7 +73,7 @@ echo $this->getData('nav')->render(); ?>
|
|||
</label>
|
||||
<tbody>
|
||||
<?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';
|
||||
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; ?>">
|
||||
<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>
|
||||
<?php endforeach; ?>
|
||||
</table>
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user