@@ -8,34 +8,34 @@ discard block |
||
8 | 8 | $enc = $this->encoder(); |
9 | 9 | |
10 | 10 | |
11 | -$target = $this->config( 'admin/jqadm/url/search/target' ); |
|
12 | -$controller = $this->config( 'admin/jqadm/url/search/controller', 'Jqadm' ); |
|
13 | -$action = $this->config( 'admin/jqadm/url/search/action', 'search' ); |
|
14 | -$config = $this->config( 'admin/jqadm/url/search/config', [] ); |
|
11 | +$target = $this->config('admin/jqadm/url/search/target'); |
|
12 | +$controller = $this->config('admin/jqadm/url/search/controller', 'Jqadm'); |
|
13 | +$action = $this->config('admin/jqadm/url/search/action', 'search'); |
|
14 | +$config = $this->config('admin/jqadm/url/search/config', []); |
|
15 | 15 | |
16 | 16 | |
17 | -$newTarget = $this->config( 'admin/jqadm/url/create/target' ); |
|
18 | -$newCntl = $this->config( 'admin/jqadm/url/create/controller', 'Jqadm' ); |
|
19 | -$newAction = $this->config( 'admin/jqadm/url/create/action', 'create' ); |
|
20 | -$newConfig = $this->config( 'admin/jqadm/url/create/config', [] ); |
|
17 | +$newTarget = $this->config('admin/jqadm/url/create/target'); |
|
18 | +$newCntl = $this->config('admin/jqadm/url/create/controller', 'Jqadm'); |
|
19 | +$newAction = $this->config('admin/jqadm/url/create/action', 'create'); |
|
20 | +$newConfig = $this->config('admin/jqadm/url/create/config', []); |
|
21 | 21 | |
22 | 22 | |
23 | -$getTarget = $this->config( 'admin/jqadm/url/get/target' ); |
|
24 | -$getCntl = $this->config( 'admin/jqadm/url/get/controller', 'Jqadm' ); |
|
25 | -$getAction = $this->config( 'admin/jqadm/url/get/action', 'get' ); |
|
26 | -$getConfig = $this->config( 'admin/jqadm/url/get/config', [] ); |
|
23 | +$getTarget = $this->config('admin/jqadm/url/get/target'); |
|
24 | +$getCntl = $this->config('admin/jqadm/url/get/controller', 'Jqadm'); |
|
25 | +$getAction = $this->config('admin/jqadm/url/get/action', 'get'); |
|
26 | +$getConfig = $this->config('admin/jqadm/url/get/config', []); |
|
27 | 27 | |
28 | 28 | |
29 | -$copyTarget = $this->config( 'admin/jqadm/url/copy/target' ); |
|
30 | -$copyCntl = $this->config( 'admin/jqadm/url/copy/controller', 'Jqadm' ); |
|
31 | -$copyAction = $this->config( 'admin/jqadm/url/copy/action', 'copy' ); |
|
32 | -$copyConfig = $this->config( 'admin/jqadm/url/copy/config', [] ); |
|
29 | +$copyTarget = $this->config('admin/jqadm/url/copy/target'); |
|
30 | +$copyCntl = $this->config('admin/jqadm/url/copy/controller', 'Jqadm'); |
|
31 | +$copyAction = $this->config('admin/jqadm/url/copy/action', 'copy'); |
|
32 | +$copyConfig = $this->config('admin/jqadm/url/copy/config', []); |
|
33 | 33 | |
34 | 34 | |
35 | -$delTarget = $this->config( 'admin/jqadm/url/delete/target' ); |
|
36 | -$delCntl = $this->config( 'admin/jqadm/url/delete/controller', 'Jqadm' ); |
|
37 | -$delAction = $this->config( 'admin/jqadm/url/delete/action', 'delete' ); |
|
38 | -$delConfig = $this->config( 'admin/jqadm/url/delete/config', [] ); |
|
35 | +$delTarget = $this->config('admin/jqadm/url/delete/target'); |
|
36 | +$delCntl = $this->config('admin/jqadm/url/delete/controller', 'Jqadm'); |
|
37 | +$delAction = $this->config('admin/jqadm/url/delete/action', 'delete'); |
|
38 | +$delConfig = $this->config('admin/jqadm/url/delete/config', []); |
|
39 | 39 | |
40 | 40 | |
41 | 41 | /** admin/jqadm/type/price/lists/fields |
@@ -53,44 +53,44 @@ discard block |
||
53 | 53 | * @category Developer |
54 | 54 | */ |
55 | 55 | $default = ['price.lists.type.domain', 'price.lists.type.status', 'price.lists.type.code', 'price.lists.type.label']; |
56 | -$default = $this->config( 'admin/jqadm/type/price/lists/fields', $default ); |
|
57 | -$fields = $this->session( 'aimeos/admin/jqadm/type/price/lists/fields', $default ); |
|
56 | +$default = $this->config('admin/jqadm/type/price/lists/fields', $default); |
|
57 | +$fields = $this->session('aimeos/admin/jqadm/type/price/lists/fields', $default); |
|
58 | 58 | |
59 | -$searchParams = $params = $this->get( 'pageParams', [] ); |
|
59 | +$searchParams = $params = $this->get('pageParams', []); |
|
60 | 60 | $searchParams['page']['start'] = 0; |
61 | 61 | |
62 | 62 | $typeList = []; |
63 | -foreach( $this->get( 'itemTypes', [] ) as $id => $typeItem ) { |
|
63 | +foreach ($this->get('itemTypes', []) as $id => $typeItem) { |
|
64 | 64 | $typeList[$id] = $typeItem->getCode(); |
65 | 65 | } |
66 | 66 | |
67 | 67 | $columnList = [ |
68 | - 'price.lists.type.id' => $this->translate( 'admin', 'ID' ), |
|
69 | - 'price.lists.type.domain' => $this->translate( 'admin', 'Domain' ), |
|
70 | - 'price.lists.type.status' => $this->translate( 'admin', 'Status' ), |
|
71 | - 'price.lists.type.code' => $this->translate( 'admin', 'Code' ), |
|
72 | - 'price.lists.type.label' => $this->translate( 'admin', 'Label' ), |
|
73 | - 'price.lists.type.position' => $this->translate( 'admin', 'Position' ), |
|
74 | - 'price.lists.type.ctime' => $this->translate( 'admin', 'Created' ), |
|
75 | - 'price.lists.type.mtime' => $this->translate( 'admin', 'Modified' ), |
|
76 | - 'price.lists.type.editor' => $this->translate( 'admin', 'Editor' ), |
|
68 | + 'price.lists.type.id' => $this->translate('admin', 'ID'), |
|
69 | + 'price.lists.type.domain' => $this->translate('admin', 'Domain'), |
|
70 | + 'price.lists.type.status' => $this->translate('admin', 'Status'), |
|
71 | + 'price.lists.type.code' => $this->translate('admin', 'Code'), |
|
72 | + 'price.lists.type.label' => $this->translate('admin', 'Label'), |
|
73 | + 'price.lists.type.position' => $this->translate('admin', 'Position'), |
|
74 | + 'price.lists.type.ctime' => $this->translate('admin', 'Created'), |
|
75 | + 'price.lists.type.mtime' => $this->translate('admin', 'Modified'), |
|
76 | + 'price.lists.type.editor' => $this->translate('admin', 'Editor'), |
|
77 | 77 | ]; |
78 | 78 | |
79 | 79 | ?> |
80 | -<?php $this->block()->start( 'jqadm_content' ); ?> |
|
80 | +<?php $this->block()->start('jqadm_content'); ?> |
|
81 | 81 | |
82 | 82 | <nav class="main-navbar"> |
83 | 83 | |
84 | 84 | <span class="navbar-brand"> |
85 | - <?= $enc->html( $this->translate( 'admin', 'Price Lists Types' ) ); ?> |
|
86 | - <span class="navbar-secondary">(<?= $enc->html( $this->site()->label() ); ?>)</span> |
|
85 | + <?= $enc->html($this->translate('admin', 'Price Lists Types')); ?> |
|
86 | + <span class="navbar-secondary">(<?= $enc->html($this->site()->label()); ?>)</span> |
|
87 | 87 | </span> |
88 | 88 | |
89 | 89 | <?= $this->partial( |
90 | - $this->config( 'admin/jqadm/partial/navsearch', 'common/partials/navsearch-standard.php' ), [ |
|
91 | - 'filter' => $this->session( 'aimeos/admin/jqadm/type/price/lists/filter', [] ), |
|
92 | - 'filterAttributes' => $this->get( 'filterAttributes', [] ), |
|
93 | - 'filterOperators' => $this->get( 'filterOperators', [] ), |
|
90 | + $this->config('admin/jqadm/partial/navsearch', 'common/partials/navsearch-standard.php'), [ |
|
91 | + 'filter' => $this->session('aimeos/admin/jqadm/type/price/lists/filter', []), |
|
92 | + 'filterAttributes' => $this->get('filterAttributes', []), |
|
93 | + 'filterOperators' => $this->get('filterOperators', []), |
|
94 | 94 | 'params' => $params, |
95 | 95 | ] |
96 | 96 | ); ?> |
@@ -98,33 +98,33 @@ discard block |
||
98 | 98 | |
99 | 99 | |
100 | 100 | <?= $this->partial( |
101 | - $this->config( 'admin/jqadm/partial/pagination', 'common/partials/pagination-standard.php' ), |
|
102 | - ['pageParams' => $params, 'pos' => 'top', 'total' => $this->get( 'total' ), |
|
103 | - 'page' => $this->session( 'aimeos/admin/jqadm/type/price/lists/page', [] )] |
|
101 | + $this->config('admin/jqadm/partial/pagination', 'common/partials/pagination-standard.php'), |
|
102 | + ['pageParams' => $params, 'pos' => 'top', 'total' => $this->get('total'), |
|
103 | + 'page' => $this->session('aimeos/admin/jqadm/type/price/lists/page', [])] |
|
104 | 104 | ); |
105 | 105 | ?> |
106 | 106 | |
107 | -<form class="list list-price-lists-type" method="POST" action="<?= $enc->attr( $this->url( $target, $controller, $action, $searchParams, [], $config ) ); ?>"> |
|
107 | +<form class="list list-price-lists-type" method="POST" action="<?= $enc->attr($this->url($target, $controller, $action, $searchParams, [], $config)); ?>"> |
|
108 | 108 | <?= $this->csrf()->formfield(); ?> |
109 | 109 | |
110 | 110 | <table class="list-items table table-hover table-striped"> |
111 | 111 | <thead class="list-header"> |
112 | 112 | <tr> |
113 | 113 | <?= $this->partial( |
114 | - $this->config( 'admin/jqadm/partial/listhead', 'common/partials/listhead-standard.php' ), |
|
115 | - ['fields' => $fields, 'params' => $params, 'data' => $columnList, 'sort' => $this->session( 'aimeos/admin/jqadm/type/price/lists/sort' )] |
|
114 | + $this->config('admin/jqadm/partial/listhead', 'common/partials/listhead-standard.php'), |
|
115 | + ['fields' => $fields, 'params' => $params, 'data' => $columnList, 'sort' => $this->session('aimeos/admin/jqadm/type/price/lists/sort')] |
|
116 | 116 | ); |
117 | 117 | ?> |
118 | 118 | |
119 | 119 | <th class="actions"> |
120 | 120 | <a class="btn fa act-add" tabindex="1" |
121 | - href="<?= $enc->attr( $this->url( $newTarget, $newCntl, $newAction, $params, [], $newConfig ) ); ?>" |
|
122 | - title="<?= $enc->attr( $this->translate( 'admin', 'Insert new entry (Ctrl+I)') ); ?>" |
|
123 | - aria-label="<?= $enc->attr( $this->translate( 'admin', 'Add' ) ); ?>"> |
|
121 | + href="<?= $enc->attr($this->url($newTarget, $newCntl, $newAction, $params, [], $newConfig)); ?>" |
|
122 | + title="<?= $enc->attr($this->translate('admin', 'Insert new entry (Ctrl+I)')); ?>" |
|
123 | + aria-label="<?= $enc->attr($this->translate('admin', 'Add')); ?>"> |
|
124 | 124 | </a> |
125 | 125 | |
126 | 126 | <?= $this->partial( |
127 | - $this->config( 'admin/jqadm/partial/columns', 'common/partials/columns-standard.php' ), |
|
127 | + $this->config('admin/jqadm/partial/columns', 'common/partials/columns-standard.php'), |
|
128 | 128 | ['fields' => $fields, 'data' => $columnList] |
129 | 129 | ); |
130 | 130 | ?> |
@@ -134,26 +134,26 @@ discard block |
||
134 | 134 | <tbody> |
135 | 135 | |
136 | 136 | <?= $this->partial( |
137 | - $this->config( 'admin/jqadm/partial/listsearch', 'common/partials/listsearch-standard.php' ), [ |
|
138 | - 'fields' => $fields, 'filter' => $this->session( 'aimeos/admin/jqadm/type/price/lists/filter', [] ), |
|
137 | + $this->config('admin/jqadm/partial/listsearch', 'common/partials/listsearch-standard.php'), [ |
|
138 | + 'fields' => $fields, 'filter' => $this->session('aimeos/admin/jqadm/type/price/lists/filter', []), |
|
139 | 139 | 'data' => [ |
140 | 140 | 'price.lists.type.id' => ['op' => '=='], |
141 | 141 | 'price.lists.type.domain' => ['op' => '==', 'type' => 'select', 'val' => [ |
142 | - 'attribute' => $this->translate( 'admin', 'attribute' ), |
|
143 | - 'catalog' => $this->translate( 'admin', 'catalog' ), |
|
144 | - 'customer' => $this->translate( 'admin', 'customer' ), |
|
145 | - 'media' => $this->translate( 'admin', 'media' ), |
|
146 | - 'price' => $this->translate( 'admin', 'price' ), |
|
147 | - 'product' => $this->translate( 'admin', 'product' ), |
|
148 | - 'service' => $this->translate( 'admin', 'service' ), |
|
149 | - 'supplier' => $this->translate( 'admin', 'supplier' ), |
|
150 | - 'text' => $this->translate( 'admin', 'text' ), |
|
142 | + 'attribute' => $this->translate('admin', 'attribute'), |
|
143 | + 'catalog' => $this->translate('admin', 'catalog'), |
|
144 | + 'customer' => $this->translate('admin', 'customer'), |
|
145 | + 'media' => $this->translate('admin', 'media'), |
|
146 | + 'price' => $this->translate('admin', 'price'), |
|
147 | + 'product' => $this->translate('admin', 'product'), |
|
148 | + 'service' => $this->translate('admin', 'service'), |
|
149 | + 'supplier' => $this->translate('admin', 'supplier'), |
|
150 | + 'text' => $this->translate('admin', 'text'), |
|
151 | 151 | ]], |
152 | 152 | 'price.lists.type.status' => ['op' => '==', 'type' => 'select', 'val' => [ |
153 | - '1' => $this->translate( 'mshop/code', 'status:1' ), |
|
154 | - '0' => $this->translate( 'mshop/code', 'status:0' ), |
|
155 | - '-1' => $this->translate( 'mshop/code', 'status:-1' ), |
|
156 | - '-2' => $this->translate( 'mshop/code', 'status:-2' ), |
|
153 | + '1' => $this->translate('mshop/code', 'status:1'), |
|
154 | + '0' => $this->translate('mshop/code', 'status:0'), |
|
155 | + '-1' => $this->translate('mshop/code', 'status:-1'), |
|
156 | + '-2' => $this->translate('mshop/code', 'status:-2'), |
|
157 | 157 | ]], |
158 | 158 | 'price.lists.type.code' => [], |
159 | 159 | 'price.lists.type.label' => [], |
@@ -165,47 +165,47 @@ discard block |
||
165 | 165 | ] ); |
166 | 166 | ?> |
167 | 167 | |
168 | - <?php foreach( $this->get( 'items', [] ) as $id => $item ) : ?> |
|
169 | - <?php $url = $enc->attr( $this->url( $getTarget, $getCntl, $getAction, ['id' => $id] + $params, [], $getConfig ) ); ?> |
|
170 | - <tr class="<?= $this->site()->readonly( $item->getSiteId() ); ?>"> |
|
171 | - <?php if( in_array( 'price.lists.type.id', $fields ) ) : ?> |
|
172 | - <td class="price-type-id"><a class="items-field" href="<?= $url; ?>"><?= $enc->html( $item->getId() ); ?></a></td> |
|
168 | + <?php foreach ($this->get('items', []) as $id => $item) : ?> |
|
169 | + <?php $url = $enc->attr($this->url($getTarget, $getCntl, $getAction, ['id' => $id] + $params, [], $getConfig)); ?> |
|
170 | + <tr class="<?= $this->site()->readonly($item->getSiteId()); ?>"> |
|
171 | + <?php if (in_array('price.lists.type.id', $fields)) : ?> |
|
172 | + <td class="price-type-id"><a class="items-field" href="<?= $url; ?>"><?= $enc->html($item->getId()); ?></a></td> |
|
173 | 173 | <?php endif; ?> |
174 | - <?php if( in_array( 'price.lists.type.domain', $fields ) ) : ?> |
|
175 | - <td class="price-type-domain"><a class="items-field" href="<?= $url; ?>"><?= $enc->html( $item->getDomain() ); ?></a></td> |
|
174 | + <?php if (in_array('price.lists.type.domain', $fields)) : ?> |
|
175 | + <td class="price-type-domain"><a class="items-field" href="<?= $url; ?>"><?= $enc->html($item->getDomain()); ?></a></td> |
|
176 | 176 | <?php endif; ?> |
177 | - <?php if( in_array( 'price.lists.type.status', $fields ) ) : ?> |
|
178 | - <td class="price-type-status"><a class="items-field" href="<?= $url; ?>"><div class="fa status-<?= $enc->attr( $item->getStatus() ); ?>"></div></a></td> |
|
177 | + <?php if (in_array('price.lists.type.status', $fields)) : ?> |
|
178 | + <td class="price-type-status"><a class="items-field" href="<?= $url; ?>"><div class="fa status-<?= $enc->attr($item->getStatus()); ?>"></div></a></td> |
|
179 | 179 | <?php endif; ?> |
180 | - <?php if( in_array( 'price.lists.type.code', $fields ) ) : ?> |
|
181 | - <td class="price-type-code"><a class="items-field" href="<?= $url; ?>" tabindex="1"><?= $enc->html( $item->getCode() ); ?></a></td> |
|
180 | + <?php if (in_array('price.lists.type.code', $fields)) : ?> |
|
181 | + <td class="price-type-code"><a class="items-field" href="<?= $url; ?>" tabindex="1"><?= $enc->html($item->getCode()); ?></a></td> |
|
182 | 182 | <?php endif; ?> |
183 | - <?php if( in_array( 'price.lists.type.label', $fields ) ) : ?> |
|
184 | - <td class="price-type-label"><a class="items-field" href="<?= $url; ?>"><?= $enc->html( $item->getLabel() ); ?></a></td> |
|
183 | + <?php if (in_array('price.lists.type.label', $fields)) : ?> |
|
184 | + <td class="price-type-label"><a class="items-field" href="<?= $url; ?>"><?= $enc->html($item->getLabel()); ?></a></td> |
|
185 | 185 | <?php endif; ?> |
186 | - <?php if( in_array( 'price.lists.type.position', $fields ) ) : ?> |
|
187 | - <td class="price-type-position"><a class="items-field" href="<?= $url; ?>"><?= $enc->html( $item->getPosition() ); ?></a></td> |
|
186 | + <?php if (in_array('price.lists.type.position', $fields)) : ?> |
|
187 | + <td class="price-type-position"><a class="items-field" href="<?= $url; ?>"><?= $enc->html($item->getPosition()); ?></a></td> |
|
188 | 188 | <?php endif; ?> |
189 | - <?php if( in_array( 'price.lists.type.ctime', $fields ) ) : ?> |
|
190 | - <td class="price-type-ctime"><a class="items-field" href="<?= $url; ?>"><?= $enc->html( $item->getTimeCreated() ); ?></a></td> |
|
189 | + <?php if (in_array('price.lists.type.ctime', $fields)) : ?> |
|
190 | + <td class="price-type-ctime"><a class="items-field" href="<?= $url; ?>"><?= $enc->html($item->getTimeCreated()); ?></a></td> |
|
191 | 191 | <?php endif; ?> |
192 | - <?php if( in_array( 'price.lists.type.mtime', $fields ) ) : ?> |
|
193 | - <td class="price-type-mtime"><a class="items-field" href="<?= $url; ?>"><?= $enc->html( $item->getTimeModified() ); ?></a></td> |
|
192 | + <?php if (in_array('price.lists.type.mtime', $fields)) : ?> |
|
193 | + <td class="price-type-mtime"><a class="items-field" href="<?= $url; ?>"><?= $enc->html($item->getTimeModified()); ?></a></td> |
|
194 | 194 | <?php endif; ?> |
195 | - <?php if( in_array( 'price.lists.type.editor', $fields ) ) : ?> |
|
196 | - <td class="price-type-editor"><a class="items-field" href="<?= $url; ?>"><?= $enc->html( $item->getEditor() ); ?></a></td> |
|
195 | + <?php if (in_array('price.lists.type.editor', $fields)) : ?> |
|
196 | + <td class="price-type-editor"><a class="items-field" href="<?= $url; ?>"><?= $enc->html($item->getEditor()); ?></a></td> |
|
197 | 197 | <?php endif; ?> |
198 | 198 | |
199 | 199 | <td class="actions"> |
200 | 200 | <a class="btn act-copy fa" tabindex="1" |
201 | - href="<?= $enc->attr( $this->url( $copyTarget, $copyCntl, $copyAction, ['id' => $id] + $params, [], $copyConfig ) ); ?>" |
|
202 | - title="<?= $enc->attr( $this->translate( 'admin', 'Copy this entry') ); ?>" |
|
203 | - aria-label="<?= $enc->attr( $this->translate( 'admin', 'Copy' ) ); ?>"></a> |
|
204 | - <?php if( !$this->site()->readonly( $item->getSiteId() ) ) : ?> |
|
201 | + href="<?= $enc->attr($this->url($copyTarget, $copyCntl, $copyAction, ['id' => $id] + $params, [], $copyConfig)); ?>" |
|
202 | + title="<?= $enc->attr($this->translate('admin', 'Copy this entry')); ?>" |
|
203 | + aria-label="<?= $enc->attr($this->translate('admin', 'Copy')); ?>"></a> |
|
204 | + <?php if (!$this->site()->readonly($item->getSiteId())) : ?> |
|
205 | 205 | <a class="btn act-delete fa" tabindex="1" |
206 | - href="<?= $enc->attr( $this->url( $delTarget, $delCntl, $delAction, ['id' => $id] + $params, [], $delConfig ) ); ?>" |
|
207 | - title="<?= $enc->attr( $this->translate( 'admin', 'Delete this entry') ); ?>" |
|
208 | - aria-label="<?= $enc->attr( $this->translate( 'admin', 'Delete' ) ); ?>"></a> |
|
206 | + href="<?= $enc->attr($this->url($delTarget, $delCntl, $delAction, ['id' => $id] + $params, [], $delConfig)); ?>" |
|
207 | + title="<?= $enc->attr($this->translate('admin', 'Delete this entry')); ?>" |
|
208 | + aria-label="<?= $enc->attr($this->translate('admin', 'Delete')); ?>"></a> |
|
209 | 209 | <?php endif; ?> |
210 | 210 | </td> |
211 | 211 | </tr> |
@@ -213,18 +213,18 @@ discard block |
||
213 | 213 | </tbody> |
214 | 214 | </table> |
215 | 215 | |
216 | - <?php if( $this->get( 'items', [] ) === [] ) : ?> |
|
217 | - <div class="noitems"><?= $enc->html( sprintf( $this->translate( 'admin', 'No items found' ) ) ); ?></div> |
|
216 | + <?php if ($this->get('items', []) === []) : ?> |
|
217 | + <div class="noitems"><?= $enc->html(sprintf($this->translate('admin', 'No items found'))); ?></div> |
|
218 | 218 | <?php endif; ?> |
219 | 219 | </form> |
220 | 220 | |
221 | 221 | <?= $this->partial( |
222 | - $this->config( 'admin/jqadm/partial/pagination', 'common/partials/pagination-standard.php' ), |
|
223 | - ['pageParams' => $params, 'pos' => 'bottom', 'total' => $this->get( 'total' ), |
|
224 | - 'page' => $this->session( 'aimeos/admin/jqadm/type/price/lists/page', [] )] |
|
222 | + $this->config('admin/jqadm/partial/pagination', 'common/partials/pagination-standard.php'), |
|
223 | + ['pageParams' => $params, 'pos' => 'bottom', 'total' => $this->get('total'), |
|
224 | + 'page' => $this->session('aimeos/admin/jqadm/type/price/lists/page', [])] |
|
225 | 225 | ); |
226 | 226 | ?> |
227 | 227 | |
228 | 228 | <?php $this->block()->stop(); ?> |
229 | 229 | |
230 | -<?= $this->render( $this->config( 'admin/jqadm/template/page', 'common/page-standard.php' ) ); ?> |
|
230 | +<?= $this->render($this->config('admin/jqadm/template/page', 'common/page-standard.php')); ?> |
@@ -8,34 +8,34 @@ discard block |
||
8 | 8 | $enc = $this->encoder(); |
9 | 9 | |
10 | 10 | |
11 | -$target = $this->config( 'admin/jqadm/url/search/target' ); |
|
12 | -$controller = $this->config( 'admin/jqadm/url/search/controller', 'Jqadm' ); |
|
13 | -$action = $this->config( 'admin/jqadm/url/search/action', 'search' ); |
|
14 | -$config = $this->config( 'admin/jqadm/url/search/config', [] ); |
|
11 | +$target = $this->config('admin/jqadm/url/search/target'); |
|
12 | +$controller = $this->config('admin/jqadm/url/search/controller', 'Jqadm'); |
|
13 | +$action = $this->config('admin/jqadm/url/search/action', 'search'); |
|
14 | +$config = $this->config('admin/jqadm/url/search/config', []); |
|
15 | 15 | |
16 | 16 | |
17 | -$newTarget = $this->config( 'admin/jqadm/url/create/target' ); |
|
18 | -$newCntl = $this->config( 'admin/jqadm/url/create/controller', 'Jqadm' ); |
|
19 | -$newAction = $this->config( 'admin/jqadm/url/create/action', 'create' ); |
|
20 | -$newConfig = $this->config( 'admin/jqadm/url/create/config', [] ); |
|
17 | +$newTarget = $this->config('admin/jqadm/url/create/target'); |
|
18 | +$newCntl = $this->config('admin/jqadm/url/create/controller', 'Jqadm'); |
|
19 | +$newAction = $this->config('admin/jqadm/url/create/action', 'create'); |
|
20 | +$newConfig = $this->config('admin/jqadm/url/create/config', []); |
|
21 | 21 | |
22 | 22 | |
23 | -$getTarget = $this->config( 'admin/jqadm/url/get/target' ); |
|
24 | -$getCntl = $this->config( 'admin/jqadm/url/get/controller', 'Jqadm' ); |
|
25 | -$getAction = $this->config( 'admin/jqadm/url/get/action', 'get' ); |
|
26 | -$getConfig = $this->config( 'admin/jqadm/url/get/config', [] ); |
|
23 | +$getTarget = $this->config('admin/jqadm/url/get/target'); |
|
24 | +$getCntl = $this->config('admin/jqadm/url/get/controller', 'Jqadm'); |
|
25 | +$getAction = $this->config('admin/jqadm/url/get/action', 'get'); |
|
26 | +$getConfig = $this->config('admin/jqadm/url/get/config', []); |
|
27 | 27 | |
28 | 28 | |
29 | -$copyTarget = $this->config( 'admin/jqadm/url/copy/target' ); |
|
30 | -$copyCntl = $this->config( 'admin/jqadm/url/copy/controller', 'Jqadm' ); |
|
31 | -$copyAction = $this->config( 'admin/jqadm/url/copy/action', 'copy' ); |
|
32 | -$copyConfig = $this->config( 'admin/jqadm/url/copy/config', [] ); |
|
29 | +$copyTarget = $this->config('admin/jqadm/url/copy/target'); |
|
30 | +$copyCntl = $this->config('admin/jqadm/url/copy/controller', 'Jqadm'); |
|
31 | +$copyAction = $this->config('admin/jqadm/url/copy/action', 'copy'); |
|
32 | +$copyConfig = $this->config('admin/jqadm/url/copy/config', []); |
|
33 | 33 | |
34 | 34 | |
35 | -$delTarget = $this->config( 'admin/jqadm/url/delete/target' ); |
|
36 | -$delCntl = $this->config( 'admin/jqadm/url/delete/controller', 'Jqadm' ); |
|
37 | -$delAction = $this->config( 'admin/jqadm/url/delete/action', 'delete' ); |
|
38 | -$delConfig = $this->config( 'admin/jqadm/url/delete/config', [] ); |
|
35 | +$delTarget = $this->config('admin/jqadm/url/delete/target'); |
|
36 | +$delCntl = $this->config('admin/jqadm/url/delete/controller', 'Jqadm'); |
|
37 | +$delAction = $this->config('admin/jqadm/url/delete/action', 'delete'); |
|
38 | +$delConfig = $this->config('admin/jqadm/url/delete/config', []); |
|
39 | 39 | |
40 | 40 | |
41 | 41 | /** admin/jqadm/type/plugin/fields |
@@ -53,44 +53,44 @@ discard block |
||
53 | 53 | * @category Developer |
54 | 54 | */ |
55 | 55 | $default = ['plugin.type.domain', 'plugin.type.status', 'plugin.type.code', 'plugin.type.label']; |
56 | -$default = $this->config( 'admin/jqadm/type/plugin/fields', $default ); |
|
57 | -$fields = $this->session( 'aimeos/admin/jqadm/type/plugin/fields', $default ); |
|
56 | +$default = $this->config('admin/jqadm/type/plugin/fields', $default); |
|
57 | +$fields = $this->session('aimeos/admin/jqadm/type/plugin/fields', $default); |
|
58 | 58 | |
59 | -$searchParams = $params = $this->get( 'pageParams', [] ); |
|
59 | +$searchParams = $params = $this->get('pageParams', []); |
|
60 | 60 | $searchParams['page']['start'] = 0; |
61 | 61 | |
62 | 62 | $typeList = []; |
63 | -foreach( $this->get( 'itemTypes', [] ) as $id => $typeItem ) { |
|
63 | +foreach ($this->get('itemTypes', []) as $id => $typeItem) { |
|
64 | 64 | $typeList[$id] = $typeItem->getCode(); |
65 | 65 | } |
66 | 66 | |
67 | 67 | $columnList = [ |
68 | - 'plugin.type.id' => $this->translate( 'admin', 'ID' ), |
|
69 | - 'plugin.type.domain' => $this->translate( 'admin', 'Domain' ), |
|
70 | - 'plugin.type.status' => $this->translate( 'admin', 'Status' ), |
|
71 | - 'plugin.type.code' => $this->translate( 'admin', 'Code' ), |
|
72 | - 'plugin.type.label' => $this->translate( 'admin', 'Label' ), |
|
73 | - 'plugin.type.position' => $this->translate( 'admin', 'Position' ), |
|
74 | - 'plugin.type.ctime' => $this->translate( 'admin', 'Created' ), |
|
75 | - 'plugin.type.mtime' => $this->translate( 'admin', 'Modified' ), |
|
76 | - 'plugin.type.editor' => $this->translate( 'admin', 'Editor' ), |
|
68 | + 'plugin.type.id' => $this->translate('admin', 'ID'), |
|
69 | + 'plugin.type.domain' => $this->translate('admin', 'Domain'), |
|
70 | + 'plugin.type.status' => $this->translate('admin', 'Status'), |
|
71 | + 'plugin.type.code' => $this->translate('admin', 'Code'), |
|
72 | + 'plugin.type.label' => $this->translate('admin', 'Label'), |
|
73 | + 'plugin.type.position' => $this->translate('admin', 'Position'), |
|
74 | + 'plugin.type.ctime' => $this->translate('admin', 'Created'), |
|
75 | + 'plugin.type.mtime' => $this->translate('admin', 'Modified'), |
|
76 | + 'plugin.type.editor' => $this->translate('admin', 'Editor'), |
|
77 | 77 | ]; |
78 | 78 | |
79 | 79 | ?> |
80 | -<?php $this->block()->start( 'jqadm_content' ); ?> |
|
80 | +<?php $this->block()->start('jqadm_content'); ?> |
|
81 | 81 | |
82 | 82 | <nav class="main-navbar"> |
83 | 83 | |
84 | 84 | <span class="navbar-brand"> |
85 | - <?= $enc->html( $this->translate( 'admin', 'Plugin Types' ) ); ?> |
|
86 | - <span class="navbar-secondary">(<?= $enc->html( $this->site()->label() ); ?>)</span> |
|
85 | + <?= $enc->html($this->translate('admin', 'Plugin Types')); ?> |
|
86 | + <span class="navbar-secondary">(<?= $enc->html($this->site()->label()); ?>)</span> |
|
87 | 87 | </span> |
88 | 88 | |
89 | 89 | <?= $this->partial( |
90 | - $this->config( 'admin/jqadm/partial/navsearch', 'common/partials/navsearch-standard.php' ), [ |
|
91 | - 'filter' => $this->session( 'aimeos/admin/jqadm/type/plugin/filter', [] ), |
|
92 | - 'filterAttributes' => $this->get( 'filterAttributes', [] ), |
|
93 | - 'filterOperators' => $this->get( 'filterOperators', [] ), |
|
90 | + $this->config('admin/jqadm/partial/navsearch', 'common/partials/navsearch-standard.php'), [ |
|
91 | + 'filter' => $this->session('aimeos/admin/jqadm/type/plugin/filter', []), |
|
92 | + 'filterAttributes' => $this->get('filterAttributes', []), |
|
93 | + 'filterOperators' => $this->get('filterOperators', []), |
|
94 | 94 | 'params' => $params, |
95 | 95 | ] |
96 | 96 | ); ?> |
@@ -98,33 +98,33 @@ discard block |
||
98 | 98 | |
99 | 99 | |
100 | 100 | <?= $this->partial( |
101 | - $this->config( 'admin/jqadm/partial/pagination', 'common/partials/pagination-standard.php' ), |
|
102 | - ['pageParams' => $params, 'pos' => 'top', 'total' => $this->get( 'total' ), |
|
103 | - 'page' => $this->session( 'aimeos/admin/jqadm/type/plugin/page', [] )] |
|
101 | + $this->config('admin/jqadm/partial/pagination', 'common/partials/pagination-standard.php'), |
|
102 | + ['pageParams' => $params, 'pos' => 'top', 'total' => $this->get('total'), |
|
103 | + 'page' => $this->session('aimeos/admin/jqadm/type/plugin/page', [])] |
|
104 | 104 | ); |
105 | 105 | ?> |
106 | 106 | |
107 | -<form class="list list-plugin-type" method="POST" action="<?= $enc->attr( $this->url( $target, $controller, $action, $searchParams, [], $config ) ); ?>"> |
|
107 | +<form class="list list-plugin-type" method="POST" action="<?= $enc->attr($this->url($target, $controller, $action, $searchParams, [], $config)); ?>"> |
|
108 | 108 | <?= $this->csrf()->formfield(); ?> |
109 | 109 | |
110 | 110 | <table class="list-items table table-hover table-striped"> |
111 | 111 | <thead class="list-header"> |
112 | 112 | <tr> |
113 | 113 | <?= $this->partial( |
114 | - $this->config( 'admin/jqadm/partial/listhead', 'common/partials/listhead-standard.php' ), |
|
115 | - ['fields' => $fields, 'params' => $params, 'data' => $columnList, 'sort' => $this->session( 'aimeos/admin/jqadm/type/plugin/sort' )] |
|
114 | + $this->config('admin/jqadm/partial/listhead', 'common/partials/listhead-standard.php'), |
|
115 | + ['fields' => $fields, 'params' => $params, 'data' => $columnList, 'sort' => $this->session('aimeos/admin/jqadm/type/plugin/sort')] |
|
116 | 116 | ); |
117 | 117 | ?> |
118 | 118 | |
119 | 119 | <th class="actions"> |
120 | 120 | <a class="btn fa act-add" tabindex="1" |
121 | - href="<?= $enc->attr( $this->url( $newTarget, $newCntl, $newAction, $params, [], $newConfig ) ); ?>" |
|
122 | - title="<?= $enc->attr( $this->translate( 'admin', 'Insert new entry (Ctrl+I)') ); ?>" |
|
123 | - aria-label="<?= $enc->attr( $this->translate( 'admin', 'Add' ) ); ?>"> |
|
121 | + href="<?= $enc->attr($this->url($newTarget, $newCntl, $newAction, $params, [], $newConfig)); ?>" |
|
122 | + title="<?= $enc->attr($this->translate('admin', 'Insert new entry (Ctrl+I)')); ?>" |
|
123 | + aria-label="<?= $enc->attr($this->translate('admin', 'Add')); ?>"> |
|
124 | 124 | </a> |
125 | 125 | |
126 | 126 | <?= $this->partial( |
127 | - $this->config( 'admin/jqadm/partial/columns', 'common/partials/columns-standard.php' ), |
|
127 | + $this->config('admin/jqadm/partial/columns', 'common/partials/columns-standard.php'), |
|
128 | 128 | ['fields' => $fields, 'data' => $columnList] |
129 | 129 | ); |
130 | 130 | ?> |
@@ -134,26 +134,26 @@ discard block |
||
134 | 134 | <tbody> |
135 | 135 | |
136 | 136 | <?= $this->partial( |
137 | - $this->config( 'admin/jqadm/partial/listsearch', 'common/partials/listsearch-standard.php' ), [ |
|
138 | - 'fields' => $fields, 'filter' => $this->session( 'aimeos/admin/jqadm/type/plugin/filter', [] ), |
|
137 | + $this->config('admin/jqadm/partial/listsearch', 'common/partials/listsearch-standard.php'), [ |
|
138 | + 'fields' => $fields, 'filter' => $this->session('aimeos/admin/jqadm/type/plugin/filter', []), |
|
139 | 139 | 'data' => [ |
140 | 140 | 'plugin.type.id' => ['op' => '=='], |
141 | 141 | 'plugin.type.domain' => ['op' => '==', 'type' => 'select', 'val' => [ |
142 | - 'plugin' => $this->translate( 'admin', 'plugin' ), |
|
143 | - 'catalog' => $this->translate( 'admin', 'catalog' ), |
|
144 | - 'customer' => $this->translate( 'admin', 'customer' ), |
|
145 | - 'media' => $this->translate( 'admin', 'media' ), |
|
146 | - 'price' => $this->translate( 'admin', 'price' ), |
|
147 | - 'product' => $this->translate( 'admin', 'product' ), |
|
148 | - 'service' => $this->translate( 'admin', 'service' ), |
|
149 | - 'supplier' => $this->translate( 'admin', 'supplier' ), |
|
150 | - 'text' => $this->translate( 'admin', 'text' ), |
|
142 | + 'plugin' => $this->translate('admin', 'plugin'), |
|
143 | + 'catalog' => $this->translate('admin', 'catalog'), |
|
144 | + 'customer' => $this->translate('admin', 'customer'), |
|
145 | + 'media' => $this->translate('admin', 'media'), |
|
146 | + 'price' => $this->translate('admin', 'price'), |
|
147 | + 'product' => $this->translate('admin', 'product'), |
|
148 | + 'service' => $this->translate('admin', 'service'), |
|
149 | + 'supplier' => $this->translate('admin', 'supplier'), |
|
150 | + 'text' => $this->translate('admin', 'text'), |
|
151 | 151 | ]], |
152 | 152 | 'plugin.type.status' => ['op' => '==', 'type' => 'select', 'val' => [ |
153 | - '1' => $this->translate( 'mshop/code', 'status:1' ), |
|
154 | - '0' => $this->translate( 'mshop/code', 'status:0' ), |
|
155 | - '-1' => $this->translate( 'mshop/code', 'status:-1' ), |
|
156 | - '-2' => $this->translate( 'mshop/code', 'status:-2' ), |
|
153 | + '1' => $this->translate('mshop/code', 'status:1'), |
|
154 | + '0' => $this->translate('mshop/code', 'status:0'), |
|
155 | + '-1' => $this->translate('mshop/code', 'status:-1'), |
|
156 | + '-2' => $this->translate('mshop/code', 'status:-2'), |
|
157 | 157 | ]], |
158 | 158 | 'plugin.type.code' => [], |
159 | 159 | 'plugin.type.label' => [], |
@@ -165,47 +165,47 @@ discard block |
||
165 | 165 | ] ); |
166 | 166 | ?> |
167 | 167 | |
168 | - <?php foreach( $this->get( 'items', [] ) as $id => $item ) : ?> |
|
169 | - <?php $url = $enc->attr( $this->url( $getTarget, $getCntl, $getAction, ['id' => $id] + $params, [], $getConfig ) ); ?> |
|
170 | - <tr class="<?= $this->site()->readonly( $item->getSiteId() ); ?>"> |
|
171 | - <?php if( in_array( 'plugin.type.id', $fields ) ) : ?> |
|
172 | - <td class="plugin-type-id"><a class="items-field" href="<?= $url; ?>"><?= $enc->html( $item->getId() ); ?></a></td> |
|
168 | + <?php foreach ($this->get('items', []) as $id => $item) : ?> |
|
169 | + <?php $url = $enc->attr($this->url($getTarget, $getCntl, $getAction, ['id' => $id] + $params, [], $getConfig)); ?> |
|
170 | + <tr class="<?= $this->site()->readonly($item->getSiteId()); ?>"> |
|
171 | + <?php if (in_array('plugin.type.id', $fields)) : ?> |
|
172 | + <td class="plugin-type-id"><a class="items-field" href="<?= $url; ?>"><?= $enc->html($item->getId()); ?></a></td> |
|
173 | 173 | <?php endif; ?> |
174 | - <?php if( in_array( 'plugin.type.domain', $fields ) ) : ?> |
|
175 | - <td class="plugin-type-domain"><a class="items-field" href="<?= $url; ?>"><?= $enc->html( $item->getDomain() ); ?></a></td> |
|
174 | + <?php if (in_array('plugin.type.domain', $fields)) : ?> |
|
175 | + <td class="plugin-type-domain"><a class="items-field" href="<?= $url; ?>"><?= $enc->html($item->getDomain()); ?></a></td> |
|
176 | 176 | <?php endif; ?> |
177 | - <?php if( in_array( 'plugin.type.status', $fields ) ) : ?> |
|
178 | - <td class="plugin-type-status"><a class="items-field" href="<?= $url; ?>"><div class="fa status-<?= $enc->attr( $item->getStatus() ); ?>"></div></a></td> |
|
177 | + <?php if (in_array('plugin.type.status', $fields)) : ?> |
|
178 | + <td class="plugin-type-status"><a class="items-field" href="<?= $url; ?>"><div class="fa status-<?= $enc->attr($item->getStatus()); ?>"></div></a></td> |
|
179 | 179 | <?php endif; ?> |
180 | - <?php if( in_array( 'plugin.type.code', $fields ) ) : ?> |
|
181 | - <td class="plugin-type-code"><a class="items-field" href="<?= $url; ?>" tabindex="1"><?= $enc->html( $item->getCode() ); ?></a></td> |
|
180 | + <?php if (in_array('plugin.type.code', $fields)) : ?> |
|
181 | + <td class="plugin-type-code"><a class="items-field" href="<?= $url; ?>" tabindex="1"><?= $enc->html($item->getCode()); ?></a></td> |
|
182 | 182 | <?php endif; ?> |
183 | - <?php if( in_array( 'plugin.type.label', $fields ) ) : ?> |
|
184 | - <td class="plugin-type-label"><a class="items-field" href="<?= $url; ?>"><?= $enc->html( $item->getLabel() ); ?></a></td> |
|
183 | + <?php if (in_array('plugin.type.label', $fields)) : ?> |
|
184 | + <td class="plugin-type-label"><a class="items-field" href="<?= $url; ?>"><?= $enc->html($item->getLabel()); ?></a></td> |
|
185 | 185 | <?php endif; ?> |
186 | - <?php if( in_array( 'plugin.type.position', $fields ) ) : ?> |
|
187 | - <td class="plugin-type-position"><a class="items-field" href="<?= $url; ?>"><?= $enc->html( $item->getPosition() ); ?></a></td> |
|
186 | + <?php if (in_array('plugin.type.position', $fields)) : ?> |
|
187 | + <td class="plugin-type-position"><a class="items-field" href="<?= $url; ?>"><?= $enc->html($item->getPosition()); ?></a></td> |
|
188 | 188 | <?php endif; ?> |
189 | - <?php if( in_array( 'plugin.type.ctime', $fields ) ) : ?> |
|
190 | - <td class="plugin-type-ctime"><a class="items-field" href="<?= $url; ?>"><?= $enc->html( $item->getTimeCreated() ); ?></a></td> |
|
189 | + <?php if (in_array('plugin.type.ctime', $fields)) : ?> |
|
190 | + <td class="plugin-type-ctime"><a class="items-field" href="<?= $url; ?>"><?= $enc->html($item->getTimeCreated()); ?></a></td> |
|
191 | 191 | <?php endif; ?> |
192 | - <?php if( in_array( 'plugin.type.mtime', $fields ) ) : ?> |
|
193 | - <td class="plugin-type-mtime"><a class="items-field" href="<?= $url; ?>"><?= $enc->html( $item->getTimeModified() ); ?></a></td> |
|
192 | + <?php if (in_array('plugin.type.mtime', $fields)) : ?> |
|
193 | + <td class="plugin-type-mtime"><a class="items-field" href="<?= $url; ?>"><?= $enc->html($item->getTimeModified()); ?></a></td> |
|
194 | 194 | <?php endif; ?> |
195 | - <?php if( in_array( 'plugin.type.editor', $fields ) ) : ?> |
|
196 | - <td class="plugin-type-editor"><a class="items-field" href="<?= $url; ?>"><?= $enc->html( $item->getEditor() ); ?></a></td> |
|
195 | + <?php if (in_array('plugin.type.editor', $fields)) : ?> |
|
196 | + <td class="plugin-type-editor"><a class="items-field" href="<?= $url; ?>"><?= $enc->html($item->getEditor()); ?></a></td> |
|
197 | 197 | <?php endif; ?> |
198 | 198 | |
199 | 199 | <td class="actions"> |
200 | 200 | <a class="btn act-copy fa" tabindex="1" |
201 | - href="<?= $enc->attr( $this->url( $copyTarget, $copyCntl, $copyAction, ['id' => $id] + $params, [], $copyConfig ) ); ?>" |
|
202 | - title="<?= $enc->attr( $this->translate( 'admin', 'Copy this entry') ); ?>" |
|
203 | - aria-label="<?= $enc->attr( $this->translate( 'admin', 'Copy' ) ); ?>"></a> |
|
204 | - <?php if( !$this->site()->readonly( $item->getSiteId() ) ) : ?> |
|
201 | + href="<?= $enc->attr($this->url($copyTarget, $copyCntl, $copyAction, ['id' => $id] + $params, [], $copyConfig)); ?>" |
|
202 | + title="<?= $enc->attr($this->translate('admin', 'Copy this entry')); ?>" |
|
203 | + aria-label="<?= $enc->attr($this->translate('admin', 'Copy')); ?>"></a> |
|
204 | + <?php if (!$this->site()->readonly($item->getSiteId())) : ?> |
|
205 | 205 | <a class="btn act-delete fa" tabindex="1" |
206 | - href="<?= $enc->attr( $this->url( $delTarget, $delCntl, $delAction, ['id' => $id] + $params, [], $delConfig ) ); ?>" |
|
207 | - title="<?= $enc->attr( $this->translate( 'admin', 'Delete this entry') ); ?>" |
|
208 | - aria-label="<?= $enc->attr( $this->translate( 'admin', 'Delete' ) ); ?>"></a> |
|
206 | + href="<?= $enc->attr($this->url($delTarget, $delCntl, $delAction, ['id' => $id] + $params, [], $delConfig)); ?>" |
|
207 | + title="<?= $enc->attr($this->translate('admin', 'Delete this entry')); ?>" |
|
208 | + aria-label="<?= $enc->attr($this->translate('admin', 'Delete')); ?>"></a> |
|
209 | 209 | <?php endif; ?> |
210 | 210 | </td> |
211 | 211 | </tr> |
@@ -213,18 +213,18 @@ discard block |
||
213 | 213 | </tbody> |
214 | 214 | </table> |
215 | 215 | |
216 | - <?php if( $this->get( 'items', [] ) === [] ) : ?> |
|
217 | - <div class="noitems"><?= $enc->html( sprintf( $this->translate( 'admin', 'No items found' ) ) ); ?></div> |
|
216 | + <?php if ($this->get('items', []) === []) : ?> |
|
217 | + <div class="noitems"><?= $enc->html(sprintf($this->translate('admin', 'No items found'))); ?></div> |
|
218 | 218 | <?php endif; ?> |
219 | 219 | </form> |
220 | 220 | |
221 | 221 | <?= $this->partial( |
222 | - $this->config( 'admin/jqadm/partial/pagination', 'common/partials/pagination-standard.php' ), |
|
223 | - ['pageParams' => $params, 'pos' => 'bottom', 'total' => $this->get( 'total' ), |
|
224 | - 'page' => $this->session( 'aimeos/admin/jqadm/type/plugin/page', [] )] |
|
222 | + $this->config('admin/jqadm/partial/pagination', 'common/partials/pagination-standard.php'), |
|
223 | + ['pageParams' => $params, 'pos' => 'bottom', 'total' => $this->get('total'), |
|
224 | + 'page' => $this->session('aimeos/admin/jqadm/type/plugin/page', [])] |
|
225 | 225 | ); |
226 | 226 | ?> |
227 | 227 | |
228 | 228 | <?php $this->block()->stop(); ?> |
229 | 229 | |
230 | -<?= $this->render( $this->config( 'admin/jqadm/template/page', 'common/page-standard.php' ) ); ?> |
|
230 | +<?= $this->render($this->config('admin/jqadm/template/page', 'common/page-standard.php')); ?> |
@@ -8,34 +8,34 @@ discard block |
||
8 | 8 | $enc = $this->encoder(); |
9 | 9 | |
10 | 10 | |
11 | -$target = $this->config( 'admin/jqadm/url/search/target' ); |
|
12 | -$controller = $this->config( 'admin/jqadm/url/search/controller', 'Jqadm' ); |
|
13 | -$action = $this->config( 'admin/jqadm/url/search/action', 'search' ); |
|
14 | -$config = $this->config( 'admin/jqadm/url/search/config', [] ); |
|
11 | +$target = $this->config('admin/jqadm/url/search/target'); |
|
12 | +$controller = $this->config('admin/jqadm/url/search/controller', 'Jqadm'); |
|
13 | +$action = $this->config('admin/jqadm/url/search/action', 'search'); |
|
14 | +$config = $this->config('admin/jqadm/url/search/config', []); |
|
15 | 15 | |
16 | 16 | |
17 | -$newTarget = $this->config( 'admin/jqadm/url/create/target' ); |
|
18 | -$newCntl = $this->config( 'admin/jqadm/url/create/controller', 'Jqadm' ); |
|
19 | -$newAction = $this->config( 'admin/jqadm/url/create/action', 'create' ); |
|
20 | -$newConfig = $this->config( 'admin/jqadm/url/create/config', [] ); |
|
17 | +$newTarget = $this->config('admin/jqadm/url/create/target'); |
|
18 | +$newCntl = $this->config('admin/jqadm/url/create/controller', 'Jqadm'); |
|
19 | +$newAction = $this->config('admin/jqadm/url/create/action', 'create'); |
|
20 | +$newConfig = $this->config('admin/jqadm/url/create/config', []); |
|
21 | 21 | |
22 | 22 | |
23 | -$getTarget = $this->config( 'admin/jqadm/url/get/target' ); |
|
24 | -$getCntl = $this->config( 'admin/jqadm/url/get/controller', 'Jqadm' ); |
|
25 | -$getAction = $this->config( 'admin/jqadm/url/get/action', 'get' ); |
|
26 | -$getConfig = $this->config( 'admin/jqadm/url/get/config', [] ); |
|
23 | +$getTarget = $this->config('admin/jqadm/url/get/target'); |
|
24 | +$getCntl = $this->config('admin/jqadm/url/get/controller', 'Jqadm'); |
|
25 | +$getAction = $this->config('admin/jqadm/url/get/action', 'get'); |
|
26 | +$getConfig = $this->config('admin/jqadm/url/get/config', []); |
|
27 | 27 | |
28 | 28 | |
29 | -$copyTarget = $this->config( 'admin/jqadm/url/copy/target' ); |
|
30 | -$copyCntl = $this->config( 'admin/jqadm/url/copy/controller', 'Jqadm' ); |
|
31 | -$copyAction = $this->config( 'admin/jqadm/url/copy/action', 'copy' ); |
|
32 | -$copyConfig = $this->config( 'admin/jqadm/url/copy/config', [] ); |
|
29 | +$copyTarget = $this->config('admin/jqadm/url/copy/target'); |
|
30 | +$copyCntl = $this->config('admin/jqadm/url/copy/controller', 'Jqadm'); |
|
31 | +$copyAction = $this->config('admin/jqadm/url/copy/action', 'copy'); |
|
32 | +$copyConfig = $this->config('admin/jqadm/url/copy/config', []); |
|
33 | 33 | |
34 | 34 | |
35 | -$delTarget = $this->config( 'admin/jqadm/url/delete/target' ); |
|
36 | -$delCntl = $this->config( 'admin/jqadm/url/delete/controller', 'Jqadm' ); |
|
37 | -$delAction = $this->config( 'admin/jqadm/url/delete/action', 'delete' ); |
|
38 | -$delConfig = $this->config( 'admin/jqadm/url/delete/config', [] ); |
|
35 | +$delTarget = $this->config('admin/jqadm/url/delete/target'); |
|
36 | +$delCntl = $this->config('admin/jqadm/url/delete/controller', 'Jqadm'); |
|
37 | +$delAction = $this->config('admin/jqadm/url/delete/action', 'delete'); |
|
38 | +$delConfig = $this->config('admin/jqadm/url/delete/config', []); |
|
39 | 39 | |
40 | 40 | |
41 | 41 | /** admin/jqadm/type/product/fields |
@@ -53,44 +53,44 @@ discard block |
||
53 | 53 | * @category Developer |
54 | 54 | */ |
55 | 55 | $default = ['product.type.domain', 'product.type.status', 'product.type.code', 'product.type.label']; |
56 | -$default = $this->config( 'admin/jqadm/type/product/fields', $default ); |
|
57 | -$fields = $this->session( 'aimeos/admin/jqadm/type/product/fields', $default ); |
|
56 | +$default = $this->config('admin/jqadm/type/product/fields', $default); |
|
57 | +$fields = $this->session('aimeos/admin/jqadm/type/product/fields', $default); |
|
58 | 58 | |
59 | -$searchParams = $params = $this->get( 'pageParams', [] ); |
|
59 | +$searchParams = $params = $this->get('pageParams', []); |
|
60 | 60 | $searchParams['page']['start'] = 0; |
61 | 61 | |
62 | 62 | $typeList = []; |
63 | -foreach( $this->get( 'itemTypes', [] ) as $id => $typeItem ) { |
|
63 | +foreach ($this->get('itemTypes', []) as $id => $typeItem) { |
|
64 | 64 | $typeList[$id] = $typeItem->getCode(); |
65 | 65 | } |
66 | 66 | |
67 | 67 | $columnList = [ |
68 | - 'product.type.id' => $this->translate( 'admin', 'ID' ), |
|
69 | - 'product.type.domain' => $this->translate( 'admin', 'Domain' ), |
|
70 | - 'product.type.status' => $this->translate( 'admin', 'Status' ), |
|
71 | - 'product.type.code' => $this->translate( 'admin', 'Code' ), |
|
72 | - 'product.type.label' => $this->translate( 'admin', 'Label' ), |
|
73 | - 'product.type.position' => $this->translate( 'admin', 'Position' ), |
|
74 | - 'product.type.ctime' => $this->translate( 'admin', 'Created' ), |
|
75 | - 'product.type.mtime' => $this->translate( 'admin', 'Modified' ), |
|
76 | - 'product.type.editor' => $this->translate( 'admin', 'Editor' ), |
|
68 | + 'product.type.id' => $this->translate('admin', 'ID'), |
|
69 | + 'product.type.domain' => $this->translate('admin', 'Domain'), |
|
70 | + 'product.type.status' => $this->translate('admin', 'Status'), |
|
71 | + 'product.type.code' => $this->translate('admin', 'Code'), |
|
72 | + 'product.type.label' => $this->translate('admin', 'Label'), |
|
73 | + 'product.type.position' => $this->translate('admin', 'Position'), |
|
74 | + 'product.type.ctime' => $this->translate('admin', 'Created'), |
|
75 | + 'product.type.mtime' => $this->translate('admin', 'Modified'), |
|
76 | + 'product.type.editor' => $this->translate('admin', 'Editor'), |
|
77 | 77 | ]; |
78 | 78 | |
79 | 79 | ?> |
80 | -<?php $this->block()->start( 'jqadm_content' ); ?> |
|
80 | +<?php $this->block()->start('jqadm_content'); ?> |
|
81 | 81 | |
82 | 82 | <nav class="main-navbar"> |
83 | 83 | |
84 | 84 | <span class="navbar-brand"> |
85 | - <?= $enc->html( $this->translate( 'admin', 'Product Types' ) ); ?> |
|
86 | - <span class="navbar-secondary">(<?= $enc->html( $this->site()->label() ); ?>)</span> |
|
85 | + <?= $enc->html($this->translate('admin', 'Product Types')); ?> |
|
86 | + <span class="navbar-secondary">(<?= $enc->html($this->site()->label()); ?>)</span> |
|
87 | 87 | </span> |
88 | 88 | |
89 | 89 | <?= $this->partial( |
90 | - $this->config( 'admin/jqadm/partial/navsearch', 'common/partials/navsearch-standard.php' ), [ |
|
91 | - 'filter' => $this->session( 'aimeos/admin/jqadm/type/product/filter', [] ), |
|
92 | - 'filterAttributes' => $this->get( 'filterAttributes', [] ), |
|
93 | - 'filterOperators' => $this->get( 'filterOperators', [] ), |
|
90 | + $this->config('admin/jqadm/partial/navsearch', 'common/partials/navsearch-standard.php'), [ |
|
91 | + 'filter' => $this->session('aimeos/admin/jqadm/type/product/filter', []), |
|
92 | + 'filterAttributes' => $this->get('filterAttributes', []), |
|
93 | + 'filterOperators' => $this->get('filterOperators', []), |
|
94 | 94 | 'params' => $params, |
95 | 95 | ] |
96 | 96 | ); ?> |
@@ -98,33 +98,33 @@ discard block |
||
98 | 98 | |
99 | 99 | |
100 | 100 | <?= $this->partial( |
101 | - $this->config( 'admin/jqadm/partial/pagination', 'common/partials/pagination-standard.php' ), |
|
102 | - ['pageParams' => $params, 'pos' => 'top', 'total' => $this->get( 'total' ), |
|
103 | - 'page' => $this->session( 'aimeos/admin/jqadm/type/product/page', [] )] |
|
101 | + $this->config('admin/jqadm/partial/pagination', 'common/partials/pagination-standard.php'), |
|
102 | + ['pageParams' => $params, 'pos' => 'top', 'total' => $this->get('total'), |
|
103 | + 'page' => $this->session('aimeos/admin/jqadm/type/product/page', [])] |
|
104 | 104 | ); |
105 | 105 | ?> |
106 | 106 | |
107 | -<form class="list list-product-type" method="POST" action="<?= $enc->attr( $this->url( $target, $controller, $action, $searchParams, [], $config ) ); ?>"> |
|
107 | +<form class="list list-product-type" method="POST" action="<?= $enc->attr($this->url($target, $controller, $action, $searchParams, [], $config)); ?>"> |
|
108 | 108 | <?= $this->csrf()->formfield(); ?> |
109 | 109 | |
110 | 110 | <table class="list-items table table-hover table-striped"> |
111 | 111 | <thead class="list-header"> |
112 | 112 | <tr> |
113 | 113 | <?= $this->partial( |
114 | - $this->config( 'admin/jqadm/partial/listhead', 'common/partials/listhead-standard.php' ), |
|
115 | - ['fields' => $fields, 'params' => $params, 'data' => $columnList, 'sort' => $this->session( 'aimeos/admin/jqadm/type/product/sort' )] |
|
114 | + $this->config('admin/jqadm/partial/listhead', 'common/partials/listhead-standard.php'), |
|
115 | + ['fields' => $fields, 'params' => $params, 'data' => $columnList, 'sort' => $this->session('aimeos/admin/jqadm/type/product/sort')] |
|
116 | 116 | ); |
117 | 117 | ?> |
118 | 118 | |
119 | 119 | <th class="actions"> |
120 | 120 | <a class="btn fa act-add" tabindex="1" |
121 | - href="<?= $enc->attr( $this->url( $newTarget, $newCntl, $newAction, $params, [], $newConfig ) ); ?>" |
|
122 | - title="<?= $enc->attr( $this->translate( 'admin', 'Insert new entry (Ctrl+I)') ); ?>" |
|
123 | - aria-label="<?= $enc->attr( $this->translate( 'admin', 'Add' ) ); ?>"> |
|
121 | + href="<?= $enc->attr($this->url($newTarget, $newCntl, $newAction, $params, [], $newConfig)); ?>" |
|
122 | + title="<?= $enc->attr($this->translate('admin', 'Insert new entry (Ctrl+I)')); ?>" |
|
123 | + aria-label="<?= $enc->attr($this->translate('admin', 'Add')); ?>"> |
|
124 | 124 | </a> |
125 | 125 | |
126 | 126 | <?= $this->partial( |
127 | - $this->config( 'admin/jqadm/partial/columns', 'common/partials/columns-standard.php' ), |
|
127 | + $this->config('admin/jqadm/partial/columns', 'common/partials/columns-standard.php'), |
|
128 | 128 | ['fields' => $fields, 'data' => $columnList] |
129 | 129 | ); |
130 | 130 | ?> |
@@ -134,26 +134,26 @@ discard block |
||
134 | 134 | <tbody> |
135 | 135 | |
136 | 136 | <?= $this->partial( |
137 | - $this->config( 'admin/jqadm/partial/listsearch', 'common/partials/listsearch-standard.php' ), [ |
|
138 | - 'fields' => $fields, 'filter' => $this->session( 'aimeos/admin/jqadm/type/product/filter', [] ), |
|
137 | + $this->config('admin/jqadm/partial/listsearch', 'common/partials/listsearch-standard.php'), [ |
|
138 | + 'fields' => $fields, 'filter' => $this->session('aimeos/admin/jqadm/type/product/filter', []), |
|
139 | 139 | 'data' => [ |
140 | 140 | 'product.type.id' => ['op' => '=='], |
141 | 141 | 'product.type.domain' => ['op' => '==', 'type' => 'select', 'val' => [ |
142 | - 'product' => $this->translate( 'admin', 'product' ), |
|
143 | - 'catalog' => $this->translate( 'admin', 'catalog' ), |
|
144 | - 'customer' => $this->translate( 'admin', 'customer' ), |
|
145 | - 'media' => $this->translate( 'admin', 'media' ), |
|
146 | - 'price' => $this->translate( 'admin', 'price' ), |
|
147 | - 'product' => $this->translate( 'admin', 'product' ), |
|
148 | - 'service' => $this->translate( 'admin', 'service' ), |
|
149 | - 'supplier' => $this->translate( 'admin', 'supplier' ), |
|
150 | - 'text' => $this->translate( 'admin', 'text' ), |
|
142 | + 'product' => $this->translate('admin', 'product'), |
|
143 | + 'catalog' => $this->translate('admin', 'catalog'), |
|
144 | + 'customer' => $this->translate('admin', 'customer'), |
|
145 | + 'media' => $this->translate('admin', 'media'), |
|
146 | + 'price' => $this->translate('admin', 'price'), |
|
147 | + 'product' => $this->translate('admin', 'product'), |
|
148 | + 'service' => $this->translate('admin', 'service'), |
|
149 | + 'supplier' => $this->translate('admin', 'supplier'), |
|
150 | + 'text' => $this->translate('admin', 'text'), |
|
151 | 151 | ]], |
152 | 152 | 'product.type.status' => ['op' => '==', 'type' => 'select', 'val' => [ |
153 | - '1' => $this->translate( 'mshop/code', 'status:1' ), |
|
154 | - '0' => $this->translate( 'mshop/code', 'status:0' ), |
|
155 | - '-1' => $this->translate( 'mshop/code', 'status:-1' ), |
|
156 | - '-2' => $this->translate( 'mshop/code', 'status:-2' ), |
|
153 | + '1' => $this->translate('mshop/code', 'status:1'), |
|
154 | + '0' => $this->translate('mshop/code', 'status:0'), |
|
155 | + '-1' => $this->translate('mshop/code', 'status:-1'), |
|
156 | + '-2' => $this->translate('mshop/code', 'status:-2'), |
|
157 | 157 | ]], |
158 | 158 | 'product.type.code' => [], |
159 | 159 | 'product.type.label' => [], |
@@ -165,47 +165,47 @@ discard block |
||
165 | 165 | ] ); |
166 | 166 | ?> |
167 | 167 | |
168 | - <?php foreach( $this->get( 'items', [] ) as $id => $item ) : ?> |
|
169 | - <?php $url = $enc->attr( $this->url( $getTarget, $getCntl, $getAction, ['id' => $id] + $params, [], $getConfig ) ); ?> |
|
170 | - <tr class="<?= $this->site()->readonly( $item->getSiteId() ); ?>"> |
|
171 | - <?php if( in_array( 'product.type.id', $fields ) ) : ?> |
|
172 | - <td class="product-type-id"><a class="items-field" href="<?= $url; ?>"><?= $enc->html( $item->getId() ); ?></a></td> |
|
168 | + <?php foreach ($this->get('items', []) as $id => $item) : ?> |
|
169 | + <?php $url = $enc->attr($this->url($getTarget, $getCntl, $getAction, ['id' => $id] + $params, [], $getConfig)); ?> |
|
170 | + <tr class="<?= $this->site()->readonly($item->getSiteId()); ?>"> |
|
171 | + <?php if (in_array('product.type.id', $fields)) : ?> |
|
172 | + <td class="product-type-id"><a class="items-field" href="<?= $url; ?>"><?= $enc->html($item->getId()); ?></a></td> |
|
173 | 173 | <?php endif; ?> |
174 | - <?php if( in_array( 'product.type.domain', $fields ) ) : ?> |
|
175 | - <td class="product-type-domain"><a class="items-field" href="<?= $url; ?>"><?= $enc->html( $item->getDomain() ); ?></a></td> |
|
174 | + <?php if (in_array('product.type.domain', $fields)) : ?> |
|
175 | + <td class="product-type-domain"><a class="items-field" href="<?= $url; ?>"><?= $enc->html($item->getDomain()); ?></a></td> |
|
176 | 176 | <?php endif; ?> |
177 | - <?php if( in_array( 'product.type.status', $fields ) ) : ?> |
|
178 | - <td class="product-type-status"><a class="items-field" href="<?= $url; ?>"><div class="fa status-<?= $enc->attr( $item->getStatus() ); ?>"></div></a></td> |
|
177 | + <?php if (in_array('product.type.status', $fields)) : ?> |
|
178 | + <td class="product-type-status"><a class="items-field" href="<?= $url; ?>"><div class="fa status-<?= $enc->attr($item->getStatus()); ?>"></div></a></td> |
|
179 | 179 | <?php endif; ?> |
180 | - <?php if( in_array( 'product.type.code', $fields ) ) : ?> |
|
181 | - <td class="product-type-code"><a class="items-field" href="<?= $url; ?>" tabindex="1"><?= $enc->html( $item->getCode() ); ?></a></td> |
|
180 | + <?php if (in_array('product.type.code', $fields)) : ?> |
|
181 | + <td class="product-type-code"><a class="items-field" href="<?= $url; ?>" tabindex="1"><?= $enc->html($item->getCode()); ?></a></td> |
|
182 | 182 | <?php endif; ?> |
183 | - <?php if( in_array( 'product.type.label', $fields ) ) : ?> |
|
184 | - <td class="product-type-label"><a class="items-field" href="<?= $url; ?>"><?= $enc->html( $item->getLabel() ); ?></a></td> |
|
183 | + <?php if (in_array('product.type.label', $fields)) : ?> |
|
184 | + <td class="product-type-label"><a class="items-field" href="<?= $url; ?>"><?= $enc->html($item->getLabel()); ?></a></td> |
|
185 | 185 | <?php endif; ?> |
186 | - <?php if( in_array( 'product.type.position', $fields ) ) : ?> |
|
187 | - <td class="product-type-position"><a class="items-field" href="<?= $url; ?>"><?= $enc->html( $item->getPosition() ); ?></a></td> |
|
186 | + <?php if (in_array('product.type.position', $fields)) : ?> |
|
187 | + <td class="product-type-position"><a class="items-field" href="<?= $url; ?>"><?= $enc->html($item->getPosition()); ?></a></td> |
|
188 | 188 | <?php endif; ?> |
189 | - <?php if( in_array( 'product.type.ctime', $fields ) ) : ?> |
|
190 | - <td class="product-type-ctime"><a class="items-field" href="<?= $url; ?>"><?= $enc->html( $item->getTimeCreated() ); ?></a></td> |
|
189 | + <?php if (in_array('product.type.ctime', $fields)) : ?> |
|
190 | + <td class="product-type-ctime"><a class="items-field" href="<?= $url; ?>"><?= $enc->html($item->getTimeCreated()); ?></a></td> |
|
191 | 191 | <?php endif; ?> |
192 | - <?php if( in_array( 'product.type.mtime', $fields ) ) : ?> |
|
193 | - <td class="product-type-mtime"><a class="items-field" href="<?= $url; ?>"><?= $enc->html( $item->getTimeModified() ); ?></a></td> |
|
192 | + <?php if (in_array('product.type.mtime', $fields)) : ?> |
|
193 | + <td class="product-type-mtime"><a class="items-field" href="<?= $url; ?>"><?= $enc->html($item->getTimeModified()); ?></a></td> |
|
194 | 194 | <?php endif; ?> |
195 | - <?php if( in_array( 'product.type.editor', $fields ) ) : ?> |
|
196 | - <td class="product-type-editor"><a class="items-field" href="<?= $url; ?>"><?= $enc->html( $item->getEditor() ); ?></a></td> |
|
195 | + <?php if (in_array('product.type.editor', $fields)) : ?> |
|
196 | + <td class="product-type-editor"><a class="items-field" href="<?= $url; ?>"><?= $enc->html($item->getEditor()); ?></a></td> |
|
197 | 197 | <?php endif; ?> |
198 | 198 | |
199 | 199 | <td class="actions"> |
200 | 200 | <a class="btn act-copy fa" tabindex="1" |
201 | - href="<?= $enc->attr( $this->url( $copyTarget, $copyCntl, $copyAction, ['id' => $id] + $params, [], $copyConfig ) ); ?>" |
|
202 | - title="<?= $enc->attr( $this->translate( 'admin', 'Copy this entry') ); ?>" |
|
203 | - aria-label="<?= $enc->attr( $this->translate( 'admin', 'Copy' ) ); ?>"></a> |
|
204 | - <?php if( !$this->site()->readonly( $item->getSiteId() ) ) : ?> |
|
201 | + href="<?= $enc->attr($this->url($copyTarget, $copyCntl, $copyAction, ['id' => $id] + $params, [], $copyConfig)); ?>" |
|
202 | + title="<?= $enc->attr($this->translate('admin', 'Copy this entry')); ?>" |
|
203 | + aria-label="<?= $enc->attr($this->translate('admin', 'Copy')); ?>"></a> |
|
204 | + <?php if (!$this->site()->readonly($item->getSiteId())) : ?> |
|
205 | 205 | <a class="btn act-delete fa" tabindex="1" |
206 | - href="<?= $enc->attr( $this->url( $delTarget, $delCntl, $delAction, ['id' => $id] + $params, [], $delConfig ) ); ?>" |
|
207 | - title="<?= $enc->attr( $this->translate( 'admin', 'Delete this entry') ); ?>" |
|
208 | - aria-label="<?= $enc->attr( $this->translate( 'admin', 'Delete' ) ); ?>"></a> |
|
206 | + href="<?= $enc->attr($this->url($delTarget, $delCntl, $delAction, ['id' => $id] + $params, [], $delConfig)); ?>" |
|
207 | + title="<?= $enc->attr($this->translate('admin', 'Delete this entry')); ?>" |
|
208 | + aria-label="<?= $enc->attr($this->translate('admin', 'Delete')); ?>"></a> |
|
209 | 209 | <?php endif; ?> |
210 | 210 | </td> |
211 | 211 | </tr> |
@@ -213,18 +213,18 @@ discard block |
||
213 | 213 | </tbody> |
214 | 214 | </table> |
215 | 215 | |
216 | - <?php if( $this->get( 'items', [] ) === [] ) : ?> |
|
217 | - <div class="noitems"><?= $enc->html( sprintf( $this->translate( 'admin', 'No items found' ) ) ); ?></div> |
|
216 | + <?php if ($this->get('items', []) === []) : ?> |
|
217 | + <div class="noitems"><?= $enc->html(sprintf($this->translate('admin', 'No items found'))); ?></div> |
|
218 | 218 | <?php endif; ?> |
219 | 219 | </form> |
220 | 220 | |
221 | 221 | <?= $this->partial( |
222 | - $this->config( 'admin/jqadm/partial/pagination', 'common/partials/pagination-standard.php' ), |
|
223 | - ['pageParams' => $params, 'pos' => 'bottom', 'total' => $this->get( 'total' ), |
|
224 | - 'page' => $this->session( 'aimeos/admin/jqadm/type/product/page', [] )] |
|
222 | + $this->config('admin/jqadm/partial/pagination', 'common/partials/pagination-standard.php'), |
|
223 | + ['pageParams' => $params, 'pos' => 'bottom', 'total' => $this->get('total'), |
|
224 | + 'page' => $this->session('aimeos/admin/jqadm/type/product/page', [])] |
|
225 | 225 | ); |
226 | 226 | ?> |
227 | 227 | |
228 | 228 | <?php $this->block()->stop(); ?> |
229 | 229 | |
230 | -<?= $this->render( $this->config( 'admin/jqadm/template/page', 'common/page-standard.php' ) ); ?> |
|
230 | +<?= $this->render($this->config('admin/jqadm/template/page', 'common/page-standard.php')); ?> |
@@ -8,34 +8,34 @@ discard block |
||
8 | 8 | $enc = $this->encoder(); |
9 | 9 | |
10 | 10 | |
11 | -$target = $this->config( 'admin/jqadm/url/search/target' ); |
|
12 | -$controller = $this->config( 'admin/jqadm/url/search/controller', 'Jqadm' ); |
|
13 | -$action = $this->config( 'admin/jqadm/url/search/action', 'search' ); |
|
14 | -$config = $this->config( 'admin/jqadm/url/search/config', [] ); |
|
11 | +$target = $this->config('admin/jqadm/url/search/target'); |
|
12 | +$controller = $this->config('admin/jqadm/url/search/controller', 'Jqadm'); |
|
13 | +$action = $this->config('admin/jqadm/url/search/action', 'search'); |
|
14 | +$config = $this->config('admin/jqadm/url/search/config', []); |
|
15 | 15 | |
16 | 16 | |
17 | -$newTarget = $this->config( 'admin/jqadm/url/create/target' ); |
|
18 | -$newCntl = $this->config( 'admin/jqadm/url/create/controller', 'Jqadm' ); |
|
19 | -$newAction = $this->config( 'admin/jqadm/url/create/action', 'create' ); |
|
20 | -$newConfig = $this->config( 'admin/jqadm/url/create/config', [] ); |
|
17 | +$newTarget = $this->config('admin/jqadm/url/create/target'); |
|
18 | +$newCntl = $this->config('admin/jqadm/url/create/controller', 'Jqadm'); |
|
19 | +$newAction = $this->config('admin/jqadm/url/create/action', 'create'); |
|
20 | +$newConfig = $this->config('admin/jqadm/url/create/config', []); |
|
21 | 21 | |
22 | 22 | |
23 | -$getTarget = $this->config( 'admin/jqadm/url/get/target' ); |
|
24 | -$getCntl = $this->config( 'admin/jqadm/url/get/controller', 'Jqadm' ); |
|
25 | -$getAction = $this->config( 'admin/jqadm/url/get/action', 'get' ); |
|
26 | -$getConfig = $this->config( 'admin/jqadm/url/get/config', [] ); |
|
23 | +$getTarget = $this->config('admin/jqadm/url/get/target'); |
|
24 | +$getCntl = $this->config('admin/jqadm/url/get/controller', 'Jqadm'); |
|
25 | +$getAction = $this->config('admin/jqadm/url/get/action', 'get'); |
|
26 | +$getConfig = $this->config('admin/jqadm/url/get/config', []); |
|
27 | 27 | |
28 | 28 | |
29 | -$copyTarget = $this->config( 'admin/jqadm/url/copy/target' ); |
|
30 | -$copyCntl = $this->config( 'admin/jqadm/url/copy/controller', 'Jqadm' ); |
|
31 | -$copyAction = $this->config( 'admin/jqadm/url/copy/action', 'copy' ); |
|
32 | -$copyConfig = $this->config( 'admin/jqadm/url/copy/config', [] ); |
|
29 | +$copyTarget = $this->config('admin/jqadm/url/copy/target'); |
|
30 | +$copyCntl = $this->config('admin/jqadm/url/copy/controller', 'Jqadm'); |
|
31 | +$copyAction = $this->config('admin/jqadm/url/copy/action', 'copy'); |
|
32 | +$copyConfig = $this->config('admin/jqadm/url/copy/config', []); |
|
33 | 33 | |
34 | 34 | |
35 | -$delTarget = $this->config( 'admin/jqadm/url/delete/target' ); |
|
36 | -$delCntl = $this->config( 'admin/jqadm/url/delete/controller', 'Jqadm' ); |
|
37 | -$delAction = $this->config( 'admin/jqadm/url/delete/action', 'delete' ); |
|
38 | -$delConfig = $this->config( 'admin/jqadm/url/delete/config', [] ); |
|
35 | +$delTarget = $this->config('admin/jqadm/url/delete/target'); |
|
36 | +$delCntl = $this->config('admin/jqadm/url/delete/controller', 'Jqadm'); |
|
37 | +$delAction = $this->config('admin/jqadm/url/delete/action', 'delete'); |
|
38 | +$delConfig = $this->config('admin/jqadm/url/delete/config', []); |
|
39 | 39 | |
40 | 40 | |
41 | 41 | /** admin/jqadm/type/product/lists/fields |
@@ -53,44 +53,44 @@ discard block |
||
53 | 53 | * @category Developer |
54 | 54 | */ |
55 | 55 | $default = ['product.lists.type.domain', 'product.lists.type.status', 'product.lists.type.code', 'product.lists.type.label']; |
56 | -$default = $this->config( 'admin/jqadm/type/product/lists/fields', $default ); |
|
57 | -$fields = $this->session( 'aimeos/admin/jqadm/type/product/lists/fields', $default ); |
|
56 | +$default = $this->config('admin/jqadm/type/product/lists/fields', $default); |
|
57 | +$fields = $this->session('aimeos/admin/jqadm/type/product/lists/fields', $default); |
|
58 | 58 | |
59 | -$searchParams = $params = $this->get( 'pageParams', [] ); |
|
59 | +$searchParams = $params = $this->get('pageParams', []); |
|
60 | 60 | $searchParams['page']['start'] = 0; |
61 | 61 | |
62 | 62 | $typeList = []; |
63 | -foreach( $this->get( 'itemTypes', [] ) as $id => $typeItem ) { |
|
63 | +foreach ($this->get('itemTypes', []) as $id => $typeItem) { |
|
64 | 64 | $typeList[$id] = $typeItem->getCode(); |
65 | 65 | } |
66 | 66 | |
67 | 67 | $columnList = [ |
68 | - 'product.lists.type.id' => $this->translate( 'admin', 'ID' ), |
|
69 | - 'product.lists.type.domain' => $this->translate( 'admin', 'Domain' ), |
|
70 | - 'product.lists.type.status' => $this->translate( 'admin', 'Status' ), |
|
71 | - 'product.lists.type.code' => $this->translate( 'admin', 'Code' ), |
|
72 | - 'product.lists.type.label' => $this->translate( 'admin', 'Label' ), |
|
73 | - 'product.lists.type.position' => $this->translate( 'admin', 'Position' ), |
|
74 | - 'product.lists.type.ctime' => $this->translate( 'admin', 'Created' ), |
|
75 | - 'product.lists.type.mtime' => $this->translate( 'admin', 'Modified' ), |
|
76 | - 'product.lists.type.editor' => $this->translate( 'admin', 'Editor' ), |
|
68 | + 'product.lists.type.id' => $this->translate('admin', 'ID'), |
|
69 | + 'product.lists.type.domain' => $this->translate('admin', 'Domain'), |
|
70 | + 'product.lists.type.status' => $this->translate('admin', 'Status'), |
|
71 | + 'product.lists.type.code' => $this->translate('admin', 'Code'), |
|
72 | + 'product.lists.type.label' => $this->translate('admin', 'Label'), |
|
73 | + 'product.lists.type.position' => $this->translate('admin', 'Position'), |
|
74 | + 'product.lists.type.ctime' => $this->translate('admin', 'Created'), |
|
75 | + 'product.lists.type.mtime' => $this->translate('admin', 'Modified'), |
|
76 | + 'product.lists.type.editor' => $this->translate('admin', 'Editor'), |
|
77 | 77 | ]; |
78 | 78 | |
79 | 79 | ?> |
80 | -<?php $this->block()->start( 'jqadm_content' ); ?> |
|
80 | +<?php $this->block()->start('jqadm_content'); ?> |
|
81 | 81 | |
82 | 82 | <nav class="main-navbar"> |
83 | 83 | |
84 | 84 | <span class="navbar-brand"> |
85 | - <?= $enc->html( $this->translate( 'admin', 'Product Lists Types' ) ); ?> |
|
86 | - <span class="navbar-secondary">(<?= $enc->html( $this->site()->label() ); ?>)</span> |
|
85 | + <?= $enc->html($this->translate('admin', 'Product Lists Types')); ?> |
|
86 | + <span class="navbar-secondary">(<?= $enc->html($this->site()->label()); ?>)</span> |
|
87 | 87 | </span> |
88 | 88 | |
89 | 89 | <?= $this->partial( |
90 | - $this->config( 'admin/jqadm/partial/navsearch', 'common/partials/navsearch-standard.php' ), [ |
|
91 | - 'filter' => $this->session( 'aimeos/admin/jqadm/type/product/lists/filter', [] ), |
|
92 | - 'filterAttributes' => $this->get( 'filterAttributes', [] ), |
|
93 | - 'filterOperators' => $this->get( 'filterOperators', [] ), |
|
90 | + $this->config('admin/jqadm/partial/navsearch', 'common/partials/navsearch-standard.php'), [ |
|
91 | + 'filter' => $this->session('aimeos/admin/jqadm/type/product/lists/filter', []), |
|
92 | + 'filterAttributes' => $this->get('filterAttributes', []), |
|
93 | + 'filterOperators' => $this->get('filterOperators', []), |
|
94 | 94 | 'params' => $params, |
95 | 95 | ] |
96 | 96 | ); ?> |
@@ -98,33 +98,33 @@ discard block |
||
98 | 98 | |
99 | 99 | |
100 | 100 | <?= $this->partial( |
101 | - $this->config( 'admin/jqadm/partial/pagination', 'common/partials/pagination-standard.php' ), |
|
102 | - ['pageParams' => $params, 'pos' => 'top', 'total' => $this->get( 'total' ), |
|
103 | - 'page' => $this->session( 'aimeos/admin/jqadm/type/product/lists/page', [] )] |
|
101 | + $this->config('admin/jqadm/partial/pagination', 'common/partials/pagination-standard.php'), |
|
102 | + ['pageParams' => $params, 'pos' => 'top', 'total' => $this->get('total'), |
|
103 | + 'page' => $this->session('aimeos/admin/jqadm/type/product/lists/page', [])] |
|
104 | 104 | ); |
105 | 105 | ?> |
106 | 106 | |
107 | -<form class="list list-product-lists-type" method="POST" action="<?= $enc->attr( $this->url( $target, $controller, $action, $searchParams, [], $config ) ); ?>"> |
|
107 | +<form class="list list-product-lists-type" method="POST" action="<?= $enc->attr($this->url($target, $controller, $action, $searchParams, [], $config)); ?>"> |
|
108 | 108 | <?= $this->csrf()->formfield(); ?> |
109 | 109 | |
110 | 110 | <table class="list-items table table-hover table-striped"> |
111 | 111 | <thead class="list-header"> |
112 | 112 | <tr> |
113 | 113 | <?= $this->partial( |
114 | - $this->config( 'admin/jqadm/partial/listhead', 'common/partials/listhead-standard.php' ), |
|
115 | - ['fields' => $fields, 'params' => $params, 'data' => $columnList, 'sort' => $this->session( 'aimeos/admin/jqadm/type/product/lists/sort' )] |
|
114 | + $this->config('admin/jqadm/partial/listhead', 'common/partials/listhead-standard.php'), |
|
115 | + ['fields' => $fields, 'params' => $params, 'data' => $columnList, 'sort' => $this->session('aimeos/admin/jqadm/type/product/lists/sort')] |
|
116 | 116 | ); |
117 | 117 | ?> |
118 | 118 | |
119 | 119 | <th class="actions"> |
120 | 120 | <a class="btn fa act-add" tabindex="1" |
121 | - href="<?= $enc->attr( $this->url( $newTarget, $newCntl, $newAction, $params, [], $newConfig ) ); ?>" |
|
122 | - title="<?= $enc->attr( $this->translate( 'admin', 'Insert new entry (Ctrl+I)') ); ?>" |
|
123 | - aria-label="<?= $enc->attr( $this->translate( 'admin', 'Add' ) ); ?>"> |
|
121 | + href="<?= $enc->attr($this->url($newTarget, $newCntl, $newAction, $params, [], $newConfig)); ?>" |
|
122 | + title="<?= $enc->attr($this->translate('admin', 'Insert new entry (Ctrl+I)')); ?>" |
|
123 | + aria-label="<?= $enc->attr($this->translate('admin', 'Add')); ?>"> |
|
124 | 124 | </a> |
125 | 125 | |
126 | 126 | <?= $this->partial( |
127 | - $this->config( 'admin/jqadm/partial/columns', 'common/partials/columns-standard.php' ), |
|
127 | + $this->config('admin/jqadm/partial/columns', 'common/partials/columns-standard.php'), |
|
128 | 128 | ['fields' => $fields, 'data' => $columnList] |
129 | 129 | ); |
130 | 130 | ?> |
@@ -134,26 +134,26 @@ discard block |
||
134 | 134 | <tbody> |
135 | 135 | |
136 | 136 | <?= $this->partial( |
137 | - $this->config( 'admin/jqadm/partial/listsearch', 'common/partials/listsearch-standard.php' ), [ |
|
138 | - 'fields' => $fields, 'filter' => $this->session( 'aimeos/admin/jqadm/type/product/lists/filter', [] ), |
|
137 | + $this->config('admin/jqadm/partial/listsearch', 'common/partials/listsearch-standard.php'), [ |
|
138 | + 'fields' => $fields, 'filter' => $this->session('aimeos/admin/jqadm/type/product/lists/filter', []), |
|
139 | 139 | 'data' => [ |
140 | 140 | 'product.lists.type.id' => ['op' => '=='], |
141 | 141 | 'product.lists.type.domain' => ['op' => '==', 'type' => 'select', 'val' => [ |
142 | - 'attribute' => $this->translate( 'admin', 'attribute' ), |
|
143 | - 'catalog' => $this->translate( 'admin', 'catalog' ), |
|
144 | - 'customer' => $this->translate( 'admin', 'customer' ), |
|
145 | - 'media' => $this->translate( 'admin', 'media' ), |
|
146 | - 'price' => $this->translate( 'admin', 'price' ), |
|
147 | - 'product' => $this->translate( 'admin', 'product' ), |
|
148 | - 'service' => $this->translate( 'admin', 'service' ), |
|
149 | - 'supplier' => $this->translate( 'admin', 'supplier' ), |
|
150 | - 'text' => $this->translate( 'admin', 'text' ), |
|
142 | + 'attribute' => $this->translate('admin', 'attribute'), |
|
143 | + 'catalog' => $this->translate('admin', 'catalog'), |
|
144 | + 'customer' => $this->translate('admin', 'customer'), |
|
145 | + 'media' => $this->translate('admin', 'media'), |
|
146 | + 'price' => $this->translate('admin', 'price'), |
|
147 | + 'product' => $this->translate('admin', 'product'), |
|
148 | + 'service' => $this->translate('admin', 'service'), |
|
149 | + 'supplier' => $this->translate('admin', 'supplier'), |
|
150 | + 'text' => $this->translate('admin', 'text'), |
|
151 | 151 | ]], |
152 | 152 | 'product.lists.type.status' => ['op' => '==', 'type' => 'select', 'val' => [ |
153 | - '1' => $this->translate( 'mshop/code', 'status:1' ), |
|
154 | - '0' => $this->translate( 'mshop/code', 'status:0' ), |
|
155 | - '-1' => $this->translate( 'mshop/code', 'status:-1' ), |
|
156 | - '-2' => $this->translate( 'mshop/code', 'status:-2' ), |
|
153 | + '1' => $this->translate('mshop/code', 'status:1'), |
|
154 | + '0' => $this->translate('mshop/code', 'status:0'), |
|
155 | + '-1' => $this->translate('mshop/code', 'status:-1'), |
|
156 | + '-2' => $this->translate('mshop/code', 'status:-2'), |
|
157 | 157 | ]], |
158 | 158 | 'product.lists.type.code' => [], |
159 | 159 | 'product.lists.type.label' => [], |
@@ -165,47 +165,47 @@ discard block |
||
165 | 165 | ] ); |
166 | 166 | ?> |
167 | 167 | |
168 | - <?php foreach( $this->get( 'items', [] ) as $id => $item ) : ?> |
|
169 | - <?php $url = $enc->attr( $this->url( $getTarget, $getCntl, $getAction, ['id' => $id] + $params, [], $getConfig ) ); ?> |
|
170 | - <tr class="<?= $this->site()->readonly( $item->getSiteId() ); ?>"> |
|
171 | - <?php if( in_array( 'product.lists.type.id', $fields ) ) : ?> |
|
172 | - <td class="product-type-id"><a class="items-field" href="<?= $url; ?>"><?= $enc->html( $item->getId() ); ?></a></td> |
|
168 | + <?php foreach ($this->get('items', []) as $id => $item) : ?> |
|
169 | + <?php $url = $enc->attr($this->url($getTarget, $getCntl, $getAction, ['id' => $id] + $params, [], $getConfig)); ?> |
|
170 | + <tr class="<?= $this->site()->readonly($item->getSiteId()); ?>"> |
|
171 | + <?php if (in_array('product.lists.type.id', $fields)) : ?> |
|
172 | + <td class="product-type-id"><a class="items-field" href="<?= $url; ?>"><?= $enc->html($item->getId()); ?></a></td> |
|
173 | 173 | <?php endif; ?> |
174 | - <?php if( in_array( 'product.lists.type.domain', $fields ) ) : ?> |
|
175 | - <td class="product-type-domain"><a class="items-field" href="<?= $url; ?>"><?= $enc->html( $item->getDomain() ); ?></a></td> |
|
174 | + <?php if (in_array('product.lists.type.domain', $fields)) : ?> |
|
175 | + <td class="product-type-domain"><a class="items-field" href="<?= $url; ?>"><?= $enc->html($item->getDomain()); ?></a></td> |
|
176 | 176 | <?php endif; ?> |
177 | - <?php if( in_array( 'product.lists.type.status', $fields ) ) : ?> |
|
178 | - <td class="product-type-status"><a class="items-field" href="<?= $url; ?>"><div class="fa status-<?= $enc->attr( $item->getStatus() ); ?>"></div></a></td> |
|
177 | + <?php if (in_array('product.lists.type.status', $fields)) : ?> |
|
178 | + <td class="product-type-status"><a class="items-field" href="<?= $url; ?>"><div class="fa status-<?= $enc->attr($item->getStatus()); ?>"></div></a></td> |
|
179 | 179 | <?php endif; ?> |
180 | - <?php if( in_array( 'product.lists.type.code', $fields ) ) : ?> |
|
181 | - <td class="product-type-code"><a class="items-field" href="<?= $url; ?>" tabindex="1"><?= $enc->html( $item->getCode() ); ?></a></td> |
|
180 | + <?php if (in_array('product.lists.type.code', $fields)) : ?> |
|
181 | + <td class="product-type-code"><a class="items-field" href="<?= $url; ?>" tabindex="1"><?= $enc->html($item->getCode()); ?></a></td> |
|
182 | 182 | <?php endif; ?> |
183 | - <?php if( in_array( 'product.lists.type.label', $fields ) ) : ?> |
|
184 | - <td class="product-type-label"><a class="items-field" href="<?= $url; ?>"><?= $enc->html( $item->getLabel() ); ?></a></td> |
|
183 | + <?php if (in_array('product.lists.type.label', $fields)) : ?> |
|
184 | + <td class="product-type-label"><a class="items-field" href="<?= $url; ?>"><?= $enc->html($item->getLabel()); ?></a></td> |
|
185 | 185 | <?php endif; ?> |
186 | - <?php if( in_array( 'product.lists.type.position', $fields ) ) : ?> |
|
187 | - <td class="product-type-position"><a class="items-field" href="<?= $url; ?>"><?= $enc->html( $item->getPosition() ); ?></a></td> |
|
186 | + <?php if (in_array('product.lists.type.position', $fields)) : ?> |
|
187 | + <td class="product-type-position"><a class="items-field" href="<?= $url; ?>"><?= $enc->html($item->getPosition()); ?></a></td> |
|
188 | 188 | <?php endif; ?> |
189 | - <?php if( in_array( 'product.lists.type.ctime', $fields ) ) : ?> |
|
190 | - <td class="product-type-ctime"><a class="items-field" href="<?= $url; ?>"><?= $enc->html( $item->getTimeCreated() ); ?></a></td> |
|
189 | + <?php if (in_array('product.lists.type.ctime', $fields)) : ?> |
|
190 | + <td class="product-type-ctime"><a class="items-field" href="<?= $url; ?>"><?= $enc->html($item->getTimeCreated()); ?></a></td> |
|
191 | 191 | <?php endif; ?> |
192 | - <?php if( in_array( 'product.lists.type.mtime', $fields ) ) : ?> |
|
193 | - <td class="product-type-mtime"><a class="items-field" href="<?= $url; ?>"><?= $enc->html( $item->getTimeModified() ); ?></a></td> |
|
192 | + <?php if (in_array('product.lists.type.mtime', $fields)) : ?> |
|
193 | + <td class="product-type-mtime"><a class="items-field" href="<?= $url; ?>"><?= $enc->html($item->getTimeModified()); ?></a></td> |
|
194 | 194 | <?php endif; ?> |
195 | - <?php if( in_array( 'product.lists.type.editor', $fields ) ) : ?> |
|
196 | - <td class="product-type-editor"><a class="items-field" href="<?= $url; ?>"><?= $enc->html( $item->getEditor() ); ?></a></td> |
|
195 | + <?php if (in_array('product.lists.type.editor', $fields)) : ?> |
|
196 | + <td class="product-type-editor"><a class="items-field" href="<?= $url; ?>"><?= $enc->html($item->getEditor()); ?></a></td> |
|
197 | 197 | <?php endif; ?> |
198 | 198 | |
199 | 199 | <td class="actions"> |
200 | 200 | <a class="btn act-copy fa" tabindex="1" |
201 | - href="<?= $enc->attr( $this->url( $copyTarget, $copyCntl, $copyAction, ['id' => $id] + $params, [], $copyConfig ) ); ?>" |
|
202 | - title="<?= $enc->attr( $this->translate( 'admin', 'Copy this entry') ); ?>" |
|
203 | - aria-label="<?= $enc->attr( $this->translate( 'admin', 'Copy' ) ); ?>"></a> |
|
204 | - <?php if( !$this->site()->readonly( $item->getSiteId() ) ) : ?> |
|
201 | + href="<?= $enc->attr($this->url($copyTarget, $copyCntl, $copyAction, ['id' => $id] + $params, [], $copyConfig)); ?>" |
|
202 | + title="<?= $enc->attr($this->translate('admin', 'Copy this entry')); ?>" |
|
203 | + aria-label="<?= $enc->attr($this->translate('admin', 'Copy')); ?>"></a> |
|
204 | + <?php if (!$this->site()->readonly($item->getSiteId())) : ?> |
|
205 | 205 | <a class="btn act-delete fa" tabindex="1" |
206 | - href="<?= $enc->attr( $this->url( $delTarget, $delCntl, $delAction, ['id' => $id] + $params, [], $delConfig ) ); ?>" |
|
207 | - title="<?= $enc->attr( $this->translate( 'admin', 'Delete this entry') ); ?>" |
|
208 | - aria-label="<?= $enc->attr( $this->translate( 'admin', 'Delete' ) ); ?>"></a> |
|
206 | + href="<?= $enc->attr($this->url($delTarget, $delCntl, $delAction, ['id' => $id] + $params, [], $delConfig)); ?>" |
|
207 | + title="<?= $enc->attr($this->translate('admin', 'Delete this entry')); ?>" |
|
208 | + aria-label="<?= $enc->attr($this->translate('admin', 'Delete')); ?>"></a> |
|
209 | 209 | <?php endif; ?> |
210 | 210 | </td> |
211 | 211 | </tr> |
@@ -213,18 +213,18 @@ discard block |
||
213 | 213 | </tbody> |
214 | 214 | </table> |
215 | 215 | |
216 | - <?php if( $this->get( 'items', [] ) === [] ) : ?> |
|
217 | - <div class="noitems"><?= $enc->html( sprintf( $this->translate( 'admin', 'No items found' ) ) ); ?></div> |
|
216 | + <?php if ($this->get('items', []) === []) : ?> |
|
217 | + <div class="noitems"><?= $enc->html(sprintf($this->translate('admin', 'No items found'))); ?></div> |
|
218 | 218 | <?php endif; ?> |
219 | 219 | </form> |
220 | 220 | |
221 | 221 | <?= $this->partial( |
222 | - $this->config( 'admin/jqadm/partial/pagination', 'common/partials/pagination-standard.php' ), |
|
223 | - ['pageParams' => $params, 'pos' => 'bottom', 'total' => $this->get( 'total' ), |
|
224 | - 'page' => $this->session( 'aimeos/admin/jqadm/type/product/lists/page', [] )] |
|
222 | + $this->config('admin/jqadm/partial/pagination', 'common/partials/pagination-standard.php'), |
|
223 | + ['pageParams' => $params, 'pos' => 'bottom', 'total' => $this->get('total'), |
|
224 | + 'page' => $this->session('aimeos/admin/jqadm/type/product/lists/page', [])] |
|
225 | 225 | ); |
226 | 226 | ?> |
227 | 227 | |
228 | 228 | <?php $this->block()->stop(); ?> |
229 | 229 | |
230 | -<?= $this->render( $this->config( 'admin/jqadm/template/page', 'common/page-standard.php' ) ); ?> |
|
230 | +<?= $this->render($this->config('admin/jqadm/template/page', 'common/page-standard.php')); ?> |
@@ -8,34 +8,34 @@ discard block |
||
8 | 8 | $enc = $this->encoder(); |
9 | 9 | |
10 | 10 | |
11 | -$target = $this->config( 'admin/jqadm/url/search/target' ); |
|
12 | -$controller = $this->config( 'admin/jqadm/url/search/controller', 'Jqadm' ); |
|
13 | -$action = $this->config( 'admin/jqadm/url/search/action', 'search' ); |
|
14 | -$config = $this->config( 'admin/jqadm/url/search/config', [] ); |
|
11 | +$target = $this->config('admin/jqadm/url/search/target'); |
|
12 | +$controller = $this->config('admin/jqadm/url/search/controller', 'Jqadm'); |
|
13 | +$action = $this->config('admin/jqadm/url/search/action', 'search'); |
|
14 | +$config = $this->config('admin/jqadm/url/search/config', []); |
|
15 | 15 | |
16 | 16 | |
17 | -$newTarget = $this->config( 'admin/jqadm/url/create/target' ); |
|
18 | -$newCntl = $this->config( 'admin/jqadm/url/create/controller', 'Jqadm' ); |
|
19 | -$newAction = $this->config( 'admin/jqadm/url/create/action', 'create' ); |
|
20 | -$newConfig = $this->config( 'admin/jqadm/url/create/config', [] ); |
|
17 | +$newTarget = $this->config('admin/jqadm/url/create/target'); |
|
18 | +$newCntl = $this->config('admin/jqadm/url/create/controller', 'Jqadm'); |
|
19 | +$newAction = $this->config('admin/jqadm/url/create/action', 'create'); |
|
20 | +$newConfig = $this->config('admin/jqadm/url/create/config', []); |
|
21 | 21 | |
22 | 22 | |
23 | -$getTarget = $this->config( 'admin/jqadm/url/get/target' ); |
|
24 | -$getCntl = $this->config( 'admin/jqadm/url/get/controller', 'Jqadm' ); |
|
25 | -$getAction = $this->config( 'admin/jqadm/url/get/action', 'get' ); |
|
26 | -$getConfig = $this->config( 'admin/jqadm/url/get/config', [] ); |
|
23 | +$getTarget = $this->config('admin/jqadm/url/get/target'); |
|
24 | +$getCntl = $this->config('admin/jqadm/url/get/controller', 'Jqadm'); |
|
25 | +$getAction = $this->config('admin/jqadm/url/get/action', 'get'); |
|
26 | +$getConfig = $this->config('admin/jqadm/url/get/config', []); |
|
27 | 27 | |
28 | 28 | |
29 | -$copyTarget = $this->config( 'admin/jqadm/url/copy/target' ); |
|
30 | -$copyCntl = $this->config( 'admin/jqadm/url/copy/controller', 'Jqadm' ); |
|
31 | -$copyAction = $this->config( 'admin/jqadm/url/copy/action', 'copy' ); |
|
32 | -$copyConfig = $this->config( 'admin/jqadm/url/copy/config', [] ); |
|
29 | +$copyTarget = $this->config('admin/jqadm/url/copy/target'); |
|
30 | +$copyCntl = $this->config('admin/jqadm/url/copy/controller', 'Jqadm'); |
|
31 | +$copyAction = $this->config('admin/jqadm/url/copy/action', 'copy'); |
|
32 | +$copyConfig = $this->config('admin/jqadm/url/copy/config', []); |
|
33 | 33 | |
34 | 34 | |
35 | -$delTarget = $this->config( 'admin/jqadm/url/delete/target' ); |
|
36 | -$delCntl = $this->config( 'admin/jqadm/url/delete/controller', 'Jqadm' ); |
|
37 | -$delAction = $this->config( 'admin/jqadm/url/delete/action', 'delete' ); |
|
38 | -$delConfig = $this->config( 'admin/jqadm/url/delete/config', [] ); |
|
35 | +$delTarget = $this->config('admin/jqadm/url/delete/target'); |
|
36 | +$delCntl = $this->config('admin/jqadm/url/delete/controller', 'Jqadm'); |
|
37 | +$delAction = $this->config('admin/jqadm/url/delete/action', 'delete'); |
|
38 | +$delConfig = $this->config('admin/jqadm/url/delete/config', []); |
|
39 | 39 | |
40 | 40 | |
41 | 41 | /** admin/jqadm/type/product/property/fields |
@@ -53,44 +53,44 @@ discard block |
||
53 | 53 | * @category Developer |
54 | 54 | */ |
55 | 55 | $default = ['product.property.type.domain', 'product.property.type.status', 'product.property.type.code', 'product.property.type.label']; |
56 | -$default = $this->config( 'admin/jqadm/type/product/property/fields', $default ); |
|
57 | -$fields = $this->session( 'aimeos/admin/jqadm/type/product/property/fields', $default ); |
|
56 | +$default = $this->config('admin/jqadm/type/product/property/fields', $default); |
|
57 | +$fields = $this->session('aimeos/admin/jqadm/type/product/property/fields', $default); |
|
58 | 58 | |
59 | -$searchParams = $params = $this->get( 'pageParams', [] ); |
|
59 | +$searchParams = $params = $this->get('pageParams', []); |
|
60 | 60 | $searchParams['page']['start'] = 0; |
61 | 61 | |
62 | 62 | $typeList = []; |
63 | -foreach( $this->get( 'itemTypes', [] ) as $id => $typeItem ) { |
|
63 | +foreach ($this->get('itemTypes', []) as $id => $typeItem) { |
|
64 | 64 | $typeList[$id] = $typeItem->getCode(); |
65 | 65 | } |
66 | 66 | |
67 | 67 | $columnList = [ |
68 | - 'product.property.type.id' => $this->translate( 'admin', 'ID' ), |
|
69 | - 'product.property.type.domain' => $this->translate( 'admin', 'Domain' ), |
|
70 | - 'product.property.type.status' => $this->translate( 'admin', 'Status' ), |
|
71 | - 'product.property.type.code' => $this->translate( 'admin', 'Code' ), |
|
72 | - 'product.property.type.label' => $this->translate( 'admin', 'Label' ), |
|
73 | - 'product.property.type.position' => $this->translate( 'admin', 'Position' ), |
|
74 | - 'product.property.type.ctime' => $this->translate( 'admin', 'Created' ), |
|
75 | - 'product.property.type.mtime' => $this->translate( 'admin', 'Modified' ), |
|
76 | - 'product.property.type.editor' => $this->translate( 'admin', 'Editor' ), |
|
68 | + 'product.property.type.id' => $this->translate('admin', 'ID'), |
|
69 | + 'product.property.type.domain' => $this->translate('admin', 'Domain'), |
|
70 | + 'product.property.type.status' => $this->translate('admin', 'Status'), |
|
71 | + 'product.property.type.code' => $this->translate('admin', 'Code'), |
|
72 | + 'product.property.type.label' => $this->translate('admin', 'Label'), |
|
73 | + 'product.property.type.position' => $this->translate('admin', 'Position'), |
|
74 | + 'product.property.type.ctime' => $this->translate('admin', 'Created'), |
|
75 | + 'product.property.type.mtime' => $this->translate('admin', 'Modified'), |
|
76 | + 'product.property.type.editor' => $this->translate('admin', 'Editor'), |
|
77 | 77 | ]; |
78 | 78 | |
79 | 79 | ?> |
80 | -<?php $this->block()->start( 'jqadm_content' ); ?> |
|
80 | +<?php $this->block()->start('jqadm_content'); ?> |
|
81 | 81 | |
82 | 82 | <nav class="main-navbar"> |
83 | 83 | |
84 | 84 | <span class="navbar-brand"> |
85 | - <?= $enc->html( $this->translate( 'admin', 'Product Property Types' ) ); ?> |
|
86 | - <span class="navbar-secondary">(<?= $enc->html( $this->site()->label() ); ?>)</span> |
|
85 | + <?= $enc->html($this->translate('admin', 'Product Property Types')); ?> |
|
86 | + <span class="navbar-secondary">(<?= $enc->html($this->site()->label()); ?>)</span> |
|
87 | 87 | </span> |
88 | 88 | |
89 | 89 | <?= $this->partial( |
90 | - $this->config( 'admin/jqadm/partial/navsearch', 'common/partials/navsearch-standard.php' ), [ |
|
91 | - 'filter' => $this->session( 'aimeos/admin/jqadm/type/product/property/filter', [] ), |
|
92 | - 'filterAttributes' => $this->get( 'filterAttributes', [] ), |
|
93 | - 'filterOperators' => $this->get( 'filterOperators', [] ), |
|
90 | + $this->config('admin/jqadm/partial/navsearch', 'common/partials/navsearch-standard.php'), [ |
|
91 | + 'filter' => $this->session('aimeos/admin/jqadm/type/product/property/filter', []), |
|
92 | + 'filterAttributes' => $this->get('filterAttributes', []), |
|
93 | + 'filterOperators' => $this->get('filterOperators', []), |
|
94 | 94 | 'params' => $params, |
95 | 95 | ] |
96 | 96 | ); ?> |
@@ -98,33 +98,33 @@ discard block |
||
98 | 98 | |
99 | 99 | |
100 | 100 | <?= $this->partial( |
101 | - $this->config( 'admin/jqadm/partial/pagination', 'common/partials/pagination-standard.php' ), |
|
102 | - ['pageParams' => $params, 'pos' => 'top', 'total' => $this->get( 'total' ), |
|
103 | - 'page' => $this->session( 'aimeos/admin/jqadm/type/product/property/page', [] )] |
|
101 | + $this->config('admin/jqadm/partial/pagination', 'common/partials/pagination-standard.php'), |
|
102 | + ['pageParams' => $params, 'pos' => 'top', 'total' => $this->get('total'), |
|
103 | + 'page' => $this->session('aimeos/admin/jqadm/type/product/property/page', [])] |
|
104 | 104 | ); |
105 | 105 | ?> |
106 | 106 | |
107 | -<form class="list list-product-property-type" method="POST" action="<?= $enc->attr( $this->url( $target, $controller, $action, $searchParams, [], $config ) ); ?>"> |
|
107 | +<form class="list list-product-property-type" method="POST" action="<?= $enc->attr($this->url($target, $controller, $action, $searchParams, [], $config)); ?>"> |
|
108 | 108 | <?= $this->csrf()->formfield(); ?> |
109 | 109 | |
110 | 110 | <table class="list-items table table-hover table-striped"> |
111 | 111 | <thead class="list-header"> |
112 | 112 | <tr> |
113 | 113 | <?= $this->partial( |
114 | - $this->config( 'admin/jqadm/partial/listhead', 'common/partials/listhead-standard.php' ), |
|
115 | - ['fields' => $fields, 'params' => $params, 'data' => $columnList, 'sort' => $this->session( 'aimeos/admin/jqadm/type/product/property/sort' )] |
|
114 | + $this->config('admin/jqadm/partial/listhead', 'common/partials/listhead-standard.php'), |
|
115 | + ['fields' => $fields, 'params' => $params, 'data' => $columnList, 'sort' => $this->session('aimeos/admin/jqadm/type/product/property/sort')] |
|
116 | 116 | ); |
117 | 117 | ?> |
118 | 118 | |
119 | 119 | <th class="actions"> |
120 | 120 | <a class="btn fa act-add" tabindex="1" |
121 | - href="<?= $enc->attr( $this->url( $newTarget, $newCntl, $newAction, $params, [], $newConfig ) ); ?>" |
|
122 | - title="<?= $enc->attr( $this->translate( 'admin', 'Insert new entry (Ctrl+I)') ); ?>" |
|
123 | - aria-label="<?= $enc->attr( $this->translate( 'admin', 'Add' ) ); ?>"> |
|
121 | + href="<?= $enc->attr($this->url($newTarget, $newCntl, $newAction, $params, [], $newConfig)); ?>" |
|
122 | + title="<?= $enc->attr($this->translate('admin', 'Insert new entry (Ctrl+I)')); ?>" |
|
123 | + aria-label="<?= $enc->attr($this->translate('admin', 'Add')); ?>"> |
|
124 | 124 | </a> |
125 | 125 | |
126 | 126 | <?= $this->partial( |
127 | - $this->config( 'admin/jqadm/partial/columns', 'common/partials/columns-standard.php' ), |
|
127 | + $this->config('admin/jqadm/partial/columns', 'common/partials/columns-standard.php'), |
|
128 | 128 | ['fields' => $fields, 'data' => $columnList] |
129 | 129 | ); |
130 | 130 | ?> |
@@ -134,18 +134,18 @@ discard block |
||
134 | 134 | <tbody> |
135 | 135 | |
136 | 136 | <?= $this->partial( |
137 | - $this->config( 'admin/jqadm/partial/listsearch', 'common/partials/listsearch-standard.php' ), [ |
|
138 | - 'fields' => $fields, 'filter' => $this->session( 'aimeos/admin/jqadm/type/product/property/filter', [] ), |
|
137 | + $this->config('admin/jqadm/partial/listsearch', 'common/partials/listsearch-standard.php'), [ |
|
138 | + 'fields' => $fields, 'filter' => $this->session('aimeos/admin/jqadm/type/product/property/filter', []), |
|
139 | 139 | 'data' => [ |
140 | 140 | 'product.property.type.id' => ['op' => '=='], |
141 | 141 | 'product.property.type.domain' => ['op' => '==', 'type' => 'select', 'val' => [ |
142 | - 'product' => $this->translate( 'admin', 'product' ), |
|
142 | + 'product' => $this->translate('admin', 'product'), |
|
143 | 143 | ]], |
144 | 144 | 'product.property.type.status' => ['op' => '==', 'type' => 'select', 'val' => [ |
145 | - '1' => $this->translate( 'mshop/code', 'status:1' ), |
|
146 | - '0' => $this->translate( 'mshop/code', 'status:0' ), |
|
147 | - '-1' => $this->translate( 'mshop/code', 'status:-1' ), |
|
148 | - '-2' => $this->translate( 'mshop/code', 'status:-2' ), |
|
145 | + '1' => $this->translate('mshop/code', 'status:1'), |
|
146 | + '0' => $this->translate('mshop/code', 'status:0'), |
|
147 | + '-1' => $this->translate('mshop/code', 'status:-1'), |
|
148 | + '-2' => $this->translate('mshop/code', 'status:-2'), |
|
149 | 149 | ]], |
150 | 150 | 'product.property.type.code' => [], |
151 | 151 | 'product.property.type.label' => [], |
@@ -157,47 +157,47 @@ discard block |
||
157 | 157 | ] ); |
158 | 158 | ?> |
159 | 159 | |
160 | - <?php foreach( $this->get( 'items', [] ) as $id => $item ) : ?> |
|
161 | - <?php $url = $enc->attr( $this->url( $getTarget, $getCntl, $getAction, ['id' => $id] + $params, [], $getConfig ) ); ?> |
|
162 | - <tr class="<?= $this->site()->readonly( $item->getSiteId() ); ?>"> |
|
163 | - <?php if( in_array( 'product.property.type.id', $fields ) ) : ?> |
|
164 | - <td class="product-type-id"><a class="items-field" href="<?= $url; ?>"><?= $enc->html( $item->getId() ); ?></a></td> |
|
160 | + <?php foreach ($this->get('items', []) as $id => $item) : ?> |
|
161 | + <?php $url = $enc->attr($this->url($getTarget, $getCntl, $getAction, ['id' => $id] + $params, [], $getConfig)); ?> |
|
162 | + <tr class="<?= $this->site()->readonly($item->getSiteId()); ?>"> |
|
163 | + <?php if (in_array('product.property.type.id', $fields)) : ?> |
|
164 | + <td class="product-type-id"><a class="items-field" href="<?= $url; ?>"><?= $enc->html($item->getId()); ?></a></td> |
|
165 | 165 | <?php endif; ?> |
166 | - <?php if( in_array( 'product.property.type.domain', $fields ) ) : ?> |
|
167 | - <td class="product-type-domain"><a class="items-field" href="<?= $url; ?>"><?= $enc->html( $item->getDomain() ); ?></a></td> |
|
166 | + <?php if (in_array('product.property.type.domain', $fields)) : ?> |
|
167 | + <td class="product-type-domain"><a class="items-field" href="<?= $url; ?>"><?= $enc->html($item->getDomain()); ?></a></td> |
|
168 | 168 | <?php endif; ?> |
169 | - <?php if( in_array( 'product.property.type.status', $fields ) ) : ?> |
|
170 | - <td class="product-type-status"><a class="items-field" href="<?= $url; ?>"><div class="fa status-<?= $enc->attr( $item->getStatus() ); ?>"></div></a></td> |
|
169 | + <?php if (in_array('product.property.type.status', $fields)) : ?> |
|
170 | + <td class="product-type-status"><a class="items-field" href="<?= $url; ?>"><div class="fa status-<?= $enc->attr($item->getStatus()); ?>"></div></a></td> |
|
171 | 171 | <?php endif; ?> |
172 | - <?php if( in_array( 'product.property.type.code', $fields ) ) : ?> |
|
173 | - <td class="product-type-code"><a class="items-field" href="<?= $url; ?>" tabindex="1"><?= $enc->html( $item->getCode() ); ?></a></td> |
|
172 | + <?php if (in_array('product.property.type.code', $fields)) : ?> |
|
173 | + <td class="product-type-code"><a class="items-field" href="<?= $url; ?>" tabindex="1"><?= $enc->html($item->getCode()); ?></a></td> |
|
174 | 174 | <?php endif; ?> |
175 | - <?php if( in_array( 'product.property.type.label', $fields ) ) : ?> |
|
176 | - <td class="product-type-label"><a class="items-field" href="<?= $url; ?>"><?= $enc->html( $item->getLabel() ); ?></a></td> |
|
175 | + <?php if (in_array('product.property.type.label', $fields)) : ?> |
|
176 | + <td class="product-type-label"><a class="items-field" href="<?= $url; ?>"><?= $enc->html($item->getLabel()); ?></a></td> |
|
177 | 177 | <?php endif; ?> |
178 | - <?php if( in_array( 'product.property.type.position', $fields ) ) : ?> |
|
179 | - <td class="product-type-position"><a class="items-field" href="<?= $url; ?>"><?= $enc->html( $item->getPosition() ); ?></a></td> |
|
178 | + <?php if (in_array('product.property.type.position', $fields)) : ?> |
|
179 | + <td class="product-type-position"><a class="items-field" href="<?= $url; ?>"><?= $enc->html($item->getPosition()); ?></a></td> |
|
180 | 180 | <?php endif; ?> |
181 | - <?php if( in_array( 'product.property.type.ctime', $fields ) ) : ?> |
|
182 | - <td class="product-type-ctime"><a class="items-field" href="<?= $url; ?>"><?= $enc->html( $item->getTimeCreated() ); ?></a></td> |
|
181 | + <?php if (in_array('product.property.type.ctime', $fields)) : ?> |
|
182 | + <td class="product-type-ctime"><a class="items-field" href="<?= $url; ?>"><?= $enc->html($item->getTimeCreated()); ?></a></td> |
|
183 | 183 | <?php endif; ?> |
184 | - <?php if( in_array( 'product.property.type.mtime', $fields ) ) : ?> |
|
185 | - <td class="product-type-mtime"><a class="items-field" href="<?= $url; ?>"><?= $enc->html( $item->getTimeModified() ); ?></a></td> |
|
184 | + <?php if (in_array('product.property.type.mtime', $fields)) : ?> |
|
185 | + <td class="product-type-mtime"><a class="items-field" href="<?= $url; ?>"><?= $enc->html($item->getTimeModified()); ?></a></td> |
|
186 | 186 | <?php endif; ?> |
187 | - <?php if( in_array( 'product.property.type.editor', $fields ) ) : ?> |
|
188 | - <td class="product-type-editor"><a class="items-field" href="<?= $url; ?>"><?= $enc->html( $item->getEditor() ); ?></a></td> |
|
187 | + <?php if (in_array('product.property.type.editor', $fields)) : ?> |
|
188 | + <td class="product-type-editor"><a class="items-field" href="<?= $url; ?>"><?= $enc->html($item->getEditor()); ?></a></td> |
|
189 | 189 | <?php endif; ?> |
190 | 190 | |
191 | 191 | <td class="actions"> |
192 | 192 | <a class="btn act-copy fa" tabindex="1" |
193 | - href="<?= $enc->attr( $this->url( $copyTarget, $copyCntl, $copyAction, ['id' => $id] + $params, [], $copyConfig ) ); ?>" |
|
194 | - title="<?= $enc->attr( $this->translate( 'admin', 'Copy this entry') ); ?>" |
|
195 | - aria-label="<?= $enc->attr( $this->translate( 'admin', 'Copy' ) ); ?>"></a> |
|
196 | - <?php if( !$this->site()->readonly( $item->getSiteId() ) ) : ?> |
|
193 | + href="<?= $enc->attr($this->url($copyTarget, $copyCntl, $copyAction, ['id' => $id] + $params, [], $copyConfig)); ?>" |
|
194 | + title="<?= $enc->attr($this->translate('admin', 'Copy this entry')); ?>" |
|
195 | + aria-label="<?= $enc->attr($this->translate('admin', 'Copy')); ?>"></a> |
|
196 | + <?php if (!$this->site()->readonly($item->getSiteId())) : ?> |
|
197 | 197 | <a class="btn act-delete fa" tabindex="1" |
198 | - href="<?= $enc->attr( $this->url( $delTarget, $delCntl, $delAction, ['id' => $id] + $params, [], $delConfig ) ); ?>" |
|
199 | - title="<?= $enc->attr( $this->translate( 'admin', 'Delete this entry') ); ?>" |
|
200 | - aria-label="<?= $enc->attr( $this->translate( 'admin', 'Delete' ) ); ?>"></a> |
|
198 | + href="<?= $enc->attr($this->url($delTarget, $delCntl, $delAction, ['id' => $id] + $params, [], $delConfig)); ?>" |
|
199 | + title="<?= $enc->attr($this->translate('admin', 'Delete this entry')); ?>" |
|
200 | + aria-label="<?= $enc->attr($this->translate('admin', 'Delete')); ?>"></a> |
|
201 | 201 | <?php endif; ?> |
202 | 202 | </td> |
203 | 203 | </tr> |
@@ -205,18 +205,18 @@ discard block |
||
205 | 205 | </tbody> |
206 | 206 | </table> |
207 | 207 | |
208 | - <?php if( $this->get( 'items', [] ) === [] ) : ?> |
|
209 | - <div class="noitems"><?= $enc->html( sprintf( $this->translate( 'admin', 'No items found' ) ) ); ?></div> |
|
208 | + <?php if ($this->get('items', []) === []) : ?> |
|
209 | + <div class="noitems"><?= $enc->html(sprintf($this->translate('admin', 'No items found'))); ?></div> |
|
210 | 210 | <?php endif; ?> |
211 | 211 | </form> |
212 | 212 | |
213 | 213 | <?= $this->partial( |
214 | - $this->config( 'admin/jqadm/partial/pagination', 'common/partials/pagination-standard.php' ), |
|
215 | - ['pageParams' => $params, 'pos' => 'bottom', 'total' => $this->get( 'total' ), |
|
216 | - 'page' => $this->session( 'aimeos/admin/jqadm/type/product/property/page', [] )] |
|
214 | + $this->config('admin/jqadm/partial/pagination', 'common/partials/pagination-standard.php'), |
|
215 | + ['pageParams' => $params, 'pos' => 'bottom', 'total' => $this->get('total'), |
|
216 | + 'page' => $this->session('aimeos/admin/jqadm/type/product/property/page', [])] |
|
217 | 217 | ); |
218 | 218 | ?> |
219 | 219 | |
220 | 220 | <?php $this->block()->stop(); ?> |
221 | 221 | |
222 | -<?= $this->render( $this->config( 'admin/jqadm/template/page', 'common/page-standard.php' ) ); ?> |
|
222 | +<?= $this->render($this->config('admin/jqadm/template/page', 'common/page-standard.php')); ?> |
@@ -29,7 +29,7 @@ discard block |
||
29 | 29 | * @return \Aimeos\Admin\JQAdm\Iface Filter part implementing \Aimeos\Admin\JQAdm\Iface |
30 | 30 | * @throws \Aimeos\Admin\JQAdm\Exception If requested client implementation couldn't be found or initialisation fails |
31 | 31 | */ |
32 | - public static function createClient( \Aimeos\MShop\Context\Item\Iface $context, $name = null ) |
|
32 | + public static function createClient(\Aimeos\MShop\Context\Item\Iface $context, $name = null) |
|
33 | 33 | { |
34 | 34 | /** admin/jqadm/type/customer/property/name |
35 | 35 | * Class name of the used account favorite client implementation |
@@ -64,22 +64,22 @@ discard block |
||
64 | 64 | * @since 2018.01 |
65 | 65 | * @category Developer |
66 | 66 | */ |
67 | - if( $name === null ) { |
|
68 | - $name = $context->getConfig()->get( 'admin/jqadm/type/customer/property/name', 'Standard' ); |
|
67 | + if ($name === null) { |
|
68 | + $name = $context->getConfig()->get('admin/jqadm/type/customer/property/name', 'Standard'); |
|
69 | 69 | } |
70 | 70 | |
71 | - if( ctype_alnum( $name ) === false ) |
|
71 | + if (ctype_alnum($name) === false) |
|
72 | 72 | { |
73 | - $classname = is_string( $name ) ? '\\Aimeos\\Admin\\JQAdm\\Type\\Customer\\Property\\' . $name : '<not a string>'; |
|
74 | - throw new \Aimeos\Admin\JQAdm\Exception( sprintf( 'Invalid characters in class name "%1$s"', $classname ) ); |
|
73 | + $classname = is_string($name) ? '\\Aimeos\\Admin\\JQAdm\\Type\\Customer\\Property\\' . $name : '<not a string>'; |
|
74 | + throw new \Aimeos\Admin\JQAdm\Exception(sprintf('Invalid characters in class name "%1$s"', $classname)); |
|
75 | 75 | } |
76 | 76 | |
77 | 77 | $iface = '\\Aimeos\\Admin\\JQAdm\\Iface'; |
78 | 78 | $classname = '\\Aimeos\\Admin\\JQAdm\\Type\\Customer\\Property\\' . $name; |
79 | 79 | |
80 | - $client = self::createClientBase( $context, $classname, $iface ); |
|
80 | + $client = self::createClientBase($context, $classname, $iface); |
|
81 | 81 | |
82 | - return self::addClientDecorators( $context, $client, 'type/customer/property' ); |
|
82 | + return self::addClientDecorators($context, $client, 'type/customer/property'); |
|
83 | 83 | } |
84 | 84 | |
85 | 85 | } |
86 | 86 | \ No newline at end of file |
@@ -51,14 +51,12 @@ discard block |
||
51 | 51 | $view->tabindex = ++$idx + 1; |
52 | 52 | $view->itemBody .= $client->copy(); |
53 | 53 | } |
54 | - } |
|
55 | - catch( \Aimeos\MShop\Exception $e ) |
|
54 | + } catch( \Aimeos\MShop\Exception $e ) |
|
56 | 55 | { |
57 | 56 | $error = array( 'type-customer-property-item' => $context->getI18n()->dt( 'mshop', $e->getMessage() ) ); |
58 | 57 | $view->errors = $view->get( 'errors', [] ) + $error; |
59 | 58 | $this->logException( $e ); |
60 | - } |
|
61 | - catch( \Exception $e ) |
|
59 | + } catch( \Exception $e ) |
|
62 | 60 | { |
63 | 61 | $error = array( 'type-customer-property-item' => $e->getMessage() . ', ' . $e->getFile() . ':' . $e->getLine() ); |
64 | 62 | $view->errors = $view->get( 'errors', [] ) + $error; |
@@ -100,14 +98,12 @@ discard block |
||
100 | 98 | $view->tabindex = ++$idx + 1; |
101 | 99 | $view->itemBody .= $client->create(); |
102 | 100 | } |
103 | - } |
|
104 | - catch( \Aimeos\MShop\Exception $e ) |
|
101 | + } catch( \Aimeos\MShop\Exception $e ) |
|
105 | 102 | { |
106 | 103 | $error = array( 'type-customer-property-item' => $context->getI18n()->dt( 'mshop', $e->getMessage() ) ); |
107 | 104 | $view->errors = $view->get( 'errors', [] ) + $error; |
108 | 105 | $this->logException( $e ); |
109 | - } |
|
110 | - catch( \Exception $e ) |
|
106 | + } catch( \Exception $e ) |
|
111 | 107 | { |
112 | 108 | $error = array( 'type-customer-property-item' => $e->getMessage() . ', ' . $e->getFile() . ':' . $e->getLine() ); |
113 | 109 | $view->errors = $view->get( 'errors', [] ) + $error; |
@@ -148,14 +144,12 @@ discard block |
||
148 | 144 | |
149 | 145 | $this->nextAction( $view, 'search', 'type/customer/property', null, 'delete' ); |
150 | 146 | return; |
151 | - } |
|
152 | - catch( \Aimeos\MShop\Exception $e ) |
|
147 | + } catch( \Aimeos\MShop\Exception $e ) |
|
153 | 148 | { |
154 | 149 | $error = array( 'type-customer-property-item' => $context->getI18n()->dt( 'mshop', $e->getMessage() ) ); |
155 | 150 | $view->errors = $view->get( 'errors', [] ) + $error; |
156 | 151 | $this->logException( $e ); |
157 | - } |
|
158 | - catch( \Exception $e ) |
|
152 | + } catch( \Exception $e ) |
|
159 | 153 | { |
160 | 154 | $error = array( 'type-customer-property-item' => $e->getMessage() . ', ' . $e->getFile() . ':' . $e->getLine() ); |
161 | 155 | $view->errors = $view->get( 'errors', [] ) + $error; |
@@ -196,14 +190,12 @@ discard block |
||
196 | 190 | $view->tabindex = ++$idx + 1; |
197 | 191 | $view->itemBody .= $client->get(); |
198 | 192 | } |
199 | - } |
|
200 | - catch( \Aimeos\MShop\Exception $e ) |
|
193 | + } catch( \Aimeos\MShop\Exception $e ) |
|
201 | 194 | { |
202 | 195 | $error = array( 'type-customer-property-item' => $context->getI18n()->dt( 'mshop', $e->getMessage() ) ); |
203 | 196 | $view->errors = $view->get( 'errors', [] ) + $error; |
204 | 197 | $this->logException( $e ); |
205 | - } |
|
206 | - catch( \Exception $e ) |
|
198 | + } catch( \Exception $e ) |
|
207 | 199 | { |
208 | 200 | $error = array( 'type-customer-property-item' => $e->getMessage() . ', ' . $e->getFile() . ':' . $e->getLine() ); |
209 | 201 | $view->errors = $view->get( 'errors', [] ) + $error; |
@@ -241,18 +233,15 @@ discard block |
||
241 | 233 | |
242 | 234 | $this->nextAction( $view, $view->param( 'next' ), 'type/customer/property', $view->item->getId(), 'save' ); |
243 | 235 | return; |
244 | - } |
|
245 | - catch( \Aimeos\Admin\JQAdm\Exception $e ) |
|
236 | + } catch( \Aimeos\Admin\JQAdm\Exception $e ) |
|
246 | 237 | { |
247 | 238 | // fall through to create |
248 | - } |
|
249 | - catch( \Aimeos\MShop\Exception $e ) |
|
239 | + } catch( \Aimeos\MShop\Exception $e ) |
|
250 | 240 | { |
251 | 241 | $error = array( 'type-customer-property-item' => $context->getI18n()->dt( 'mshop', $e->getMessage() ) ); |
252 | 242 | $view->errors = $view->get( 'errors', [] ) + $error; |
253 | 243 | $this->logException( $e ); |
254 | - } |
|
255 | - catch( \Exception $e ) |
|
244 | + } catch( \Exception $e ) |
|
256 | 245 | { |
257 | 246 | $error = array( 'type-customer-property-item' => $e->getMessage() . ', ' . $e->getFile() . ':' . $e->getLine() ); |
258 | 247 | $view->errors = $view->get( 'errors', [] ) + $error; |
@@ -291,14 +280,12 @@ discard block |
||
291 | 280 | foreach( $this->getSubClients() as $client ) { |
292 | 281 | $view->itemBody .= $client->search(); |
293 | 282 | } |
294 | - } |
|
295 | - catch( \Aimeos\MShop\Exception $e ) |
|
283 | + } catch( \Aimeos\MShop\Exception $e ) |
|
296 | 284 | { |
297 | 285 | $error = array( 'type-customer-property-item' => $context->getI18n()->dt( 'mshop', $e->getMessage() ) ); |
298 | 286 | $view->errors = $view->get( 'errors', [] ) + $error; |
299 | 287 | $this->logException( $e ); |
300 | - } |
|
301 | - catch( \Exception $e ) |
|
288 | + } catch( \Exception $e ) |
|
302 | 289 | { |
303 | 290 | $error = array( 'type-customer-property-item' => $e->getMessage() . ', ' . $e->getFile() . ':' . $e->getLine() ); |
304 | 291 | $view->errors = $view->get( 'errors', [] ) + $error; |
@@ -10,7 +10,7 @@ discard block |
||
10 | 10 | |
11 | 11 | namespace Aimeos\Admin\JQAdm\Type\Customer\Property; |
12 | 12 | |
13 | -sprintf( 'type/customer/property' ); // for translation |
|
13 | +sprintf('type/customer/property'); // for translation |
|
14 | 14 | |
15 | 15 | |
16 | 16 | /** |
@@ -35,37 +35,37 @@ discard block |
||
35 | 35 | |
36 | 36 | try |
37 | 37 | { |
38 | - if( ( $id = $view->param( 'id' ) ) === null ) { |
|
39 | - throw new \Aimeos\Admin\JQAdm\Exception( sprintf( 'Required parameter "%1$s" is missing', 'id' ) ); |
|
38 | + if (($id = $view->param('id')) === null) { |
|
39 | + throw new \Aimeos\Admin\JQAdm\Exception(sprintf('Required parameter "%1$s" is missing', 'id')); |
|
40 | 40 | } |
41 | 41 | |
42 | - $manager = \Aimeos\MShop\Factory::createManager( $context, 'customer/property/type' ); |
|
43 | - $view->item = $manager->getItem( $id ); |
|
42 | + $manager = \Aimeos\MShop\Factory::createManager($context, 'customer/property/type'); |
|
43 | + $view->item = $manager->getItem($id); |
|
44 | 44 | |
45 | - $view->itemData = $this->toArray( $view->item, true ); |
|
45 | + $view->itemData = $this->toArray($view->item, true); |
|
46 | 46 | $view->itemSubparts = $this->getSubClientNames(); |
47 | 47 | $view->itemBody = ''; |
48 | 48 | |
49 | - foreach( $this->getSubClients() as $idx => $client ) |
|
49 | + foreach ($this->getSubClients() as $idx => $client) |
|
50 | 50 | { |
51 | 51 | $view->tabindex = ++$idx + 1; |
52 | 52 | $view->itemBody .= $client->copy(); |
53 | 53 | } |
54 | 54 | } |
55 | - catch( \Aimeos\MShop\Exception $e ) |
|
55 | + catch (\Aimeos\MShop\Exception $e) |
|
56 | 56 | { |
57 | - $error = array( 'type-customer-property-item' => $context->getI18n()->dt( 'mshop', $e->getMessage() ) ); |
|
58 | - $view->errors = $view->get( 'errors', [] ) + $error; |
|
59 | - $this->logException( $e ); |
|
57 | + $error = array('type-customer-property-item' => $context->getI18n()->dt('mshop', $e->getMessage())); |
|
58 | + $view->errors = $view->get('errors', []) + $error; |
|
59 | + $this->logException($e); |
|
60 | 60 | } |
61 | - catch( \Exception $e ) |
|
61 | + catch (\Exception $e) |
|
62 | 62 | { |
63 | - $error = array( 'type-customer-property-item' => $e->getMessage() . ', ' . $e->getFile() . ':' . $e->getLine() ); |
|
64 | - $view->errors = $view->get( 'errors', [] ) + $error; |
|
65 | - $this->logException( $e ); |
|
63 | + $error = array('type-customer-property-item' => $e->getMessage() . ', ' . $e->getFile() . ':' . $e->getLine()); |
|
64 | + $view->errors = $view->get('errors', []) + $error; |
|
65 | + $this->logException($e); |
|
66 | 66 | } |
67 | 67 | |
68 | - return $this->render( $view ); |
|
68 | + return $this->render($view); |
|
69 | 69 | } |
70 | 70 | |
71 | 71 | |
@@ -81,10 +81,10 @@ discard block |
||
81 | 81 | |
82 | 82 | try |
83 | 83 | { |
84 | - $data = $view->param( 'item', [] ); |
|
84 | + $data = $view->param('item', []); |
|
85 | 85 | |
86 | - if( !isset( $view->item ) ) { |
|
87 | - $view->item = \Aimeos\MShop\Factory::createManager( $context, 'customer/property/type' )->createItem(); |
|
86 | + if (!isset($view->item)) { |
|
87 | + $view->item = \Aimeos\MShop\Factory::createManager($context, 'customer/property/type')->createItem(); |
|
88 | 88 | } |
89 | 89 | |
90 | 90 | $data['customer.property.type.siteid'] = $view->item->getSiteId(); |
@@ -93,26 +93,26 @@ discard block |
||
93 | 93 | $view->itemData = $data; |
94 | 94 | $view->itemBody = ''; |
95 | 95 | |
96 | - foreach( $this->getSubClients() as $idx => $client ) |
|
96 | + foreach ($this->getSubClients() as $idx => $client) |
|
97 | 97 | { |
98 | 98 | $view->tabindex = ++$idx + 1; |
99 | 99 | $view->itemBody .= $client->create(); |
100 | 100 | } |
101 | 101 | } |
102 | - catch( \Aimeos\MShop\Exception $e ) |
|
102 | + catch (\Aimeos\MShop\Exception $e) |
|
103 | 103 | { |
104 | - $error = array( 'type-customer-property-item' => $context->getI18n()->dt( 'mshop', $e->getMessage() ) ); |
|
105 | - $view->errors = $view->get( 'errors', [] ) + $error; |
|
106 | - $this->logException( $e ); |
|
104 | + $error = array('type-customer-property-item' => $context->getI18n()->dt('mshop', $e->getMessage())); |
|
105 | + $view->errors = $view->get('errors', []) + $error; |
|
106 | + $this->logException($e); |
|
107 | 107 | } |
108 | - catch( \Exception $e ) |
|
108 | + catch (\Exception $e) |
|
109 | 109 | { |
110 | - $error = array( 'type-customer-property-item' => $e->getMessage() . ', ' . $e->getFile() . ':' . $e->getLine() ); |
|
111 | - $view->errors = $view->get( 'errors', [] ) + $error; |
|
112 | - $this->logException( $e ); |
|
110 | + $error = array('type-customer-property-item' => $e->getMessage() . ', ' . $e->getFile() . ':' . $e->getLine()); |
|
111 | + $view->errors = $view->get('errors', []) + $error; |
|
112 | + $this->logException($e); |
|
113 | 113 | } |
114 | 114 | |
115 | - return $this->render( $view ); |
|
115 | + return $this->render($view); |
|
116 | 116 | } |
117 | 117 | |
118 | 118 | |
@@ -126,38 +126,38 @@ discard block |
||
126 | 126 | $view = $this->getView(); |
127 | 127 | $context = $this->getContext(); |
128 | 128 | |
129 | - $manager = \Aimeos\MShop\Factory::createManager( $context, 'customer/property/type' ); |
|
129 | + $manager = \Aimeos\MShop\Factory::createManager($context, 'customer/property/type'); |
|
130 | 130 | $manager->begin(); |
131 | 131 | |
132 | 132 | try |
133 | 133 | { |
134 | - if( ( $id = $view->param( 'id' ) ) === null ) { |
|
135 | - throw new \Aimeos\Admin\JQAdm\Exception( sprintf( 'Required parameter "%1$s" is missing', 'id' ) ); |
|
134 | + if (($id = $view->param('id')) === null) { |
|
135 | + throw new \Aimeos\Admin\JQAdm\Exception(sprintf('Required parameter "%1$s" is missing', 'id')); |
|
136 | 136 | } |
137 | 137 | |
138 | - $view->item = $manager->getItem( $id ); |
|
138 | + $view->item = $manager->getItem($id); |
|
139 | 139 | |
140 | - foreach( $this->getSubClients() as $client ) { |
|
140 | + foreach ($this->getSubClients() as $client) { |
|
141 | 141 | $client->delete(); |
142 | 142 | } |
143 | 143 | |
144 | - $manager->deleteItem( $id ); |
|
144 | + $manager->deleteItem($id); |
|
145 | 145 | $manager->commit(); |
146 | 146 | |
147 | - $this->nextAction( $view, 'search', 'type/customer/property', null, 'delete' ); |
|
147 | + $this->nextAction($view, 'search', 'type/customer/property', null, 'delete'); |
|
148 | 148 | return; |
149 | 149 | } |
150 | - catch( \Aimeos\MShop\Exception $e ) |
|
150 | + catch (\Aimeos\MShop\Exception $e) |
|
151 | 151 | { |
152 | - $error = array( 'type-customer-property-item' => $context->getI18n()->dt( 'mshop', $e->getMessage() ) ); |
|
153 | - $view->errors = $view->get( 'errors', [] ) + $error; |
|
154 | - $this->logException( $e ); |
|
152 | + $error = array('type-customer-property-item' => $context->getI18n()->dt('mshop', $e->getMessage())); |
|
153 | + $view->errors = $view->get('errors', []) + $error; |
|
154 | + $this->logException($e); |
|
155 | 155 | } |
156 | - catch( \Exception $e ) |
|
156 | + catch (\Exception $e) |
|
157 | 157 | { |
158 | - $error = array( 'type-customer-property-item' => $e->getMessage() . ', ' . $e->getFile() . ':' . $e->getLine() ); |
|
159 | - $view->errors = $view->get( 'errors', [] ) + $error; |
|
160 | - $this->logException( $e ); |
|
158 | + $error = array('type-customer-property-item' => $e->getMessage() . ', ' . $e->getFile() . ':' . $e->getLine()); |
|
159 | + $view->errors = $view->get('errors', []) + $error; |
|
160 | + $this->logException($e); |
|
161 | 161 | } |
162 | 162 | |
163 | 163 | $manager->rollback(); |
@@ -178,37 +178,37 @@ discard block |
||
178 | 178 | |
179 | 179 | try |
180 | 180 | { |
181 | - if( ( $id = $view->param( 'id' ) ) === null ) { |
|
182 | - throw new \Aimeos\Admin\JQAdm\Exception( sprintf( 'Required parameter "%1$s" is missing', 'id' ) ); |
|
181 | + if (($id = $view->param('id')) === null) { |
|
182 | + throw new \Aimeos\Admin\JQAdm\Exception(sprintf('Required parameter "%1$s" is missing', 'id')); |
|
183 | 183 | } |
184 | 184 | |
185 | - $manager = \Aimeos\MShop\Factory::createManager( $context, 'customer/property/type' ); |
|
185 | + $manager = \Aimeos\MShop\Factory::createManager($context, 'customer/property/type'); |
|
186 | 186 | |
187 | - $view->item = $manager->getItem( $id ); |
|
187 | + $view->item = $manager->getItem($id); |
|
188 | 188 | $view->itemSubparts = $this->getSubClientNames(); |
189 | - $view->itemData = $this->toArray( $view->item ); |
|
189 | + $view->itemData = $this->toArray($view->item); |
|
190 | 190 | $view->itemBody = ''; |
191 | 191 | |
192 | - foreach( $this->getSubClients() as $idx => $client ) |
|
192 | + foreach ($this->getSubClients() as $idx => $client) |
|
193 | 193 | { |
194 | 194 | $view->tabindex = ++$idx + 1; |
195 | 195 | $view->itemBody .= $client->get(); |
196 | 196 | } |
197 | 197 | } |
198 | - catch( \Aimeos\MShop\Exception $e ) |
|
198 | + catch (\Aimeos\MShop\Exception $e) |
|
199 | 199 | { |
200 | - $error = array( 'type-customer-property-item' => $context->getI18n()->dt( 'mshop', $e->getMessage() ) ); |
|
201 | - $view->errors = $view->get( 'errors', [] ) + $error; |
|
202 | - $this->logException( $e ); |
|
200 | + $error = array('type-customer-property-item' => $context->getI18n()->dt('mshop', $e->getMessage())); |
|
201 | + $view->errors = $view->get('errors', []) + $error; |
|
202 | + $this->logException($e); |
|
203 | 203 | } |
204 | - catch( \Exception $e ) |
|
204 | + catch (\Exception $e) |
|
205 | 205 | { |
206 | - $error = array( 'type-customer-property-item' => $e->getMessage() . ', ' . $e->getFile() . ':' . $e->getLine() ); |
|
207 | - $view->errors = $view->get( 'errors', [] ) + $error; |
|
208 | - $this->logException( $e ); |
|
206 | + $error = array('type-customer-property-item' => $e->getMessage() . ', ' . $e->getFile() . ':' . $e->getLine()); |
|
207 | + $view->errors = $view->get('errors', []) + $error; |
|
208 | + $this->logException($e); |
|
209 | 209 | } |
210 | 210 | |
211 | - return $this->render( $view ); |
|
211 | + return $this->render($view); |
|
212 | 212 | } |
213 | 213 | |
214 | 214 | |
@@ -222,40 +222,40 @@ discard block |
||
222 | 222 | $view = $this->getView(); |
223 | 223 | $context = $this->getContext(); |
224 | 224 | |
225 | - $manager = \Aimeos\MShop\Factory::createManager( $context, 'customer/property/type' ); |
|
225 | + $manager = \Aimeos\MShop\Factory::createManager($context, 'customer/property/type'); |
|
226 | 226 | $manager->begin(); |
227 | 227 | |
228 | 228 | try |
229 | 229 | { |
230 | - $item = $this->fromArray( $view->param( 'item', [] ) ); |
|
231 | - $view->item = $item->getId() ? $item : $manager->saveItem( $item ); |
|
230 | + $item = $this->fromArray($view->param('item', [])); |
|
231 | + $view->item = $item->getId() ? $item : $manager->saveItem($item); |
|
232 | 232 | $view->itemBody = ''; |
233 | 233 | |
234 | - foreach( $this->getSubClients() as $client ) { |
|
234 | + foreach ($this->getSubClients() as $client) { |
|
235 | 235 | $view->itemBody .= $client->save(); |
236 | 236 | } |
237 | 237 | |
238 | - $manager->saveItem( clone $view->item ); |
|
238 | + $manager->saveItem(clone $view->item); |
|
239 | 239 | $manager->commit(); |
240 | 240 | |
241 | - $this->nextAction( $view, $view->param( 'next' ), 'type/customer/property', $view->item->getId(), 'save' ); |
|
241 | + $this->nextAction($view, $view->param('next'), 'type/customer/property', $view->item->getId(), 'save'); |
|
242 | 242 | return; |
243 | 243 | } |
244 | - catch( \Aimeos\Admin\JQAdm\Exception $e ) |
|
244 | + catch (\Aimeos\Admin\JQAdm\Exception $e) |
|
245 | 245 | { |
246 | 246 | // fall through to create |
247 | 247 | } |
248 | - catch( \Aimeos\MShop\Exception $e ) |
|
248 | + catch (\Aimeos\MShop\Exception $e) |
|
249 | 249 | { |
250 | - $error = array( 'type-customer-property-item' => $context->getI18n()->dt( 'mshop', $e->getMessage() ) ); |
|
251 | - $view->errors = $view->get( 'errors', [] ) + $error; |
|
252 | - $this->logException( $e ); |
|
250 | + $error = array('type-customer-property-item' => $context->getI18n()->dt('mshop', $e->getMessage())); |
|
251 | + $view->errors = $view->get('errors', []) + $error; |
|
252 | + $this->logException($e); |
|
253 | 253 | } |
254 | - catch( \Exception $e ) |
|
254 | + catch (\Exception $e) |
|
255 | 255 | { |
256 | - $error = array( 'type-customer-property-item' => $e->getMessage() . ', ' . $e->getFile() . ':' . $e->getLine() ); |
|
257 | - $view->errors = $view->get( 'errors', [] ) + $error; |
|
258 | - $this->logException( $e ); |
|
256 | + $error = array('type-customer-property-item' => $e->getMessage() . ', ' . $e->getFile() . ':' . $e->getLine()); |
|
257 | + $view->errors = $view->get('errors', []) + $error; |
|
258 | + $this->logException($e); |
|
259 | 259 | } |
260 | 260 | |
261 | 261 | $manager->rollback(); |
@@ -277,31 +277,31 @@ discard block |
||
277 | 277 | try |
278 | 278 | { |
279 | 279 | $total = 0; |
280 | - $params = $this->storeSearchParams( $view->param(), 'type/customer/property' ); |
|
281 | - $manager = \Aimeos\MShop\Factory::createManager( $context, 'customer/property/type' ); |
|
282 | - $search = $this->initCriteria( $manager->createSearch(), $params ); |
|
280 | + $params = $this->storeSearchParams($view->param(), 'type/customer/property'); |
|
281 | + $manager = \Aimeos\MShop\Factory::createManager($context, 'customer/property/type'); |
|
282 | + $search = $this->initCriteria($manager->createSearch(), $params); |
|
283 | 283 | |
284 | - $view->items = $manager->searchItems( $search, [], $total ); |
|
285 | - $view->filterCustomers = $manager->getSearchAttributes( true ); |
|
284 | + $view->items = $manager->searchItems($search, [], $total); |
|
285 | + $view->filterCustomers = $manager->getSearchAttributes(true); |
|
286 | 286 | $view->filterOperators = $search->getOperators(); |
287 | 287 | $view->total = $total; |
288 | 288 | $view->itemBody = ''; |
289 | 289 | |
290 | - foreach( $this->getSubClients() as $client ) { |
|
290 | + foreach ($this->getSubClients() as $client) { |
|
291 | 291 | $view->itemBody .= $client->search(); |
292 | 292 | } |
293 | 293 | } |
294 | - catch( \Aimeos\MShop\Exception $e ) |
|
294 | + catch (\Aimeos\MShop\Exception $e) |
|
295 | 295 | { |
296 | - $error = array( 'type-customer-property-item' => $context->getI18n()->dt( 'mshop', $e->getMessage() ) ); |
|
297 | - $view->errors = $view->get( 'errors', [] ) + $error; |
|
298 | - $this->logException( $e ); |
|
296 | + $error = array('type-customer-property-item' => $context->getI18n()->dt('mshop', $e->getMessage())); |
|
297 | + $view->errors = $view->get('errors', []) + $error; |
|
298 | + $this->logException($e); |
|
299 | 299 | } |
300 | - catch( \Exception $e ) |
|
300 | + catch (\Exception $e) |
|
301 | 301 | { |
302 | - $error = array( 'type-customer-property-item' => $e->getMessage() . ', ' . $e->getFile() . ':' . $e->getLine() ); |
|
303 | - $view->errors = $view->get( 'errors', [] ) + $error; |
|
304 | - $this->logException( $e ); |
|
302 | + $error = array('type-customer-property-item' => $e->getMessage() . ', ' . $e->getFile() . ':' . $e->getLine()); |
|
303 | + $view->errors = $view->get('errors', []) + $error; |
|
304 | + $this->logException($e); |
|
305 | 305 | } |
306 | 306 | |
307 | 307 | /** admin/jqadm/type/customer/property/template-list |
@@ -326,7 +326,7 @@ discard block |
||
326 | 326 | $tplconf = 'admin/jqadm/type/customer/property/template-list'; |
327 | 327 | $default = 'type/customer/property/list-standard.php'; |
328 | 328 | |
329 | - return $view->render( $view->config( $tplconf, $default ) ); |
|
329 | + return $view->render($view->config($tplconf, $default)); |
|
330 | 330 | } |
331 | 331 | |
332 | 332 | |
@@ -337,7 +337,7 @@ discard block |
||
337 | 337 | * @param string|null $name Name of the sub-client (Default if null) |
338 | 338 | * @return \Aimeos\Admin\JQAdm\Iface Sub-client object |
339 | 339 | */ |
340 | - public function getSubClient( $propertytype, $name = null ) |
|
340 | + public function getSubClient($propertytype, $name = null) |
|
341 | 341 | { |
342 | 342 | /** admin/jqadm/type/customer/property/decorators/excludes |
343 | 343 | * Excludes decorators added by the "common" option from the list type JQAdm client |
@@ -412,7 +412,7 @@ discard block |
||
412 | 412 | * @see admin/jqadm/type/customer/property/decorators/excludes |
413 | 413 | * @see admin/jqadm/type/customer/property/decorators/global |
414 | 414 | */ |
415 | - return $this->createSubClient( 'type/customer/property' . $propertytype, $name ); |
|
415 | + return $this->createSubClient('type/customer/property' . $propertytype, $name); |
|
416 | 416 | } |
417 | 417 | |
418 | 418 | |
@@ -456,7 +456,7 @@ discard block |
||
456 | 456 | * @since 2018.01 |
457 | 457 | * @category Developer |
458 | 458 | */ |
459 | - return $this->getContext()->getConfig()->get( 'admin/jqadm/type/customer/property/standard/subparts', [] ); |
|
459 | + return $this->getContext()->getConfig()->get('admin/jqadm/type/customer/property/standard/subparts', []); |
|
460 | 460 | } |
461 | 461 | |
462 | 462 | |
@@ -467,17 +467,17 @@ discard block |
||
467 | 467 | * @param string[] Data array |
468 | 468 | * @return \Aimeos\MShop\Common\Item\Type\Iface New list type item object |
469 | 469 | */ |
470 | - protected function fromArray( array $data ) |
|
470 | + protected function fromArray(array $data) |
|
471 | 471 | { |
472 | - $manager = \Aimeos\MShop\Factory::createManager( $this->getContext(), 'customer/property/type' ); |
|
472 | + $manager = \Aimeos\MShop\Factory::createManager($this->getContext(), 'customer/property/type'); |
|
473 | 473 | |
474 | - if( isset( $data['customer.property.type.id'] ) && $data['customer.property.type.id'] != '' ) { |
|
475 | - $item = $manager->getItem( $data['customer.property.type.id'] ); |
|
474 | + if (isset($data['customer.property.type.id']) && $data['customer.property.type.id'] != '') { |
|
475 | + $item = $manager->getItem($data['customer.property.type.id']); |
|
476 | 476 | } else { |
477 | 477 | $item = $manager->createItem(); |
478 | 478 | } |
479 | 479 | |
480 | - $item->fromArray( $data ); |
|
480 | + $item->fromArray($data); |
|
481 | 481 | |
482 | 482 | return $item; |
483 | 483 | } |
@@ -489,11 +489,11 @@ discard block |
||
489 | 489 | * @param \Aimeos\MShop\Common\Item\Type\Iface $item Type item object |
490 | 490 | * @return string[] Multi-dimensional associative list of item data |
491 | 491 | */ |
492 | - protected function toArray( \Aimeos\MShop\Common\Item\Type\Iface $item, $copy = false ) |
|
492 | + protected function toArray(\Aimeos\MShop\Common\Item\Type\Iface $item, $copy = false) |
|
493 | 493 | { |
494 | - $data = $item->toArray( true ); |
|
494 | + $data = $item->toArray(true); |
|
495 | 495 | |
496 | - if( $copy === true ) |
|
496 | + if ($copy === true) |
|
497 | 497 | { |
498 | 498 | $data['customer.property.type.code'] = $data['customer.property.type.code'] . '_copy'; |
499 | 499 | $data['customer.property.type.id'] = ''; |
@@ -509,7 +509,7 @@ discard block |
||
509 | 509 | * @param \Aimeos\MW\View\Iface $view View object with data assigned |
510 | 510 | * @return string HTML output |
511 | 511 | */ |
512 | - protected function render( \Aimeos\MW\View\Iface $view ) |
|
512 | + protected function render(\Aimeos\MW\View\Iface $view) |
|
513 | 513 | { |
514 | 514 | /** admin/jqadm/type/customer/property/template-item |
515 | 515 | * Relative path to the HTML body template for the list type item. |
@@ -533,6 +533,6 @@ discard block |
||
533 | 533 | $tplconf = 'admin/jqadm/type/customer/property/template-item'; |
534 | 534 | $default = 'type/customer/property/item-standard.php'; |
535 | 535 | |
536 | - return $view->render( $view->config( $tplconf, $default ) ); |
|
536 | + return $view->render($view->config($tplconf, $default)); |
|
537 | 537 | } |
538 | 538 | } |
@@ -17,42 +17,42 @@ |
||
17 | 17 | protected function setUp() |
18 | 18 | { |
19 | 19 | $this->context = \TestHelperJqadm::getContext(); |
20 | - $this->context->setView( \TestHelperJqadm::getView() ); |
|
20 | + $this->context->setView(\TestHelperJqadm::getView()); |
|
21 | 21 | } |
22 | 22 | |
23 | 23 | |
24 | 24 | public function testCreateClient() |
25 | 25 | { |
26 | - $client = \Aimeos\Admin\JQAdm\Type\Customer\Property\Factory::createClient( $this->context ); |
|
27 | - $this->assertInstanceOf( '\\Aimeos\\Admin\\JQAdm\\Iface', $client ); |
|
26 | + $client = \Aimeos\Admin\JQAdm\Type\Customer\Property\Factory::createClient($this->context); |
|
27 | + $this->assertInstanceOf('\\Aimeos\\Admin\\JQAdm\\Iface', $client); |
|
28 | 28 | } |
29 | 29 | |
30 | 30 | |
31 | 31 | public function testCreateClientName() |
32 | 32 | { |
33 | - $client = \Aimeos\Admin\JQAdm\Type\Customer\Property\Factory::createClient( $this->context, 'Standard' ); |
|
34 | - $this->assertInstanceOf( '\\Aimeos\\Admin\\JQAdm\\Iface', $client ); |
|
33 | + $client = \Aimeos\Admin\JQAdm\Type\Customer\Property\Factory::createClient($this->context, 'Standard'); |
|
34 | + $this->assertInstanceOf('\\Aimeos\\Admin\\JQAdm\\Iface', $client); |
|
35 | 35 | } |
36 | 36 | |
37 | 37 | |
38 | 38 | public function testCreateClientNameEmpty() |
39 | 39 | { |
40 | - $this->setExpectedException( '\\Aimeos\\Admin\\JQAdm\\Exception' ); |
|
41 | - \Aimeos\Admin\JQAdm\Type\Customer\Property\Factory::createClient( $this->context, '' ); |
|
40 | + $this->setExpectedException('\\Aimeos\\Admin\\JQAdm\\Exception'); |
|
41 | + \Aimeos\Admin\JQAdm\Type\Customer\Property\Factory::createClient($this->context, ''); |
|
42 | 42 | } |
43 | 43 | |
44 | 44 | |
45 | 45 | public function testCreateClientNameInvalid() |
46 | 46 | { |
47 | - $this->setExpectedException( '\\Aimeos\\Admin\\JQAdm\\Exception' ); |
|
48 | - \Aimeos\Admin\JQAdm\Type\Customer\Property\Factory::createClient( $this->context, '%type/customer/property' ); |
|
47 | + $this->setExpectedException('\\Aimeos\\Admin\\JQAdm\\Exception'); |
|
48 | + \Aimeos\Admin\JQAdm\Type\Customer\Property\Factory::createClient($this->context, '%type/customer/property'); |
|
49 | 49 | } |
50 | 50 | |
51 | 51 | |
52 | 52 | public function testCreateClientNameNotFound() |
53 | 53 | { |
54 | - $this->setExpectedException( '\\Aimeos\\Admin\\JQAdm\\Exception' ); |
|
55 | - \Aimeos\Admin\JQAdm\Type\Customer\Property\Factory::createClient( $this->context, 'test' ); |
|
54 | + $this->setExpectedException('\\Aimeos\\Admin\\JQAdm\\Exception'); |
|
55 | + \Aimeos\Admin\JQAdm\Type\Customer\Property\Factory::createClient($this->context, 'test'); |
|
56 | 56 | } |
57 | 57 | |
58 | 58 | } |
@@ -8,34 +8,34 @@ discard block |
||
8 | 8 | $enc = $this->encoder(); |
9 | 9 | |
10 | 10 | |
11 | -$target = $this->config( 'admin/jqadm/url/search/target' ); |
|
12 | -$controller = $this->config( 'admin/jqadm/url/search/controller', 'Jqadm' ); |
|
13 | -$action = $this->config( 'admin/jqadm/url/search/action', 'search' ); |
|
14 | -$config = $this->config( 'admin/jqadm/url/search/config', [] ); |
|
11 | +$target = $this->config('admin/jqadm/url/search/target'); |
|
12 | +$controller = $this->config('admin/jqadm/url/search/controller', 'Jqadm'); |
|
13 | +$action = $this->config('admin/jqadm/url/search/action', 'search'); |
|
14 | +$config = $this->config('admin/jqadm/url/search/config', []); |
|
15 | 15 | |
16 | 16 | |
17 | -$newTarget = $this->config( 'admin/jqadm/url/create/target' ); |
|
18 | -$newCntl = $this->config( 'admin/jqadm/url/create/controller', 'Jqadm' ); |
|
19 | -$newAction = $this->config( 'admin/jqadm/url/create/action', 'create' ); |
|
20 | -$newConfig = $this->config( 'admin/jqadm/url/create/config', [] ); |
|
17 | +$newTarget = $this->config('admin/jqadm/url/create/target'); |
|
18 | +$newCntl = $this->config('admin/jqadm/url/create/controller', 'Jqadm'); |
|
19 | +$newAction = $this->config('admin/jqadm/url/create/action', 'create'); |
|
20 | +$newConfig = $this->config('admin/jqadm/url/create/config', []); |
|
21 | 21 | |
22 | 22 | |
23 | -$getTarget = $this->config( 'admin/jqadm/url/get/target' ); |
|
24 | -$getCntl = $this->config( 'admin/jqadm/url/get/controller', 'Jqadm' ); |
|
25 | -$getAction = $this->config( 'admin/jqadm/url/get/action', 'get' ); |
|
26 | -$getConfig = $this->config( 'admin/jqadm/url/get/config', [] ); |
|
23 | +$getTarget = $this->config('admin/jqadm/url/get/target'); |
|
24 | +$getCntl = $this->config('admin/jqadm/url/get/controller', 'Jqadm'); |
|
25 | +$getAction = $this->config('admin/jqadm/url/get/action', 'get'); |
|
26 | +$getConfig = $this->config('admin/jqadm/url/get/config', []); |
|
27 | 27 | |
28 | 28 | |
29 | -$copyTarget = $this->config( 'admin/jqadm/url/copy/target' ); |
|
30 | -$copyCntl = $this->config( 'admin/jqadm/url/copy/controller', 'Jqadm' ); |
|
31 | -$copyAction = $this->config( 'admin/jqadm/url/copy/action', 'copy' ); |
|
32 | -$copyConfig = $this->config( 'admin/jqadm/url/copy/config', [] ); |
|
29 | +$copyTarget = $this->config('admin/jqadm/url/copy/target'); |
|
30 | +$copyCntl = $this->config('admin/jqadm/url/copy/controller', 'Jqadm'); |
|
31 | +$copyAction = $this->config('admin/jqadm/url/copy/action', 'copy'); |
|
32 | +$copyConfig = $this->config('admin/jqadm/url/copy/config', []); |
|
33 | 33 | |
34 | 34 | |
35 | -$delTarget = $this->config( 'admin/jqadm/url/delete/target' ); |
|
36 | -$delCntl = $this->config( 'admin/jqadm/url/delete/controller', 'Jqadm' ); |
|
37 | -$delAction = $this->config( 'admin/jqadm/url/delete/action', 'delete' ); |
|
38 | -$delConfig = $this->config( 'admin/jqadm/url/delete/config', [] ); |
|
35 | +$delTarget = $this->config('admin/jqadm/url/delete/target'); |
|
36 | +$delCntl = $this->config('admin/jqadm/url/delete/controller', 'Jqadm'); |
|
37 | +$delAction = $this->config('admin/jqadm/url/delete/action', 'delete'); |
|
38 | +$delConfig = $this->config('admin/jqadm/url/delete/config', []); |
|
39 | 39 | |
40 | 40 | |
41 | 41 | /** admin/jqadm/type/customer/property/fields |
@@ -53,44 +53,44 @@ discard block |
||
53 | 53 | * @category Developer |
54 | 54 | */ |
55 | 55 | $default = ['customer.property.type.domain', 'customer.property.type.status', 'customer.property.type.code', 'customer.property.type.label']; |
56 | -$default = $this->config( 'admin/jqadm/type/customer/property/fields', $default ); |
|
57 | -$fields = $this->session( 'aimeos/admin/jqadm/type/customer/property/fields', $default ); |
|
56 | +$default = $this->config('admin/jqadm/type/customer/property/fields', $default); |
|
57 | +$fields = $this->session('aimeos/admin/jqadm/type/customer/property/fields', $default); |
|
58 | 58 | |
59 | -$searchParams = $params = $this->get( 'pageParams', [] ); |
|
59 | +$searchParams = $params = $this->get('pageParams', []); |
|
60 | 60 | $searchParams['page']['start'] = 0; |
61 | 61 | |
62 | 62 | $typeList = []; |
63 | -foreach( $this->get( 'itemTypes', [] ) as $id => $typeItem ) { |
|
63 | +foreach ($this->get('itemTypes', []) as $id => $typeItem) { |
|
64 | 64 | $typeList[$id] = $typeItem->getCode(); |
65 | 65 | } |
66 | 66 | |
67 | 67 | $columnList = [ |
68 | - 'customer.property.type.id' => $this->translate( 'admin', 'ID' ), |
|
69 | - 'customer.property.type.domain' => $this->translate( 'admin', 'Domain' ), |
|
70 | - 'customer.property.type.status' => $this->translate( 'admin', 'Status' ), |
|
71 | - 'customer.property.type.code' => $this->translate( 'admin', 'Code' ), |
|
72 | - 'customer.property.type.label' => $this->translate( 'admin', 'Label' ), |
|
73 | - 'customer.property.type.position' => $this->translate( 'admin', 'Position' ), |
|
74 | - 'customer.property.type.ctime' => $this->translate( 'admin', 'Created' ), |
|
75 | - 'customer.property.type.mtime' => $this->translate( 'admin', 'Modified' ), |
|
76 | - 'customer.property.type.editor' => $this->translate( 'admin', 'Editor' ), |
|
68 | + 'customer.property.type.id' => $this->translate('admin', 'ID'), |
|
69 | + 'customer.property.type.domain' => $this->translate('admin', 'Domain'), |
|
70 | + 'customer.property.type.status' => $this->translate('admin', 'Status'), |
|
71 | + 'customer.property.type.code' => $this->translate('admin', 'Code'), |
|
72 | + 'customer.property.type.label' => $this->translate('admin', 'Label'), |
|
73 | + 'customer.property.type.position' => $this->translate('admin', 'Position'), |
|
74 | + 'customer.property.type.ctime' => $this->translate('admin', 'Created'), |
|
75 | + 'customer.property.type.mtime' => $this->translate('admin', 'Modified'), |
|
76 | + 'customer.property.type.editor' => $this->translate('admin', 'Editor'), |
|
77 | 77 | ]; |
78 | 78 | |
79 | 79 | ?> |
80 | -<?php $this->block()->start( 'jqadm_content' ); ?> |
|
80 | +<?php $this->block()->start('jqadm_content'); ?> |
|
81 | 81 | |
82 | 82 | <nav class="main-navbar"> |
83 | 83 | |
84 | 84 | <span class="navbar-brand"> |
85 | - <?= $enc->html( $this->translate( 'admin', 'Customer Property Types' ) ); ?> |
|
86 | - <span class="navbar-secondary">(<?= $enc->html( $this->site()->label() ); ?>)</span> |
|
85 | + <?= $enc->html($this->translate('admin', 'Customer Property Types')); ?> |
|
86 | + <span class="navbar-secondary">(<?= $enc->html($this->site()->label()); ?>)</span> |
|
87 | 87 | </span> |
88 | 88 | |
89 | 89 | <?= $this->partial( |
90 | - $this->config( 'admin/jqadm/partial/navsearch', 'common/partials/navsearch-standard.php' ), [ |
|
91 | - 'filter' => $this->session( 'aimeos/admin/jqadm/type/customer/property/filter', [] ), |
|
92 | - 'filterCustomers' => $this->get( 'filterCustomers', [] ), |
|
93 | - 'filterOperators' => $this->get( 'filterOperators', [] ), |
|
90 | + $this->config('admin/jqadm/partial/navsearch', 'common/partials/navsearch-standard.php'), [ |
|
91 | + 'filter' => $this->session('aimeos/admin/jqadm/type/customer/property/filter', []), |
|
92 | + 'filterCustomers' => $this->get('filterCustomers', []), |
|
93 | + 'filterOperators' => $this->get('filterOperators', []), |
|
94 | 94 | 'params' => $params, |
95 | 95 | ] |
96 | 96 | ); ?> |
@@ -98,33 +98,33 @@ discard block |
||
98 | 98 | |
99 | 99 | |
100 | 100 | <?= $this->partial( |
101 | - $this->config( 'admin/jqadm/partial/pagination', 'common/partials/pagination-standard.php' ), |
|
102 | - ['pageParams' => $params, 'pos' => 'top', 'total' => $this->get( 'total' ), |
|
103 | - 'page' => $this->session( 'aimeos/admin/jqadm/type/customer/property/page', [] )] |
|
101 | + $this->config('admin/jqadm/partial/pagination', 'common/partials/pagination-standard.php'), |
|
102 | + ['pageParams' => $params, 'pos' => 'top', 'total' => $this->get('total'), |
|
103 | + 'page' => $this->session('aimeos/admin/jqadm/type/customer/property/page', [])] |
|
104 | 104 | ); |
105 | 105 | ?> |
106 | 106 | |
107 | -<form class="list list-customer-property-type" method="POST" action="<?= $enc->attr( $this->url( $target, $controller, $action, $searchParams, [], $config ) ); ?>"> |
|
107 | +<form class="list list-customer-property-type" method="POST" action="<?= $enc->attr($this->url($target, $controller, $action, $searchParams, [], $config)); ?>"> |
|
108 | 108 | <?= $this->csrf()->formfield(); ?> |
109 | 109 | |
110 | 110 | <table class="list-items table table-hover table-striped"> |
111 | 111 | <thead class="list-header"> |
112 | 112 | <tr> |
113 | 113 | <?= $this->partial( |
114 | - $this->config( 'admin/jqadm/partial/listhead', 'common/partials/listhead-standard.php' ), |
|
115 | - ['fields' => $fields, 'params' => $params, 'data' => $columnList, 'sort' => $this->session( 'aimeos/admin/jqadm/type/customer/property/sort' )] |
|
114 | + $this->config('admin/jqadm/partial/listhead', 'common/partials/listhead-standard.php'), |
|
115 | + ['fields' => $fields, 'params' => $params, 'data' => $columnList, 'sort' => $this->session('aimeos/admin/jqadm/type/customer/property/sort')] |
|
116 | 116 | ); |
117 | 117 | ?> |
118 | 118 | |
119 | 119 | <th class="actions"> |
120 | 120 | <a class="btn fa act-add" tabindex="1" |
121 | - href="<?= $enc->attr( $this->url( $newTarget, $newCntl, $newAction, $params, [], $newConfig ) ); ?>" |
|
122 | - title="<?= $enc->attr( $this->translate( 'admin', 'Insert new entry (Ctrl+I)') ); ?>" |
|
123 | - aria-label="<?= $enc->attr( $this->translate( 'admin', 'Add' ) ); ?>"> |
|
121 | + href="<?= $enc->attr($this->url($newTarget, $newCntl, $newAction, $params, [], $newConfig)); ?>" |
|
122 | + title="<?= $enc->attr($this->translate('admin', 'Insert new entry (Ctrl+I)')); ?>" |
|
123 | + aria-label="<?= $enc->attr($this->translate('admin', 'Add')); ?>"> |
|
124 | 124 | </a> |
125 | 125 | |
126 | 126 | <?= $this->partial( |
127 | - $this->config( 'admin/jqadm/partial/columns', 'common/partials/columns-standard.php' ), |
|
127 | + $this->config('admin/jqadm/partial/columns', 'common/partials/columns-standard.php'), |
|
128 | 128 | ['fields' => $fields, 'data' => $columnList] |
129 | 129 | ); |
130 | 130 | ?> |
@@ -134,26 +134,26 @@ discard block |
||
134 | 134 | <tbody> |
135 | 135 | |
136 | 136 | <?= $this->partial( |
137 | - $this->config( 'admin/jqadm/partial/listsearch', 'common/partials/listsearch-standard.php' ), [ |
|
138 | - 'fields' => $fields, 'filter' => $this->session( 'aimeos/admin/jqadm/type/customer/property/filter', [] ), |
|
137 | + $this->config('admin/jqadm/partial/listsearch', 'common/partials/listsearch-standard.php'), [ |
|
138 | + 'fields' => $fields, 'filter' => $this->session('aimeos/admin/jqadm/type/customer/property/filter', []), |
|
139 | 139 | 'data' => [ |
140 | 140 | 'customer.property.type.id' => ['op' => '=='], |
141 | 141 | 'customer.property.type.domain' => ['op' => '==', 'type' => 'select', 'val' => [ |
142 | - 'customer' => $this->translate( 'admin', 'customer' ), |
|
143 | - 'catalog' => $this->translate( 'admin', 'catalog' ), |
|
144 | - 'customer' => $this->translate( 'admin', 'customer' ), |
|
145 | - 'media' => $this->translate( 'admin', 'media' ), |
|
146 | - 'price' => $this->translate( 'admin', 'price' ), |
|
147 | - 'product' => $this->translate( 'admin', 'product' ), |
|
148 | - 'service' => $this->translate( 'admin', 'service' ), |
|
149 | - 'supplier' => $this->translate( 'admin', 'supplier' ), |
|
150 | - 'text' => $this->translate( 'admin', 'text' ), |
|
142 | + 'customer' => $this->translate('admin', 'customer'), |
|
143 | + 'catalog' => $this->translate('admin', 'catalog'), |
|
144 | + 'customer' => $this->translate('admin', 'customer'), |
|
145 | + 'media' => $this->translate('admin', 'media'), |
|
146 | + 'price' => $this->translate('admin', 'price'), |
|
147 | + 'product' => $this->translate('admin', 'product'), |
|
148 | + 'service' => $this->translate('admin', 'service'), |
|
149 | + 'supplier' => $this->translate('admin', 'supplier'), |
|
150 | + 'text' => $this->translate('admin', 'text'), |
|
151 | 151 | ]], |
152 | 152 | 'customer.property.type.status' => ['op' => '==', 'type' => 'select', 'val' => [ |
153 | - '1' => $this->translate( 'mshop/code', 'status:1' ), |
|
154 | - '0' => $this->translate( 'mshop/code', 'status:0' ), |
|
155 | - '-1' => $this->translate( 'mshop/code', 'status:-1' ), |
|
156 | - '-2' => $this->translate( 'mshop/code', 'status:-2' ), |
|
153 | + '1' => $this->translate('mshop/code', 'status:1'), |
|
154 | + '0' => $this->translate('mshop/code', 'status:0'), |
|
155 | + '-1' => $this->translate('mshop/code', 'status:-1'), |
|
156 | + '-2' => $this->translate('mshop/code', 'status:-2'), |
|
157 | 157 | ]], |
158 | 158 | 'customer.property.type.code' => [], |
159 | 159 | 'customer.property.type.label' => [], |
@@ -165,47 +165,47 @@ discard block |
||
165 | 165 | ] ); |
166 | 166 | ?> |
167 | 167 | |
168 | - <?php foreach( $this->get( 'items', [] ) as $id => $item ) : ?> |
|
169 | - <?php $url = $enc->attr( $this->url( $getTarget, $getCntl, $getAction, ['id' => $id] + $params, [], $getConfig ) ); ?> |
|
170 | - <tr class="<?= $this->site()->readonly( $item->getSiteId() ); ?>"> |
|
171 | - <?php if( in_array( 'customer.property.type.id', $fields ) ) : ?> |
|
172 | - <td class="customer-type-id"><a class="items-field" href="<?= $url; ?>"><?= $enc->html( $item->getId() ); ?></a></td> |
|
168 | + <?php foreach ($this->get('items', []) as $id => $item) : ?> |
|
169 | + <?php $url = $enc->attr($this->url($getTarget, $getCntl, $getAction, ['id' => $id] + $params, [], $getConfig)); ?> |
|
170 | + <tr class="<?= $this->site()->readonly($item->getSiteId()); ?>"> |
|
171 | + <?php if (in_array('customer.property.type.id', $fields)) : ?> |
|
172 | + <td class="customer-type-id"><a class="items-field" href="<?= $url; ?>"><?= $enc->html($item->getId()); ?></a></td> |
|
173 | 173 | <?php endif; ?> |
174 | - <?php if( in_array( 'customer.property.type.domain', $fields ) ) : ?> |
|
175 | - <td class="customer-type-domain"><a class="items-field" href="<?= $url; ?>"><?= $enc->html( $item->getDomain() ); ?></a></td> |
|
174 | + <?php if (in_array('customer.property.type.domain', $fields)) : ?> |
|
175 | + <td class="customer-type-domain"><a class="items-field" href="<?= $url; ?>"><?= $enc->html($item->getDomain()); ?></a></td> |
|
176 | 176 | <?php endif; ?> |
177 | - <?php if( in_array( 'customer.property.type.status', $fields ) ) : ?> |
|
178 | - <td class="customer-type-status"><a class="items-field" href="<?= $url; ?>"><div class="fa status-<?= $enc->attr( $item->getStatus() ); ?>"></div></a></td> |
|
177 | + <?php if (in_array('customer.property.type.status', $fields)) : ?> |
|
178 | + <td class="customer-type-status"><a class="items-field" href="<?= $url; ?>"><div class="fa status-<?= $enc->attr($item->getStatus()); ?>"></div></a></td> |
|
179 | 179 | <?php endif; ?> |
180 | - <?php if( in_array( 'customer.property.type.code', $fields ) ) : ?> |
|
181 | - <td class="customer-type-code"><a class="items-field" href="<?= $url; ?>" tabindex="1"><?= $enc->html( $item->getCode() ); ?></a></td> |
|
180 | + <?php if (in_array('customer.property.type.code', $fields)) : ?> |
|
181 | + <td class="customer-type-code"><a class="items-field" href="<?= $url; ?>" tabindex="1"><?= $enc->html($item->getCode()); ?></a></td> |
|
182 | 182 | <?php endif; ?> |
183 | - <?php if( in_array( 'customer.property.type.label', $fields ) ) : ?> |
|
184 | - <td class="customer-type-label"><a class="items-field" href="<?= $url; ?>"><?= $enc->html( $item->getLabel() ); ?></a></td> |
|
183 | + <?php if (in_array('customer.property.type.label', $fields)) : ?> |
|
184 | + <td class="customer-type-label"><a class="items-field" href="<?= $url; ?>"><?= $enc->html($item->getLabel()); ?></a></td> |
|
185 | 185 | <?php endif; ?> |
186 | - <?php if( in_array( 'customer.property.type.position', $fields ) ) : ?> |
|
187 | - <td class="customer-type-position"><a class="items-field" href="<?= $url; ?>"><?= $enc->html( $item->getPosition() ); ?></a></td> |
|
186 | + <?php if (in_array('customer.property.type.position', $fields)) : ?> |
|
187 | + <td class="customer-type-position"><a class="items-field" href="<?= $url; ?>"><?= $enc->html($item->getPosition()); ?></a></td> |
|
188 | 188 | <?php endif; ?> |
189 | - <?php if( in_array( 'customer.property.type.ctime', $fields ) ) : ?> |
|
190 | - <td class="customer-type-ctime"><a class="items-field" href="<?= $url; ?>"><?= $enc->html( $item->getTimeCreated() ); ?></a></td> |
|
189 | + <?php if (in_array('customer.property.type.ctime', $fields)) : ?> |
|
190 | + <td class="customer-type-ctime"><a class="items-field" href="<?= $url; ?>"><?= $enc->html($item->getTimeCreated()); ?></a></td> |
|
191 | 191 | <?php endif; ?> |
192 | - <?php if( in_array( 'customer.property.type.mtime', $fields ) ) : ?> |
|
193 | - <td class="customer-type-mtime"><a class="items-field" href="<?= $url; ?>"><?= $enc->html( $item->getTimeModified() ); ?></a></td> |
|
192 | + <?php if (in_array('customer.property.type.mtime', $fields)) : ?> |
|
193 | + <td class="customer-type-mtime"><a class="items-field" href="<?= $url; ?>"><?= $enc->html($item->getTimeModified()); ?></a></td> |
|
194 | 194 | <?php endif; ?> |
195 | - <?php if( in_array( 'customer.property.type.editor', $fields ) ) : ?> |
|
196 | - <td class="customer-type-editor"><a class="items-field" href="<?= $url; ?>"><?= $enc->html( $item->getEditor() ); ?></a></td> |
|
195 | + <?php if (in_array('customer.property.type.editor', $fields)) : ?> |
|
196 | + <td class="customer-type-editor"><a class="items-field" href="<?= $url; ?>"><?= $enc->html($item->getEditor()); ?></a></td> |
|
197 | 197 | <?php endif; ?> |
198 | 198 | |
199 | 199 | <td class="actions"> |
200 | 200 | <a class="btn act-copy fa" tabindex="1" |
201 | - href="<?= $enc->attr( $this->url( $copyTarget, $copyCntl, $copyAction, ['id' => $id] + $params, [], $copyConfig ) ); ?>" |
|
202 | - title="<?= $enc->attr( $this->translate( 'admin', 'Copy this entry') ); ?>" |
|
203 | - aria-label="<?= $enc->attr( $this->translate( 'admin', 'Copy' ) ); ?>"></a> |
|
204 | - <?php if( !$this->site()->readonly( $item->getSiteId() ) ) : ?> |
|
201 | + href="<?= $enc->attr($this->url($copyTarget, $copyCntl, $copyAction, ['id' => $id] + $params, [], $copyConfig)); ?>" |
|
202 | + title="<?= $enc->attr($this->translate('admin', 'Copy this entry')); ?>" |
|
203 | + aria-label="<?= $enc->attr($this->translate('admin', 'Copy')); ?>"></a> |
|
204 | + <?php if (!$this->site()->readonly($item->getSiteId())) : ?> |
|
205 | 205 | <a class="btn act-delete fa" tabindex="1" |
206 | - href="<?= $enc->attr( $this->url( $delTarget, $delCntl, $delAction, ['id' => $id] + $params, [], $delConfig ) ); ?>" |
|
207 | - title="<?= $enc->attr( $this->translate( 'admin', 'Delete this entry') ); ?>" |
|
208 | - aria-label="<?= $enc->attr( $this->translate( 'admin', 'Delete' ) ); ?>"></a> |
|
206 | + href="<?= $enc->attr($this->url($delTarget, $delCntl, $delAction, ['id' => $id] + $params, [], $delConfig)); ?>" |
|
207 | + title="<?= $enc->attr($this->translate('admin', 'Delete this entry')); ?>" |
|
208 | + aria-label="<?= $enc->attr($this->translate('admin', 'Delete')); ?>"></a> |
|
209 | 209 | <?php endif; ?> |
210 | 210 | </td> |
211 | 211 | </tr> |
@@ -213,18 +213,18 @@ discard block |
||
213 | 213 | </tbody> |
214 | 214 | </table> |
215 | 215 | |
216 | - <?php if( $this->get( 'items', [] ) === [] ) : ?> |
|
217 | - <div class="noitems"><?= $enc->html( sprintf( $this->translate( 'admin', 'No items found' ) ) ); ?></div> |
|
216 | + <?php if ($this->get('items', []) === []) : ?> |
|
217 | + <div class="noitems"><?= $enc->html(sprintf($this->translate('admin', 'No items found'))); ?></div> |
|
218 | 218 | <?php endif; ?> |
219 | 219 | </form> |
220 | 220 | |
221 | 221 | <?= $this->partial( |
222 | - $this->config( 'admin/jqadm/partial/pagination', 'common/partials/pagination-standard.php' ), |
|
223 | - ['pageParams' => $params, 'pos' => 'bottom', 'total' => $this->get( 'total' ), |
|
224 | - 'page' => $this->session( 'aimeos/admin/jqadm/type/customer/property/page', [] )] |
|
222 | + $this->config('admin/jqadm/partial/pagination', 'common/partials/pagination-standard.php'), |
|
223 | + ['pageParams' => $params, 'pos' => 'bottom', 'total' => $this->get('total'), |
|
224 | + 'page' => $this->session('aimeos/admin/jqadm/type/customer/property/page', [])] |
|
225 | 225 | ); |
226 | 226 | ?> |
227 | 227 | |
228 | 228 | <?php $this->block()->stop(); ?> |
229 | 229 | |
230 | -<?= $this->render( $this->config( 'admin/jqadm/template/page', 'common/page-standard.php' ) ); ?> |
|
230 | +<?= $this->render($this->config('admin/jqadm/template/page', 'common/page-standard.php')); ?> |