mirror of
https://github.com/Karaka-Management/oms-AssetManagement.git
synced 2026-02-15 21:08:41 +00:00
started with template fixes
This commit is contained in:
parent
99e33a413e
commit
e8adec8e0d
|
|
@ -6,9 +6,9 @@ use phpOMS\Account\PermissionType;
|
||||||
use phpOMS\Router\RouteVerb;
|
use phpOMS\Router\RouteVerb;
|
||||||
|
|
||||||
return [
|
return [
|
||||||
'^.*/accounting/attribute/type/list(\?.*$|$)' => [
|
'^.*/accounting/asset/attribute/type/list(\?.*$|$)' => [
|
||||||
[
|
[
|
||||||
'dest' => '\Modules\EquipmentManagement\Controller\BackendController:viewEquipmentManagementAttributeTypeList',
|
'dest' => '\Modules\AssetManagement\Controller\BackendController:viewAssetManagementAttributeTypeList',
|
||||||
'verb' => RouteVerb::GET,
|
'verb' => RouteVerb::GET,
|
||||||
'permission' => [
|
'permission' => [
|
||||||
'module' => BackendController::NAME,
|
'module' => BackendController::NAME,
|
||||||
|
|
@ -17,9 +17,9 @@ return [
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
'^.*/accounting/attribute/type(\?.*$|$)' => [
|
'^.*/accounting/asset/attribute/type/view(\?.*$|$)' => [
|
||||||
[
|
[
|
||||||
'dest' => '\Modules\EquipmentManagement\Controller\BackendController:viewEquipmentManagementAttributeType',
|
'dest' => '\Modules\AssetManagement\Controller\BackendController:viewAssetManagementAttributeType',
|
||||||
'verb' => RouteVerb::GET,
|
'verb' => RouteVerb::GET,
|
||||||
'permission' => [
|
'permission' => [
|
||||||
'module' => BackendController::NAME,
|
'module' => BackendController::NAME,
|
||||||
|
|
@ -79,7 +79,7 @@ return [
|
||||||
'verb' => RouteVerb::GET,
|
'verb' => RouteVerb::GET,
|
||||||
'permission' => [
|
'permission' => [
|
||||||
'module' => BackendController::MODULE_NAME,
|
'module' => BackendController::MODULE_NAME,
|
||||||
'type' => PermissionType::READ,
|
'type' => PermissionType::CREATE,
|
||||||
'state' => PermissionCategory::ASSET,
|
'state' => PermissionCategory::ASSET,
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
|
|
|
||||||
|
|
@ -86,8 +86,11 @@ final class BackendController extends Controller
|
||||||
/** @var \Modules\Attribute\Models\AttributeType $attribute */
|
/** @var \Modules\Attribute\Models\AttributeType $attribute */
|
||||||
$attribute = AssetAttributeTypeMapper::get()
|
$attribute = AssetAttributeTypeMapper::get()
|
||||||
->with('l11n')
|
->with('l11n')
|
||||||
|
->with('defaults')
|
||||||
|
->with('defaults/l11n')
|
||||||
->where('id', (int) $request->getData('id'))
|
->where('id', (int) $request->getData('id'))
|
||||||
->where('l11n/language', $response->header->l11n->language)
|
->where('l11n/language', $response->header->l11n->language)
|
||||||
|
->where('defaults/l11n/language', [$response->header->l11n->language, null])
|
||||||
->execute();
|
->execute();
|
||||||
|
|
||||||
$l11ns = AssetAttributeTypeL11nMapper::getAll()
|
$l11ns = AssetAttributeTypeL11nMapper::getAll()
|
||||||
|
|
|
||||||
|
|
@ -85,7 +85,7 @@ echo $this->data['nav']->render(); ?>
|
||||||
?>
|
?>
|
||||||
<tr data-href="<?= $url; ?>">
|
<tr data-href="<?= $url; ?>">
|
||||||
<td>
|
<td>
|
||||||
<td data-label="<?= $this->getHtml('ID', '0', '0'); ?>"><a href="<?= $url; ?>"><?= $this->printHtml((string) $value->id); ?></a>
|
<td data-label="<?= $this->getHtml('ID', '0', '0'); ?>"><a href="<?= $url; ?>"><?= $value->id; ?></a>
|
||||||
<td data-label="<?= $this->getHtml('Status'); ?>"><a href="<?= $url; ?>"><?= $this->getHtml(':status' . $value->status); ?></a>
|
<td data-label="<?= $this->getHtml('Status'); ?>"><a href="<?= $url; ?>"><?= $this->getHtml(':status' . $value->status); ?></a>
|
||||||
<td data-label="<?= $this->getHtml('Name'); ?>"><a href="<?= $url; ?>"><?= $this->printHtml($value->name); ?></a>
|
<td data-label="<?= $this->getHtml('Name'); ?>"><a href="<?= $url; ?>"><?= $this->printHtml($value->name); ?></a>
|
||||||
<td data-label="<?= $this->getHtml('Type'); ?>"><a href="<?= $url; ?>"><?= $this->printHtml($value->type->getL11n()); ?></a>
|
<td data-label="<?= $this->getHtml('Type'); ?>"><a href="<?= $url; ?>"><?= $this->printHtml($value->type->getL11n()); ?></a>
|
||||||
|
|
|
||||||
|
|
@ -144,7 +144,7 @@ echo $this->data['nav']->render();
|
||||||
$asset->attributes,
|
$asset->attributes,
|
||||||
$this->data['attributeTypes'] ?? [],
|
$this->data['attributeTypes'] ?? [],
|
||||||
$this->data['units'] ?? [],
|
$this->data['units'] ?? [],
|
||||||
'{/api}fleet/asset/attribute',
|
'{/api}fleet/asset/attribute?csrf={$CSRF}',
|
||||||
$asset->id
|
$asset->id
|
||||||
);
|
);
|
||||||
?>
|
?>
|
||||||
|
|
|
||||||
|
|
@ -1,71 +0,0 @@
|
||||||
<?php
|
|
||||||
/**
|
|
||||||
* Jingga
|
|
||||||
*
|
|
||||||
* PHP Version 8.2
|
|
||||||
*
|
|
||||||
* @package Modules\ItemManagement
|
|
||||||
* @copyright Dennis Eichhorn
|
|
||||||
* @license OMS License 2.0
|
|
||||||
* @version 1.0.0
|
|
||||||
* @link https://jingga.app
|
|
||||||
*/
|
|
||||||
declare(strict_types=1);
|
|
||||||
|
|
||||||
use phpOMS\Uri\UriFactory;
|
|
||||||
|
|
||||||
/** @var \phpOMS\Views\View $this */
|
|
||||||
$attributes = $this->data['attributes'];
|
|
||||||
|
|
||||||
echo $this->data['nav']->render(); ?>
|
|
||||||
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-xs-12">
|
|
||||||
<section class="portlet">
|
|
||||||
<div class="portlet-head"><?= $this->getHtml('AttributeTypes', 'Attribute', 'Backend'); ?><i class="g-icon download btn end-xs">download</i></div>
|
|
||||||
<div class="slider">
|
|
||||||
<table id="iAttributeTypeList" class="default sticky">
|
|
||||||
<thead>
|
|
||||||
<tr>
|
|
||||||
<td><?= $this->getHtml('ID', '0', '0'); ?>
|
|
||||||
<label for="iAttributeTypeList-sort-1">
|
|
||||||
<input type="radio" name="iAttributeTypeList-sort" id="iAttributeTypeList-sort-1">
|
|
||||||
<i class="sort-asc g-icon">expand_less</i>
|
|
||||||
</label>
|
|
||||||
<label for="iAttributeTypeList-sort-2">
|
|
||||||
<input type="radio" name="iAttributeTypeList-sort" id="iAttributeTypeList-sort-2">
|
|
||||||
<i class="sort-desc g-icon">expand_more</i>
|
|
||||||
</label>
|
|
||||||
<label>
|
|
||||||
<i class="filter g-icon">filter_alt</i>
|
|
||||||
</label>
|
|
||||||
<td class="wf-100"><?= $this->getHtml('Name'); ?>
|
|
||||||
<label for="iAttributeTypeList-sort-2">
|
|
||||||
<input type="radio" name="iAttributeTypeList-sort" id="iAttributeTypeList-sort-2">
|
|
||||||
<i class="sort-asc g-icon">expand_less</i>
|
|
||||||
</label>
|
|
||||||
<label for="iAttributeTypeList-sort-3">
|
|
||||||
<input type="radio" name="iAttributeTypeList-sort" id="iAttributeTypeList-sort-3">
|
|
||||||
<i class="sort-desc g-icon">expand_more</i>
|
|
||||||
</label>
|
|
||||||
<label>
|
|
||||||
<i class="filter g-icon">filter_alt</i>
|
|
||||||
</label>
|
|
||||||
<tbody>
|
|
||||||
<?php
|
|
||||||
$count = 0;
|
|
||||||
foreach ($attributes as $key => $value) : ++$count;
|
|
||||||
$url = UriFactory::build('{/base}/accounting/asset/attribute/type?{?}&id=' . $value->id);
|
|
||||||
?>
|
|
||||||
<tr data-href="<?= $url; ?>">
|
|
||||||
<td><a href="<?= $url; ?>"><?= $value->id; ?></a>
|
|
||||||
<td><a href="<?= $url; ?>"><?= $this->printHtml($value->getL11n()); ?></a>
|
|
||||||
<?php endforeach; ?>
|
|
||||||
<?php if ($count === 0) : ?>
|
|
||||||
<tr><td colspan="2" class="empty"><?= $this->getHtml('Empty', '0', '0'); ?>
|
|
||||||
<?php endif; ?>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
</section>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
Loading…
Reference in New Issue
Block a user