template fixes + bug fixes + style fixes

This commit is contained in:
Dennis Eichhorn 2024-04-02 21:40:47 +00:00
parent e6c6140a05
commit 01a6f744a7
5 changed files with 47 additions and 47 deletions

View File

@ -61,9 +61,9 @@ final class BackendController extends Controller
->limit(25);
if ($request->getData('ptype') === 'p') {
$view->data['contracts'] = $mapper->where('id', $request->getDataInt('id') ?? 0, '<')->execute();
$view->data['contracts'] = $mapper->where('id', $request->getDataInt('offset') ?? 0, '<')->execute();
} elseif ($request->getData('ptype') === 'n') {
$view->data['contracts'] = $mapper->where('id', $request->getDataInt('id') ?? 0, '>')->execute();
$view->data['contracts'] = $mapper->where('id', $request->getDataInt('offset') ?? 0, '>')->execute();
} else {
$view->data['contracts'] = $mapper->where('id', 0, '>')->execute();
}
@ -96,9 +96,9 @@ final class BackendController extends Controller
->limit(25);
if ($request->getData('ptype') === 'p') {
$view->data['types'] = $mapper->where('id', $request->getDataInt('id') ?? 0, '<')->execute();
$view->data['types'] = $mapper->where('id', $request->getDataInt('offset') ?? 0, '<')->execute();
} elseif ($request->getData('ptype') === 'n') {
$view->data['types'] = $mapper->where('id', $request->getDataInt('id') ?? 0, '>')->execute();
$view->data['types'] = $mapper->where('id', $request->getDataInt('offset') ?? 0, '>')->execute();
} else {
$view->data['types'] = $mapper->where('id', 0, '>')->execute();
}
@ -172,20 +172,20 @@ final class BackendController extends Controller
->with('account')
->where('parent', (int) $request->getData('id'))
->sort('createdAt', OrderType::DESC)
->execute();
->executeGetArray();
$view->data['contractTypes'] = ContractTypeMapper::getAll()
->with('l11n')
->where('l11n/language', $response->header->l11n->language)
->execute();
->executeGetArray();
$view->data['units'] = UnitMapper::getAll()
->execute();
->executeGetArray();
$view->data['attributeTypes'] = ContractAttributeTypeMapper::getAll()
->with('l11n')
->where('l11n/language', $response->header->l11n->language)
->execute();
->executeGetArray();
$view->data['editor'] = new \Modules\Editor\Theme\Backend\Components\Editor\BaseView($this->app->l11nManager, $request, $response);
$view->data['media-upload'] = new \Modules\Media\Theme\Backend\Components\Upload\BaseView($this->app->l11nManager, $request, $response);

View File

@ -13,22 +13,22 @@
declare(strict_types=1);
return ['ContractManagement' => [
'Account' => 'Account',
'AutoRenewal' => 'Automatische Verlängerung',
'Contract' => 'Vertrag',
'Contracts' => 'Verträge',
'Costs' => 'Kosten',
'Description' => 'Beschreibung',
'End' => 'Ende',
'Files' => 'Dateien',
'Name' => 'Name',
'Overview' => 'Übersicht',
'Parties' => 'Parteien',
'Start' => 'Start',
'Termination' => 'Beendigung',
'Title' => 'Titel',
'Type' => 'Typ',
'Unit' => 'Unit',
'With' => 'Mit',
'ContractTypes' => 'Vertragsarten',
'Account' => 'Account',
'AutoRenewal' => 'Automatische Verlängerung',
'Contract' => 'Vertrag',
'Contracts' => 'Verträge',
'Costs' => 'Kosten',
'Description' => 'Beschreibung',
'End' => 'Ende',
'Files' => 'Dateien',
'Name' => 'Name',
'Overview' => 'Übersicht',
'Parties' => 'Parteien',
'Start' => 'Start',
'Termination' => 'Beendigung',
'Title' => 'Titel',
'Type' => 'Typ',
'Unit' => 'Unit',
'With' => 'Mit',
'ContractTypes' => 'Vertragsarten',
]];

View File

@ -13,22 +13,22 @@
declare(strict_types=1);
return ['ContractManagement' => [
'Account' => 'Account',
'AutoRenewal' => 'Auto Renewal',
'Contract' => 'Contract',
'Contracts' => 'Contracts',
'Costs' => 'Costs',
'Description' => 'Description',
'End' => 'End',
'Files' => 'Files',
'Name' => '',
'Overview' => 'Overview',
'Parties' => 'Parties',
'Start' => 'Start',
'Termination' => 'Termination',
'Title' => 'Title',
'Type' => 'Type',
'Unit' => 'Unit',
'With' => 'With',
'ContractTypes' => 'Contract Types',
'Account' => 'Account',
'AutoRenewal' => 'Auto Renewal',
'Contract' => 'Contract',
'Contracts' => 'Contracts',
'Costs' => 'Costs',
'Description' => 'Description',
'End' => 'End',
'Files' => 'Files',
'Name' => '',
'Overview' => 'Overview',
'Parties' => 'Parties',
'Start' => 'Start',
'Termination' => 'Termination',
'Title' => 'Title',
'Type' => 'Type',
'Unit' => 'Unit',
'With' => 'With',
'ContractTypes' => 'Contract Types',
]];

View File

@ -20,8 +20,8 @@ use phpOMS\Uri\UriFactory;
*/
$contracts = $this->data['contracts'] ?? [];
$previous = empty($contracts) ? '{/base}/contract/list' : '{/base}/contract/list?{?}&id=' . \reset($contracts)->id . '&ptype=p';
$next = empty($contracts) ? '{/base}/contract/list' : '{/base}/contract/list?{?}&id=' . \end($contracts)->id . '&ptype=n';
$previous = empty($contracts) ? '{/base}/contract/list' : '{/base}/contract/list?{?}&offset=' . \reset($contracts)->id . '&ptype=p';
$next = empty($contracts) ? '{/base}/contract/list' : '{/base}/contract/list?{?}&offset=' . \end($contracts)->id . '&ptype=n';
$now = new \DateTime('now');

View File

@ -24,7 +24,7 @@ echo $this->data['nav']->render(); ?>
<section class="portlet">
<div class="portlet-head">
<?= $this->getHtml('ContractTypes'); ?>
<a class="button end-xs save" href="<?= UriFactory::build('{/base}/'); ?>contract/type/create"><?= $this->getHtml('New', '0', '0'); ?></a>
<a class="button end-xs save" href="<?= UriFactory::build('{/base}/contract/type/create'); ?>"><?= $this->getHtml('New', '0', '0'); ?></a>
<i class="g-icon download btn end-xs">download</i>
</div>
<div class="slider">