@@ -8,30 +8,30 @@ 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 | -$newTarget = $this->config( 'admin/jqadm/url/create/target' ); |
|
17 | -$newCntl = $this->config( 'admin/jqadm/url/create/controller', 'Jqadm' ); |
|
18 | -$newAction = $this->config( 'admin/jqadm/url/create/action', 'create' ); |
|
19 | -$newConfig = $this->config( 'admin/jqadm/url/create/config', [] ); |
|
16 | +$newTarget = $this->config('admin/jqadm/url/create/target'); |
|
17 | +$newCntl = $this->config('admin/jqadm/url/create/controller', 'Jqadm'); |
|
18 | +$newAction = $this->config('admin/jqadm/url/create/action', 'create'); |
|
19 | +$newConfig = $this->config('admin/jqadm/url/create/config', []); |
|
20 | 20 | |
21 | -$getTarget = $this->config( 'admin/jqadm/url/get/target' ); |
|
22 | -$getCntl = $this->config( 'admin/jqadm/url/get/controller', 'Jqadm' ); |
|
23 | -$getAction = $this->config( 'admin/jqadm/url/get/action', 'get' ); |
|
24 | -$getConfig = $this->config( 'admin/jqadm/url/get/config', [] ); |
|
21 | +$getTarget = $this->config('admin/jqadm/url/get/target'); |
|
22 | +$getCntl = $this->config('admin/jqadm/url/get/controller', 'Jqadm'); |
|
23 | +$getAction = $this->config('admin/jqadm/url/get/action', 'get'); |
|
24 | +$getConfig = $this->config('admin/jqadm/url/get/config', []); |
|
25 | 25 | |
26 | -$copyTarget = $this->config( 'admin/jqadm/url/copy/target' ); |
|
27 | -$copyCntl = $this->config( 'admin/jqadm/url/copy/controller', 'Jqadm' ); |
|
28 | -$copyAction = $this->config( 'admin/jqadm/url/copy/action', 'copy' ); |
|
29 | -$copyConfig = $this->config( 'admin/jqadm/url/copy/config', [] ); |
|
26 | +$copyTarget = $this->config('admin/jqadm/url/copy/target'); |
|
27 | +$copyCntl = $this->config('admin/jqadm/url/copy/controller', 'Jqadm'); |
|
28 | +$copyAction = $this->config('admin/jqadm/url/copy/action', 'copy'); |
|
29 | +$copyConfig = $this->config('admin/jqadm/url/copy/config', []); |
|
30 | 30 | |
31 | -$delTarget = $this->config( 'admin/jqadm/url/delete/target' ); |
|
32 | -$delCntl = $this->config( 'admin/jqadm/url/delete/controller', 'Jqadm' ); |
|
33 | -$delAction = $this->config( 'admin/jqadm/url/delete/action', 'delete' ); |
|
34 | -$delConfig = $this->config( 'admin/jqadm/url/delete/config', [] ); |
|
31 | +$delTarget = $this->config('admin/jqadm/url/delete/target'); |
|
32 | +$delCntl = $this->config('admin/jqadm/url/delete/controller', 'Jqadm'); |
|
33 | +$delAction = $this->config('admin/jqadm/url/delete/action', 'delete'); |
|
34 | +$delConfig = $this->config('admin/jqadm/url/delete/config', []); |
|
35 | 35 | |
36 | 36 | |
37 | 37 | /** admin/jqadm/type/cms/lists/fields |
@@ -49,74 +49,74 @@ discard block |
||
49 | 49 | * @category Developer |
50 | 50 | */ |
51 | 51 | $default = ['cms.lists.type.domain', 'cms.lists.type.status', 'cms.lists.type.code', 'cms.lists.type.label']; |
52 | -$default = $this->config( 'admin/jqadm/type/cms/lists/fields', $default ); |
|
53 | -$fields = $this->session( 'aimeos/admin/jqadm/type/cms/lists/fields', $default ); |
|
52 | +$default = $this->config('admin/jqadm/type/cms/lists/fields', $default); |
|
53 | +$fields = $this->session('aimeos/admin/jqadm/type/cms/lists/fields', $default); |
|
54 | 54 | |
55 | -$searchParams = $params = $this->get( 'pageParams', [] ); |
|
55 | +$searchParams = $params = $this->get('pageParams', []); |
|
56 | 56 | $searchParams['page']['start'] = 0; |
57 | 57 | |
58 | -$searchAttributes = map( $this->get( 'filterAttributes', [] ) )->filter( function( $item ) { |
|
58 | +$searchAttributes = map($this->get('filterAttributes', []))->filter(function($item) { |
|
59 | 59 | return $item->isPublic(); |
60 | -} )->call( 'toArray' )->each( function( &$val ) { |
|
61 | - $val = $this->translate( 'admin/ext', $val['label'] ?? '' ); |
|
60 | +} )->call('toArray')->each(function(&$val) { |
|
61 | + $val = $this->translate('admin/ext', $val['label'] ?? ''); |
|
62 | 62 | } )->all(); |
63 | 63 | |
64 | -$operators = map( $this->get( 'filterOperators/compare', [] ) )->flip()->map( function( $val, $key ) { |
|
65 | - return $this->translate( 'admin/ext', $key ); |
|
64 | +$operators = map($this->get('filterOperators/compare', []))->flip()->map(function($val, $key) { |
|
65 | + return $this->translate('admin/ext', $key); |
|
66 | 66 | } )->all(); |
67 | 67 | |
68 | 68 | $columnList = [ |
69 | - 'cms.lists.type.id' => $this->translate( 'admin', 'ID' ), |
|
70 | - 'cms.lists.type.domain' => $this->translate( 'admin', 'Domain' ), |
|
71 | - 'cms.lists.type.status' => $this->translate( 'admin', 'Status' ), |
|
72 | - 'cms.lists.type.code' => $this->translate( 'admin', 'Code' ), |
|
73 | - 'cms.lists.type.label' => $this->translate( 'admin', 'Label' ), |
|
74 | - 'cms.lists.type.position' => $this->translate( 'admin', 'Position' ), |
|
75 | - 'cms.lists.type.ctime' => $this->translate( 'admin', 'Created' ), |
|
76 | - 'cms.lists.type.mtime' => $this->translate( 'admin', 'Modified' ), |
|
77 | - 'cms.lists.type.editor' => $this->translate( 'admin', 'Editor' ), |
|
69 | + 'cms.lists.type.id' => $this->translate('admin', 'ID'), |
|
70 | + 'cms.lists.type.domain' => $this->translate('admin', 'Domain'), |
|
71 | + 'cms.lists.type.status' => $this->translate('admin', 'Status'), |
|
72 | + 'cms.lists.type.code' => $this->translate('admin', 'Code'), |
|
73 | + 'cms.lists.type.label' => $this->translate('admin', 'Label'), |
|
74 | + 'cms.lists.type.position' => $this->translate('admin', 'Position'), |
|
75 | + 'cms.lists.type.ctime' => $this->translate('admin', 'Created'), |
|
76 | + 'cms.lists.type.mtime' => $this->translate('admin', 'Modified'), |
|
77 | + 'cms.lists.type.editor' => $this->translate('admin', 'Editor'), |
|
78 | 78 | ]; |
79 | 79 | |
80 | 80 | ?> |
81 | -<?php $this->block()->start( 'jqadm_content' ); ?> |
|
81 | +<?php $this->block()->start('jqadm_content'); ?> |
|
82 | 82 | |
83 | -<?= $this->partial( $this->config( 'admin/jqadm/partial/navsearch', 'common/partials/navsearch-standard' ) ) ?> |
|
83 | +<?= $this->partial($this->config('admin/jqadm/partial/navsearch', 'common/partials/navsearch-standard')) ?> |
|
84 | 84 | |
85 | 85 | <div class="list-view" |
86 | 86 | data-domain="cms/lists/type" |
87 | - data-items="<?= $enc->attr( $this->get( 'items', map() )->call( 'toArray' )->all() ) ?>"> |
|
87 | + data-items="<?= $enc->attr($this->get('items', map())->call('toArray')->all()) ?>"> |
|
88 | 88 | |
89 | 89 | <nav class="main-navbar"> |
90 | 90 | |
91 | 91 | <span class="navbar-brand"> |
92 | - <?= $enc->html( $this->translate( 'admin', 'CMS Lists Types' ) ); ?> |
|
93 | - <span class="navbar-secondary">(<?= $enc->html( $this->site()->label() ); ?>)</span> |
|
92 | + <?= $enc->html($this->translate('admin', 'CMS Lists Types')); ?> |
|
93 | + <span class="navbar-secondary">(<?= $enc->html($this->site()->label()); ?>)</span> |
|
94 | 94 | </span> |
95 | 95 | |
96 | 96 | <div class="btn fa act-search" v-on:click="search = true" |
97 | - title="<?= $enc->attr( $this->translate( 'admin', 'Show search form' ) ) ?>" |
|
98 | - aria-label="<?= $enc->attr( $this->translate( 'admin', 'Show search form' ) ); ?>"> |
|
97 | + title="<?= $enc->attr($this->translate('admin', 'Show search form')) ?>" |
|
98 | + aria-label="<?= $enc->attr($this->translate('admin', 'Show search form')); ?>"> |
|
99 | 99 | </div> |
100 | 100 | </nav> |
101 | 101 | |
102 | 102 | <nav-search v-bind:show="search" v-on:close="search = false" |
103 | - v-bind:url="'<?= $enc->attr( $this->link( 'admin/jqadm/url/search', map( $searchParams )->except( 'filter' )->all() ) ) ?>'" |
|
104 | - v-bind:filter="<?= $enc->attr( $this->session( 'aimeos/admin/jqadm/type/cms/lists/filter', [] ) ) ?>" |
|
105 | - v-bind:operators="<?= $enc->attr( $operators ) ?>" |
|
106 | - v-bind:name="'<?= $enc->formparam( ['filter', '_key_', '0'] ) ?>'" |
|
107 | - v-bind:attributes="<?= $enc->attr( $searchAttributes ) ?>"> |
|
103 | + v-bind:url="'<?= $enc->attr($this->link('admin/jqadm/url/search', map($searchParams)->except('filter')->all())) ?>'" |
|
104 | + v-bind:filter="<?= $enc->attr($this->session('aimeos/admin/jqadm/type/cms/lists/filter', [])) ?>" |
|
105 | + v-bind:operators="<?= $enc->attr($operators) ?>" |
|
106 | + v-bind:name="'<?= $enc->formparam(['filter', '_key_', '0']) ?>'" |
|
107 | + v-bind:attributes="<?= $enc->attr($searchAttributes) ?>"> |
|
108 | 108 | </nav-search> |
109 | 109 | |
110 | 110 | <?= $this->partial( |
111 | - $this->config( 'admin/jqadm/partial/pagination', 'common/partials/pagination-standard' ), |
|
112 | - ['pageParams' => $params, 'pos' => 'top', 'total' => $this->get( 'total' ), |
|
113 | - 'page' => $this->session( 'aimeos/admin/jqadm/type/cms/lists/page', [] )] |
|
111 | + $this->config('admin/jqadm/partial/pagination', 'common/partials/pagination-standard'), |
|
112 | + ['pageParams' => $params, 'pos' => 'top', 'total' => $this->get('total'), |
|
113 | + 'page' => $this->session('aimeos/admin/jqadm/type/cms/lists/page', [])] |
|
114 | 114 | ); |
115 | 115 | ?> |
116 | 116 | |
117 | 117 | <form ref="form" class="list list-cms-lists-type" method="POST" |
118 | - action="<?= $enc->attr( $this->url( $target, $controller, $action, $searchParams, [], $config ) ); ?>" |
|
119 | - data-deleteurl="<?= $enc->attr( $this->url( $delTarget, $delCntl, $delAction, $params, [], $delConfig ) ); ?>"> |
|
118 | + action="<?= $enc->attr($this->url($target, $controller, $action, $searchParams, [], $config)); ?>" |
|
119 | + data-deleteurl="<?= $enc->attr($this->url($delTarget, $delCntl, $delAction, $params, [], $delConfig)); ?>"> |
|
120 | 120 | |
121 | 121 | <?= $this->csrf()->formfield(); ?> |
122 | 122 | |
@@ -126,26 +126,26 @@ discard block |
||
126 | 126 | <th class="select"> |
127 | 127 | <a href="#" class="btn act-delete fa" tabindex="1" |
128 | 128 | v-on:click.prevent.stop="askDelete()" |
129 | - title="<?= $enc->attr( $this->translate( 'admin', 'Delete selected entries' ) ); ?>" |
|
130 | - aria-label="<?= $enc->attr( $this->translate( 'admin', 'Delete' ) ); ?>"> |
|
129 | + title="<?= $enc->attr($this->translate('admin', 'Delete selected entries')); ?>" |
|
130 | + aria-label="<?= $enc->attr($this->translate('admin', 'Delete')); ?>"> |
|
131 | 131 | </a> |
132 | 132 | </th> |
133 | 133 | |
134 | 134 | <?= $this->partial( |
135 | - $this->config( 'admin/jqadm/partial/listhead', 'common/partials/listhead-standard' ), |
|
136 | - ['fields' => $fields, 'params' => $params, 'data' => $columnList, 'sort' => $this->session( 'aimeos/admin/jqadm/type/cms/lists/sort' )] |
|
135 | + $this->config('admin/jqadm/partial/listhead', 'common/partials/listhead-standard'), |
|
136 | + ['fields' => $fields, 'params' => $params, 'data' => $columnList, 'sort' => $this->session('aimeos/admin/jqadm/type/cms/lists/sort')] |
|
137 | 137 | ); |
138 | 138 | ?> |
139 | 139 | |
140 | 140 | <th class="actions"> |
141 | 141 | <a class="btn fa act-add" tabindex="1" |
142 | - href="<?= $enc->attr( $this->url( $newTarget, $newCntl, $newAction, $params, [], $newConfig ) ); ?>" |
|
143 | - title="<?= $enc->attr( $this->translate( 'admin', 'Insert new entry (Ctrl+I)' ) ); ?>" |
|
144 | - aria-label="<?= $enc->attr( $this->translate( 'admin', 'Add' ) ); ?>"> |
|
142 | + href="<?= $enc->attr($this->url($newTarget, $newCntl, $newAction, $params, [], $newConfig)); ?>" |
|
143 | + title="<?= $enc->attr($this->translate('admin', 'Insert new entry (Ctrl+I)')); ?>" |
|
144 | + aria-label="<?= $enc->attr($this->translate('admin', 'Add')); ?>"> |
|
145 | 145 | </a> |
146 | 146 | |
147 | 147 | <?= $this->partial( |
148 | - $this->config( 'admin/jqadm/partial/columns', 'common/partials/columns-standard' ), |
|
148 | + $this->config('admin/jqadm/partial/columns', 'common/partials/columns-standard'), |
|
149 | 149 | ['fields' => $fields, 'data' => $columnList] |
150 | 150 | ); |
151 | 151 | ?> |
@@ -155,19 +155,19 @@ discard block |
||
155 | 155 | <tbody> |
156 | 156 | |
157 | 157 | <?= $this->partial( |
158 | - $this->config( 'admin/jqadm/partial/listsearch', 'common/partials/listsearch-standard' ), [ |
|
159 | - 'fields' => array_merge( $fields, ['select'] ), 'filter' => $this->session( 'aimeos/admin/jqadm/type/cms/lists/filter', [] ), |
|
158 | + $this->config('admin/jqadm/partial/listsearch', 'common/partials/listsearch-standard'), [ |
|
159 | + 'fields' => array_merge($fields, ['select']), 'filter' => $this->session('aimeos/admin/jqadm/type/cms/lists/filter', []), |
|
160 | 160 | 'data' => [ |
161 | 161 | 'cms.lists.type.id' => ['op' => '=='], |
162 | 162 | 'cms.lists.type.domain' => ['op' => '==', 'type' => 'select', 'val' => [ |
163 | - 'media' => $this->translate( 'admin', 'media' ), |
|
164 | - 'text' => $this->translate( 'admin', 'text' ), |
|
163 | + 'media' => $this->translate('admin', 'media'), |
|
164 | + 'text' => $this->translate('admin', 'text'), |
|
165 | 165 | ]], |
166 | 166 | 'cms.lists.type.status' => ['op' => '==', 'type' => 'select', 'val' => [ |
167 | - '1' => $this->translate( 'mshop/code', 'status:1' ), |
|
168 | - '0' => $this->translate( 'mshop/code', 'status:0' ), |
|
169 | - '-1' => $this->translate( 'mshop/code', 'status:-1' ), |
|
170 | - '-2' => $this->translate( 'mshop/code', 'status:-2' ), |
|
167 | + '1' => $this->translate('mshop/code', 'status:1'), |
|
168 | + '0' => $this->translate('mshop/code', 'status:0'), |
|
169 | + '-1' => $this->translate('mshop/code', 'status:-1'), |
|
170 | + '-2' => $this->translate('mshop/code', 'status:-2'), |
|
171 | 171 | ]], |
172 | 172 | 'cms.lists.type.code' => [], |
173 | 173 | 'cms.lists.type.label' => [], |
@@ -179,49 +179,49 @@ discard block |
||
179 | 179 | ] ); |
180 | 180 | ?> |
181 | 181 | |
182 | - <?php foreach( $this->get( 'items', [] ) as $id => $item ) : ?> |
|
183 | - <?php $url = $enc->attr( $this->url( $getTarget, $getCntl, $getAction, ['id' => $id] + $params, [], $getConfig ) ); ?> |
|
184 | - <tr class="list-item <?= $this->site()->readonly( $item->getSiteId() ); ?>" data-label="<?= $enc->attr( $item->getLabel() ) ?>"> |
|
185 | - <td class="select"><input v-on:click="toggle('<?= $id ?>')" v-bind:checked="items['<?= $id ?>'].checked" class="form-check-input" type="checkbox" tabindex="1" name="<?= $enc->attr( $this->formparam( ['id', ''] ) ) ?>" value="<?= $enc->attr( $item->getId() ) ?>" /></td> |
|
186 | - <?php if( in_array( 'cms.lists.type.id', $fields ) ) : ?> |
|
187 | - <td class="cms-type-id"><a class="items-field" href="<?= $url; ?>"><?= $enc->html( $item->getId() ); ?></a></td> |
|
182 | + <?php foreach ($this->get('items', []) as $id => $item) : ?> |
|
183 | + <?php $url = $enc->attr($this->url($getTarget, $getCntl, $getAction, ['id' => $id] + $params, [], $getConfig)); ?> |
|
184 | + <tr class="list-item <?= $this->site()->readonly($item->getSiteId()); ?>" data-label="<?= $enc->attr($item->getLabel()) ?>"> |
|
185 | + <td class="select"><input v-on:click="toggle('<?= $id ?>')" v-bind:checked="items['<?= $id ?>'].checked" class="form-check-input" type="checkbox" tabindex="1" name="<?= $enc->attr($this->formparam(['id', ''])) ?>" value="<?= $enc->attr($item->getId()) ?>" /></td> |
|
186 | + <?php if (in_array('cms.lists.type.id', $fields)) : ?> |
|
187 | + <td class="cms-type-id"><a class="items-field" href="<?= $url; ?>"><?= $enc->html($item->getId()); ?></a></td> |
|
188 | 188 | <?php endif; ?> |
189 | - <?php if( in_array( 'cms.lists.type.domain', $fields ) ) : ?> |
|
190 | - <td class="cms-type-domain"><a class="items-field" href="<?= $url; ?>"><?= $enc->html( $item->getDomain() ); ?></a></td> |
|
189 | + <?php if (in_array('cms.lists.type.domain', $fields)) : ?> |
|
190 | + <td class="cms-type-domain"><a class="items-field" href="<?= $url; ?>"><?= $enc->html($item->getDomain()); ?></a></td> |
|
191 | 191 | <?php endif; ?> |
192 | - <?php if( in_array( 'cms.lists.type.status', $fields ) ) : ?> |
|
193 | - <td class="cms-type-status"><a class="items-field" href="<?= $url; ?>"><div class="fa status-<?= $enc->attr( $item->getStatus() ); ?>"></div></a></td> |
|
192 | + <?php if (in_array('cms.lists.type.status', $fields)) : ?> |
|
193 | + <td class="cms-type-status"><a class="items-field" href="<?= $url; ?>"><div class="fa status-<?= $enc->attr($item->getStatus()); ?>"></div></a></td> |
|
194 | 194 | <?php endif; ?> |
195 | - <?php if( in_array( 'cms.lists.type.code', $fields ) ) : ?> |
|
196 | - <td class="cms-type-code"><a class="items-field" href="<?= $url; ?>" tabindex="1"><?= $enc->html( $item->getCode() ); ?></a></td> |
|
195 | + <?php if (in_array('cms.lists.type.code', $fields)) : ?> |
|
196 | + <td class="cms-type-code"><a class="items-field" href="<?= $url; ?>" tabindex="1"><?= $enc->html($item->getCode()); ?></a></td> |
|
197 | 197 | <?php endif; ?> |
198 | - <?php if( in_array( 'cms.lists.type.label', $fields ) ) : ?> |
|
199 | - <td class="cms-type-label"><a class="items-field" href="<?= $url; ?>"><?= $enc->html( $item->getLabel() ); ?></a></td> |
|
198 | + <?php if (in_array('cms.lists.type.label', $fields)) : ?> |
|
199 | + <td class="cms-type-label"><a class="items-field" href="<?= $url; ?>"><?= $enc->html($item->getLabel()); ?></a></td> |
|
200 | 200 | <?php endif; ?> |
201 | - <?php if( in_array( 'cms.lists.type.position', $fields ) ) : ?> |
|
202 | - <td class="cms-type-position"><a class="items-field" href="<?= $url; ?>"><?= $enc->html( $item->getPosition() ); ?></a></td> |
|
201 | + <?php if (in_array('cms.lists.type.position', $fields)) : ?> |
|
202 | + <td class="cms-type-position"><a class="items-field" href="<?= $url; ?>"><?= $enc->html($item->getPosition()); ?></a></td> |
|
203 | 203 | <?php endif; ?> |
204 | - <?php if( in_array( 'cms.lists.type.ctime', $fields ) ) : ?> |
|
205 | - <td class="cms-type-ctime"><a class="items-field" href="<?= $url; ?>"><?= $enc->html( $item->getTimeCreated() ); ?></a></td> |
|
204 | + <?php if (in_array('cms.lists.type.ctime', $fields)) : ?> |
|
205 | + <td class="cms-type-ctime"><a class="items-field" href="<?= $url; ?>"><?= $enc->html($item->getTimeCreated()); ?></a></td> |
|
206 | 206 | <?php endif; ?> |
207 | - <?php if( in_array( 'cms.lists.type.mtime', $fields ) ) : ?> |
|
208 | - <td class="cms-type-mtime"><a class="items-field" href="<?= $url; ?>"><?= $enc->html( $item->getTimeModified() ); ?></a></td> |
|
207 | + <?php if (in_array('cms.lists.type.mtime', $fields)) : ?> |
|
208 | + <td class="cms-type-mtime"><a class="items-field" href="<?= $url; ?>"><?= $enc->html($item->getTimeModified()); ?></a></td> |
|
209 | 209 | <?php endif; ?> |
210 | - <?php if( in_array( 'cms.lists.type.editor', $fields ) ) : ?> |
|
211 | - <td class="cms-type-editor"><a class="items-field" href="<?= $url; ?>"><?= $enc->html( $item->getEditor() ); ?></a></td> |
|
210 | + <?php if (in_array('cms.lists.type.editor', $fields)) : ?> |
|
211 | + <td class="cms-type-editor"><a class="items-field" href="<?= $url; ?>"><?= $enc->html($item->getEditor()); ?></a></td> |
|
212 | 212 | <?php endif; ?> |
213 | 213 | |
214 | 214 | <td class="actions"> |
215 | 215 | <a class="btn act-copy fa" tabindex="1" |
216 | - href="<?= $enc->attr( $this->url( $copyTarget, $copyCntl, $copyAction, ['id' => $id] + $params, [], $copyConfig ) ); ?>" |
|
217 | - title="<?= $enc->attr( $this->translate( 'admin', 'Copy this entry' ) ); ?>" |
|
218 | - aria-label="<?= $enc->attr( $this->translate( 'admin', 'Copy' ) ); ?>"> |
|
216 | + href="<?= $enc->attr($this->url($copyTarget, $copyCntl, $copyAction, ['id' => $id] + $params, [], $copyConfig)); ?>" |
|
217 | + title="<?= $enc->attr($this->translate('admin', 'Copy this entry')); ?>" |
|
218 | + aria-label="<?= $enc->attr($this->translate('admin', 'Copy')); ?>"> |
|
219 | 219 | </a> |
220 | - <?php if( !$this->site()->readonly( $item->getSiteId() ) ) : ?> |
|
220 | + <?php if (!$this->site()->readonly($item->getSiteId())) : ?> |
|
221 | 221 | <a class="btn act-delete fa" tabindex="1" href="#" |
222 | - v-on:click.prevent.stop="askDelete('<?= $enc->attr( $id ) ?>')" |
|
223 | - title="<?= $enc->attr( $this->translate( 'admin', 'Delete this entry' ) ); ?>" |
|
224 | - aria-label="<?= $enc->attr( $this->translate( 'admin', 'Delete' ) ); ?>"> |
|
222 | + v-on:click.prevent.stop="askDelete('<?= $enc->attr($id) ?>')" |
|
223 | + title="<?= $enc->attr($this->translate('admin', 'Delete this entry')); ?>" |
|
224 | + aria-label="<?= $enc->attr($this->translate('admin', 'Delete')); ?>"> |
|
225 | 225 | </a> |
226 | 226 | <?php endif; ?> |
227 | 227 | </td> |
@@ -230,15 +230,15 @@ discard block |
||
230 | 230 | </tbody> |
231 | 231 | </table> |
232 | 232 | |
233 | - <?php if( $this->get( 'items', map() )->isEmpty() ) : ?> |
|
234 | - <div class="noitems"><?= $enc->html( sprintf( $this->translate( 'admin', 'No items found' ) ) ); ?></div> |
|
233 | + <?php if ($this->get('items', map())->isEmpty()) : ?> |
|
234 | + <div class="noitems"><?= $enc->html(sprintf($this->translate('admin', 'No items found'))); ?></div> |
|
235 | 235 | <?php endif; ?> |
236 | 236 | </form> |
237 | 237 | |
238 | 238 | <?= $this->partial( |
239 | - $this->config( 'admin/jqadm/partial/pagination', 'common/partials/pagination-standard' ), |
|
240 | - ['pageParams' => $params, 'pos' => 'bottom', 'total' => $this->get( 'total' ), |
|
241 | - 'page' => $this->session( 'aimeos/admin/jqadm/type/cms/lists/page', [] )] |
|
239 | + $this->config('admin/jqadm/partial/pagination', 'common/partials/pagination-standard'), |
|
240 | + ['pageParams' => $params, 'pos' => 'bottom', 'total' => $this->get('total'), |
|
241 | + 'page' => $this->session('aimeos/admin/jqadm/type/cms/lists/page', [])] |
|
242 | 242 | ); |
243 | 243 | ?> |
244 | 244 | |
@@ -248,4 +248,4 @@ discard block |
||
248 | 248 | </div> |
249 | 249 | <?php $this->block()->stop(); ?> |
250 | 250 | |
251 | -<?= $this->render( $this->config( 'admin/jqadm/template/page', 'common/page-standard' ) ); ?> |
|
251 | +<?= $this->render($this->config('admin/jqadm/template/page', 'common/page-standard')); ?> |
@@ -25,8 +25,8 @@ discard block |
||
25 | 25 | <div id="seo" class="item-seo tab-pane fade" role="tablist" aria-labelledby="seo"> |
26 | 26 | |
27 | 27 | <div id="item-text-group" |
28 | - data-translate="<?= $enc->attr( $this->config( 'admin/jqadm/api/translate', [] ) ) ?>" |
|
29 | - data-items="<?= $enc->attr( $this->get( 'seoData', [] ) ); ?>" |
|
28 | + data-translate="<?= $enc->attr($this->config('admin/jqadm/api/translate', [])) ?>" |
|
29 | + data-items="<?= $enc->attr($this->get('seoData', [])); ?>" |
|
30 | 30 | data-siteid="<?= $this->site()->siteid() ?>" |
31 | 31 | data-domain="cms" > |
32 | 32 | |
@@ -38,8 +38,8 @@ discard block |
||
38 | 38 | v-bind:data-target="'#item-text-group-data-' + idx" data-bs-toggle="collapse" role="tab" class="card-header header" |
39 | 39 | v-bind:aria-controls="'item-text-group-data-' + idx" aria-expanded="false" v-on:click="toggle('_show', idx)"> |
40 | 40 | <div class="card-tools-left"> |
41 | - <div class="btn btn-card-header act-show fa" tabindex="<?= $this->get( 'tabindex' ); ?>" |
|
42 | - title="<?= $enc->attr( $this->translate( 'admin', 'Show/hide this entry' ) ); ?>"> |
|
41 | + <div class="btn btn-card-header act-show fa" tabindex="<?= $this->get('tabindex'); ?>" |
|
42 | + title="<?= $enc->attr($this->translate('admin', 'Show/hide this entry')); ?>"> |
|
43 | 43 | </div> |
44 | 44 | </div> |
45 | 45 | <span class="item-label header-label" v-bind:class="{disabled: !active(idx)}">{{ label(idx) }}</span> |
@@ -47,22 +47,22 @@ discard block |
||
47 | 47 | <div class="card-tools-right"> |
48 | 48 | <div class="dropdown"> |
49 | 49 | <a v-bind:id="'translate-menu-' + idx" class="btn btn-card-header act-translate fa dropdown-toggle" href="#" |
50 | - tabindex="<?= $this->get( 'tabindex' ); ?>" role="button" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false" |
|
51 | - title="<?= $enc->attr( $this->translate( 'admin', 'Translate text' ) ); ?>"> |
|
50 | + tabindex="<?= $this->get('tabindex'); ?>" role="button" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false" |
|
51 | + title="<?= $enc->attr($this->translate('admin', 'Translate text')); ?>"> |
|
52 | 52 | </a> |
53 | 53 | <div class="dropdown-menu dropdown-menu-end" v-bind:aria-labelledby="'translate-menu-' + idx"> |
54 | - <?php foreach( ['de', 'en', 'es', 'fr', 'it', 'nl', 'pl', 'pt', 'ru'] as $lang ) : ?> |
|
55 | - <a class="dropdown-item" href="#" v-on:click="translate(idx, '<?= strtoupper( $lang ) ?>')"><?= $enc->html( $this->translate( 'language', $lang ) ); ?></a> |
|
54 | + <?php foreach (['de', 'en', 'es', 'fr', 'it', 'nl', 'pl', 'pt', 'ru'] as $lang) : ?> |
|
55 | + <a class="dropdown-item" href="#" v-on:click="translate(idx, '<?= strtoupper($lang) ?>')"><?= $enc->html($this->translate('language', $lang)); ?></a> |
|
56 | 56 | <?php endforeach ?> |
57 | 57 | </div> |
58 | 58 | </div> |
59 | 59 | <div v-if="item['cms.lists.siteid'] == siteid && !item['_nosort']" |
60 | - class="btn btn-card-header act-move fa" tabindex="<?= $this->get( 'tabindex' ); ?>" |
|
61 | - title="<?= $enc->attr( $this->translate( 'admin', 'Move this entry up/down' ) ); ?>"> |
|
60 | + class="btn btn-card-header act-move fa" tabindex="<?= $this->get('tabindex'); ?>" |
|
61 | + title="<?= $enc->attr($this->translate('admin', 'Move this entry up/down')); ?>"> |
|
62 | 62 | </div> |
63 | 63 | <div v-if="item['cms.lists.siteid'] == siteid" |
64 | - class="btn btn-card-header act-delete fa" tabindex="<?= $this->get( 'tabindex' ); ?>" |
|
65 | - title="<?= $enc->attr( $this->translate( 'admin', 'Delete this entry' ) ); ?>" |
|
64 | + class="btn btn-card-header act-delete fa" tabindex="<?= $this->get('tabindex'); ?>" |
|
65 | + title="<?= $enc->attr($this->translate('admin', 'Delete this entry')); ?>" |
|
66 | 66 | v-on:click.stop="remove(idx)"> |
67 | 67 | </div> |
68 | 68 | </div> |
@@ -72,7 +72,7 @@ discard block |
||
72 | 72 | v-bind:aria-labelledby="'item-text-group-item-' + idx" role="tabpanel" class="card-block collapse row"> |
73 | 73 | |
74 | 74 | <input type="hidden" v-model="item['text.id']" |
75 | - v-bind:name="'<?= $enc->attr( $this->formparam( array( 'seo', '_idx_', 'text.id' ) ) ); ?>'.replace('_idx_', idx)" /> |
|
75 | + v-bind:name="'<?= $enc->attr($this->formparam(array('seo', '_idx_', 'text.id'))); ?>'.replace('_idx_', idx)" /> |
|
76 | 76 | |
77 | 77 | <div class="col-xl-6"> |
78 | 78 | |
@@ -82,9 +82,9 @@ discard block |
||
82 | 82 | v-bind:key="idx" |
83 | 83 | v-bind:id="'cke-' + idx" |
84 | 84 | v-bind:value="item['text.content']" |
85 | - v-bind:name="'<?= $enc->attr( $this->formparam( array( 'seo', '_idx_', 'text.content' ) ) ); ?>'.replace('_idx_', idx)" |
|
85 | + v-bind:name="'<?= $enc->attr($this->formparam(array('seo', '_idx_', 'text.content'))); ?>'.replace('_idx_', idx)" |
|
86 | 86 | v-bind:readonly="item['text.siteid'] != siteid" |
87 | - v-bind:tabindex="<?= $this->get( 'tabindex' ); ?>" |
|
87 | + v-bind:tabindex="<?= $this->get('tabindex'); ?>" |
|
88 | 88 | v-model="item['text.content']" |
89 | 89 | ></textarea> |
90 | 90 | </div> |
@@ -95,85 +95,85 @@ discard block |
||
95 | 95 | <div class="col-xl-6"> |
96 | 96 | |
97 | 97 | <div class="form-group row mandatory"> |
98 | - <label class="col-sm-4 form-control-label"><?= $enc->html( $this->translate( 'admin', 'Status' ) ); ?></label> |
|
98 | + <label class="col-sm-4 form-control-label"><?= $enc->html($this->translate('admin', 'Status')); ?></label> |
|
99 | 99 | <div class="col-sm-8"> |
100 | - <select class="form-control form-select item-status" required="required" tabindex="<?= $this->get( 'tabindex' ); ?>" |
|
101 | - v-bind:name="'<?= $enc->attr( $this->formparam( array( 'seo', '_idx_', 'text.status' ) ) ); ?>'.replace('_idx_', idx)" |
|
100 | + <select class="form-control form-select item-status" required="required" tabindex="<?= $this->get('tabindex'); ?>" |
|
101 | + v-bind:name="'<?= $enc->attr($this->formparam(array('seo', '_idx_', 'text.status'))); ?>'.replace('_idx_', idx)" |
|
102 | 102 | v-bind:readonly="item['text.siteid'] != siteid" |
103 | 103 | v-model="item['text.status']" > |
104 | - <option value=""><?= $enc->html( $this->translate( 'admin', 'Please select' ) ); ?></option> |
|
104 | + <option value=""><?= $enc->html($this->translate('admin', 'Please select')); ?></option> |
|
105 | 105 | <option value="1" v-bind:selected="item['text.status'] == 1" > |
106 | - <?= $enc->html( $this->translate( 'mshop/code', 'status:1' ) ); ?> |
|
106 | + <?= $enc->html($this->translate('mshop/code', 'status:1')); ?> |
|
107 | 107 | </option> |
108 | 108 | <option value="0" v-bind:selected="item['text.status'] == 0" > |
109 | - <?= $enc->html( $this->translate( 'mshop/code', 'status:0' ) ); ?> |
|
109 | + <?= $enc->html($this->translate('mshop/code', 'status:0')); ?> |
|
110 | 110 | </option> |
111 | 111 | <option value="-1" v-bind:selected="item['text.status'] == -1" > |
112 | - <?= $enc->html( $this->translate( 'mshop/code', 'status:-1' ) ); ?> |
|
112 | + <?= $enc->html($this->translate('mshop/code', 'status:-1')); ?> |
|
113 | 113 | </option> |
114 | 114 | <option value="-2" v-bind:selected="item['text.status'] == -2" > |
115 | - <?= $enc->html( $this->translate( 'mshop/code', 'status:-2' ) ); ?> |
|
115 | + <?= $enc->html($this->translate('mshop/code', 'status:-2')); ?> |
|
116 | 116 | </option> |
117 | 117 | </select> |
118 | 118 | </div> |
119 | 119 | </div> |
120 | 120 | |
121 | - <?php if( !( $languages = $this->get( 'pageLangItems', map() ) )->count() !== 1 ) : ?> |
|
121 | + <?php if (!($languages = $this->get('pageLangItems', map()))->count() !== 1) : ?> |
|
122 | 122 | <div class="form-group row mandatory"> |
123 | - <label class="col-sm-4 form-control-label help"><?= $enc->html( $this->translate( 'admin', 'Language' ) ); ?></label> |
|
123 | + <label class="col-sm-4 form-control-label help"><?= $enc->html($this->translate('admin', 'Language')); ?></label> |
|
124 | 124 | <div class="col-sm-8"> |
125 | - <select is="select-component" required class="form-control form-select item-languageid" tabindex="<?= $enc->attr( $this->get( 'tabindex' ) ); ?>" |
|
126 | - v-bind:items="JSON.parse('<?= $enc->attr( $languages->col( 'locale.language.label', 'locale.language.id' )->toArray() ) ?>')" |
|
127 | - v-bind:name="'<?= $enc->attr( $this->formparam( ['seo', '_idx_', 'text.languageid'] ) ); ?>'.replace('_idx_', idx)" |
|
128 | - v-bind:text="'<?= $enc->html( $this->translate( 'admin', 'Please select' ) ); ?>'" |
|
129 | - v-bind:all="'<?= $enc->html( $this->translate( 'admin', 'All' ) ); ?>'" |
|
125 | + <select is="select-component" required class="form-control form-select item-languageid" tabindex="<?= $enc->attr($this->get('tabindex')); ?>" |
|
126 | + v-bind:items="JSON.parse('<?= $enc->attr($languages->col('locale.language.label', 'locale.language.id')->toArray()) ?>')" |
|
127 | + v-bind:name="'<?= $enc->attr($this->formparam(['seo', '_idx_', 'text.languageid'])); ?>'.replace('_idx_', idx)" |
|
128 | + v-bind:text="'<?= $enc->html($this->translate('admin', 'Please select')); ?>'" |
|
129 | + v-bind:all="'<?= $enc->html($this->translate('admin', 'All')); ?>'" |
|
130 | 130 | v-bind:readonly="item['text.siteid'] != siteid" |
131 | 131 | v-model="item['text.languageid']" > |
132 | 132 | </select> |
133 | 133 | </div> |
134 | 134 | <div class="col-sm-12 form-text text-muted help-text"> |
135 | - <?= $enc->html( $this->translate( 'admin', 'Language of the entered text' ) ); ?> |
|
135 | + <?= $enc->html($this->translate('admin', 'Language of the entered text')); ?> |
|
136 | 136 | </div> |
137 | 137 | </div> |
138 | 138 | <?php else : ?> |
139 | 139 | <input class="text-langid" type="hidden" |
140 | - v-bind:name="'<?= $enc->attr( $this->formparam( array( 'seo', '_idx_', 'text.languageid' ) ) ); ?>'.replace('_idx_', idx)" |
|
141 | - value="<?= $enc->attr( $languages->getCode()->first() ) ?>" /> |
|
140 | + v-bind:name="'<?= $enc->attr($this->formparam(array('seo', '_idx_', 'text.languageid'))); ?>'.replace('_idx_', idx)" |
|
141 | + value="<?= $enc->attr($languages->getCode()->first()) ?>" /> |
|
142 | 142 | <?php endif; ?> |
143 | 143 | |
144 | - <?php if( ( $textTypes = $this->get( 'textTypes', map() ) )->count() !== 1 ) : ?> |
|
144 | + <?php if (($textTypes = $this->get('textTypes', map()))->count() !== 1) : ?> |
|
145 | 145 | <div class="form-group row mandatory"> |
146 | - <label class="col-sm-4 form-control-label help"><?= $enc->html( $this->translate( 'admin', 'Type' ) ); ?></label> |
|
146 | + <label class="col-sm-4 form-control-label help"><?= $enc->html($this->translate('admin', 'Type')); ?></label> |
|
147 | 147 | <div class="col-sm-8"> |
148 | - <select is="select-component" required class="form-control form-select item-type" tabindex="<?= $enc->attr( $this->get( 'tabindex' ) ); ?>" |
|
149 | - v-bind:items="JSON.parse('<?= $enc->attr( $textTypes->col( 'text.type.label', 'text.type.code' )->toArray() ) ?>')" |
|
150 | - v-bind:name="'<?= $enc->attr( $this->formparam( ['seo', '_idx_', 'text.type'] ) ); ?>'.replace('_idx_', idx)" |
|
151 | - v-bind:text="'<?= $enc->html( $this->translate( 'admin', 'Please select' ) ); ?>'" |
|
148 | + <select is="select-component" required class="form-control form-select item-type" tabindex="<?= $enc->attr($this->get('tabindex')); ?>" |
|
149 | + v-bind:items="JSON.parse('<?= $enc->attr($textTypes->col('text.type.label', 'text.type.code')->toArray()) ?>')" |
|
150 | + v-bind:name="'<?= $enc->attr($this->formparam(['seo', '_idx_', 'text.type'])); ?>'.replace('_idx_', idx)" |
|
151 | + v-bind:text="'<?= $enc->html($this->translate('admin', 'Please select')); ?>'" |
|
152 | 152 | v-bind:readonly="item['text.siteid'] != siteid" |
153 | 153 | v-model="item['text.type']" > |
154 | 154 | </select> |
155 | 155 | </div> |
156 | 156 | <div class="col-sm-12 form-text text-muted help-text"> |
157 | - <?= $enc->html( $this->translate( 'admin', 'Types for additional texts like per one lb/kg or per month' ) ); ?> |
|
157 | + <?= $enc->html($this->translate('admin', 'Types for additional texts like per one lb/kg or per month')); ?> |
|
158 | 158 | </div> |
159 | 159 | </div> |
160 | 160 | <?php else : ?> |
161 | 161 | <input class="item-type" type="hidden" |
162 | - v-bind:name="'<?= $enc->attr( $this->formparam( array( 'seo', '_idx_', 'text.type' ) ) ); ?>'.replace('_idx_', idx)" |
|
163 | - value="<?= $enc->attr( $textTypes->getCode()->first() ) ?>" /> |
|
162 | + v-bind:name="'<?= $enc->attr($this->formparam(array('seo', '_idx_', 'text.type'))); ?>'.replace('_idx_', idx)" |
|
163 | + value="<?= $enc->attr($textTypes->getCode()->first()) ?>" /> |
|
164 | 164 | <?php endif; ?> |
165 | 165 | |
166 | 166 | <div class="form-group row optional"> |
167 | - <label class="col-sm-4 form-control-label help"><?= $enc->html( $this->translate( 'admin', 'Label' ) ); ?></label> |
|
167 | + <label class="col-sm-4 form-control-label help"><?= $enc->html($this->translate('admin', 'Label')); ?></label> |
|
168 | 168 | <div class="col-sm-8"> |
169 | - <input class="form-control item-label" type="text" tabindex="<?= $this->get( 'tabindex' ); ?>" |
|
170 | - v-bind:name="'<?= $enc->attr( $this->formparam( array( 'seo', '_idx_', 'text.label' ) ) ); ?>'.replace('_idx_', idx)" |
|
171 | - placeholder="<?= $enc->attr( $this->translate( 'admin', 'Label' ) ); ?>" |
|
169 | + <input class="form-control item-label" type="text" tabindex="<?= $this->get('tabindex'); ?>" |
|
170 | + v-bind:name="'<?= $enc->attr($this->formparam(array('seo', '_idx_', 'text.label'))); ?>'.replace('_idx_', idx)" |
|
171 | + placeholder="<?= $enc->attr($this->translate('admin', 'Label')); ?>" |
|
172 | 172 | v-bind:readonly="item['text.siteid'] != siteid" |
173 | 173 | v-model="item['text.label']" /> |
174 | 174 | </div> |
175 | 175 | <div class="col-sm-12 form-text text-muted help-text"> |
176 | - <?= $enc->html( $this->translate( 'admin', 'Description of the text content if it\'s in a foreign language' ) ); ?> |
|
176 | + <?= $enc->html($this->translate('admin', 'Description of the text content if it\'s in a foreign language')); ?> |
|
177 | 177 | </div> |
178 | 178 | </div> |
179 | 179 | |
@@ -182,85 +182,85 @@ discard block |
||
182 | 182 | |
183 | 183 | <div v-on:click="toggle('_ext', idx)" class="col-xl-12 advanced" v-bind:class="{'collapsed': !item['_ext']}"> |
184 | 184 | <div class="card-tools-left"> |
185 | - <div class="btn act-show fa" tabindex="<?= $this->get( 'tabindex' ); ?>" |
|
186 | - title="<?= $enc->attr( $this->translate( 'admin', 'Show/hide advanced data' ) ); ?>"> |
|
185 | + <div class="btn act-show fa" tabindex="<?= $this->get('tabindex'); ?>" |
|
186 | + title="<?= $enc->attr($this->translate('admin', 'Show/hide advanced data')); ?>"> |
|
187 | 187 | </div> |
188 | 188 | </div> |
189 | - <span class="header-label"><?= $enc->html( $this->translate( 'admin', 'Advanced' ) ); ?></span> |
|
189 | + <span class="header-label"><?= $enc->html($this->translate('admin', 'Advanced')); ?></span> |
|
190 | 190 | </div> |
191 | 191 | |
192 | 192 | <div v-show="item['_ext']" class="col-xl-6 secondary"> |
193 | 193 | |
194 | - <?php if( !( $listTypes = $this->get( 'textListTypes', map() ) )->count() !== 1 ) : ?> |
|
194 | + <?php if (!($listTypes = $this->get('textListTypes', map()))->count() !== 1) : ?> |
|
195 | 195 | <div class="form-group row mandatory"> |
196 | - <label class="col-sm-4 form-control-label help"><?= $enc->html( $this->translate( 'admin', 'List type' ) ); ?></label> |
|
196 | + <label class="col-sm-4 form-control-label help"><?= $enc->html($this->translate('admin', 'List type')); ?></label> |
|
197 | 197 | <div class="col-sm-8"> |
198 | - <select is="select-component" required class="form-control form-select listitem-type" tabindex="<?= $enc->attr( $this->get( 'tabindex' ) ); ?>" |
|
199 | - v-bind:items="JSON.parse('<?= $enc->attr( $listTypes->col( 'cms.lists.type.label', 'cms.lists.type.code' )->toArray() ) ?>')" |
|
200 | - v-bind:name="'<?= $enc->attr( $this->formparam( ['seo', '_idx_', 'cms.lists.type'] ) ); ?>'.replace('_idx_', idx)" |
|
201 | - v-bind:text="'<?= $enc->html( $this->translate( 'admin', 'Please select' ) ); ?>'" |
|
198 | + <select is="select-component" required class="form-control form-select listitem-type" tabindex="<?= $enc->attr($this->get('tabindex')); ?>" |
|
199 | + v-bind:items="JSON.parse('<?= $enc->attr($listTypes->col('cms.lists.type.label', 'cms.lists.type.code')->toArray()) ?>')" |
|
200 | + v-bind:name="'<?= $enc->attr($this->formparam(['seo', '_idx_', 'cms.lists.type'])); ?>'.replace('_idx_', idx)" |
|
201 | + v-bind:text="'<?= $enc->html($this->translate('admin', 'Please select')); ?>'" |
|
202 | 202 | v-bind:readonly="item['cms.lists.siteid'] != siteid" |
203 | 203 | v-model="item['cms.lists.type']" > |
204 | 204 | </select> |
205 | 205 | </div> |
206 | 206 | <div class="col-sm-12 form-text text-muted help-text"> |
207 | - <?= $enc->html( $this->translate( 'admin', 'Second level type for grouping items' ) ); ?> |
|
207 | + <?= $enc->html($this->translate('admin', 'Second level type for grouping items')); ?> |
|
208 | 208 | </div> |
209 | 209 | </div> |
210 | 210 | <?php else : ?> |
211 | 211 | <input class="listitem-type" type="hidden" |
212 | - v-bind:name="'<?= $enc->attr( $this->formparam( ['seo', '_idx_', 'cms.lists.type'] ) ); ?>'.replace('_idx_', idx)" |
|
213 | - value="<?= $enc->attr( $listTypes->getCode()->first() ) ?>" /> |
|
212 | + v-bind:name="'<?= $enc->attr($this->formparam(['seo', '_idx_', 'cms.lists.type'])); ?>'.replace('_idx_', idx)" |
|
213 | + value="<?= $enc->attr($listTypes->getCode()->first()) ?>" /> |
|
214 | 214 | <?php endif; ?> |
215 | 215 | |
216 | 216 | <div class="form-group row optional"> |
217 | - <label class="col-sm-4 form-control-label help"><?= $enc->html( $this->translate( 'admin', 'Start date' ) ); ?></label> |
|
217 | + <label class="col-sm-4 form-control-label help"><?= $enc->html($this->translate('admin', 'Start date')); ?></label> |
|
218 | 218 | <div class="col-sm-8"> |
219 | - <input is="flat-pickr" class="form-control listitem-datestart" type="datetime-local" tabindex="<?= $this->get( 'tabindex' ); ?>" |
|
220 | - v-bind:name="'<?= $enc->attr( $this->formparam( array( 'seo', '_idx_', 'cms.lists.datestart' ) ) ); ?>'.replace('_idx_', idx)" |
|
221 | - placeholder="<?= $enc->attr( $this->translate( 'admin', 'YYYY-MM-DD hh:mm:ss (optional)' ) ); ?>" |
|
219 | + <input is="flat-pickr" class="form-control listitem-datestart" type="datetime-local" tabindex="<?= $this->get('tabindex'); ?>" |
|
220 | + v-bind:name="'<?= $enc->attr($this->formparam(array('seo', '_idx_', 'cms.lists.datestart'))); ?>'.replace('_idx_', idx)" |
|
221 | + placeholder="<?= $enc->attr($this->translate('admin', 'YYYY-MM-DD hh:mm:ss (optional)')); ?>" |
|
222 | 222 | v-bind:disabled="item['cms.lists.siteid'] != siteid" |
223 | 223 | v-bind:config="Aimeos.flatpickr.datetime" |
224 | 224 | v-model="item['cms.lists.datestart']" /> |
225 | 225 | </div> |
226 | 226 | <div class="col-sm-12 form-text text-muted help-text"> |
227 | - <?= $enc->html( $this->translate( 'admin', 'The item is only shown on the web site after that date and time' ) ); ?> |
|
227 | + <?= $enc->html($this->translate('admin', 'The item is only shown on the web site after that date and time')); ?> |
|
228 | 228 | </div> |
229 | 229 | </div> |
230 | 230 | <div class="form-group row optional"> |
231 | - <label class="col-sm-4 form-control-label help"><?= $enc->html( $this->translate( 'admin', 'End date' ) ); ?></label> |
|
231 | + <label class="col-sm-4 form-control-label help"><?= $enc->html($this->translate('admin', 'End date')); ?></label> |
|
232 | 232 | <div class="col-sm-8"> |
233 | - <input is="flat-pickr" class="form-control listitem-dateend" type="datetime-local" tabindex="<?= $this->get( 'tabindex' ); ?>" |
|
234 | - v-bind:name="'<?= $enc->attr( $this->formparam( array( 'seo', '_idx_', 'cms.lists.dateend' ) ) ); ?>'.replace('_idx_', idx)" |
|
235 | - placeholder="<?= $enc->attr( $this->translate( 'admin', 'YYYY-MM-DD hh:mm:ss (optional)' ) ); ?>" |
|
233 | + <input is="flat-pickr" class="form-control listitem-dateend" type="datetime-local" tabindex="<?= $this->get('tabindex'); ?>" |
|
234 | + v-bind:name="'<?= $enc->attr($this->formparam(array('seo', '_idx_', 'cms.lists.dateend'))); ?>'.replace('_idx_', idx)" |
|
235 | + placeholder="<?= $enc->attr($this->translate('admin', 'YYYY-MM-DD hh:mm:ss (optional)')); ?>" |
|
236 | 236 | v-bind:disabled="item['cms.lists.siteid'] != siteid" |
237 | 237 | v-bind:config="Aimeos.flatpickr.datetime" |
238 | 238 | v-model="item['cms.lists.dateend']" /> |
239 | 239 | </div> |
240 | 240 | <div class="col-sm-12 form-text text-muted help-text"> |
241 | - <?= $enc->html( $this->translate( 'admin', 'The item is only shown on the web site until that date and time' ) ); ?> |
|
241 | + <?= $enc->html($this->translate('admin', 'The item is only shown on the web site until that date and time')); ?> |
|
242 | 242 | </div> |
243 | 243 | </div> |
244 | 244 | </div> |
245 | 245 | |
246 | 246 | <div v-show="item['_ext']" class="col-xl-6 secondary" v-bind:class="{readonly: item['cms.lists.siteid'] != siteid}"> |
247 | - <config-table v-bind:tabindex="<?= $this->get( 'tabindex' ); ?>" |
|
248 | - v-bind:keys="JSON.parse('<?= $enc->attr( $this->config( 'admin/jqadm/cms/item/seo/config/suggest', [] ) ) ?>')" |
|
249 | - v-bind:name="'<?= $enc->attr( $this->formparam( ['seo', '_idx_', 'config', '_pos_', '_key_'] ) ); ?>'" |
|
247 | + <config-table v-bind:tabindex="<?= $this->get('tabindex'); ?>" |
|
248 | + v-bind:keys="JSON.parse('<?= $enc->attr($this->config('admin/jqadm/cms/item/seo/config/suggest', [])) ?>')" |
|
249 | + v-bind:name="'<?= $enc->attr($this->formparam(['seo', '_idx_', 'config', '_pos_', '_key_'])); ?>'" |
|
250 | 250 | v-bind:index="idx" v-bind:readonly="item['cms.lists.siteid'] != siteid" |
251 | 251 | v-bind:items="item['config']" v-on:update:config="item['config'] = $event"> |
252 | 252 | </config-table> |
253 | 253 | </div> |
254 | 254 | |
255 | - <?= $this->get( 'seoBody' ); ?> |
|
255 | + <?= $this->get('seoBody'); ?> |
|
256 | 256 | |
257 | 257 | </div> |
258 | 258 | </div> |
259 | 259 | </div> |
260 | 260 | |
261 | 261 | <div slot="footer" class="card-tools-more"> |
262 | - <div class="btn btn-primary btn-card-more act-add fa" tabindex="<?= $this->get( 'tabindex' ); ?>" |
|
263 | - title="<?= $enc->attr( $this->translate( 'admin', 'Insert new entry (Ctrl+I)' ) ); ?>" |
|
262 | + <div class="btn btn-primary btn-card-more act-add fa" tabindex="<?= $this->get('tabindex'); ?>" |
|
263 | + title="<?= $enc->attr($this->translate('admin', 'Insert new entry (Ctrl+I)')); ?>" |
|
264 | 264 | v-on:click="add()" > |
265 | 265 | </div> |
266 | 266 | </div> |
@@ -135,9 +135,12 @@ discard block |
||
135 | 135 | <?= $enc->html( $this->translate( 'admin', 'Language of the entered text' ) ); ?> |
136 | 136 | </div> |
137 | 137 | </div> |
138 | - <?php else : ?> |
|
138 | + <?php else { |
|
139 | + : ?> |
|
139 | 140 | <input class="text-langid" type="hidden" |
140 | - v-bind:name="'<?= $enc->attr( $this->formparam( array( 'seo', '_idx_', 'text.languageid' ) ) ); ?>'.replace('_idx_', idx)" |
|
141 | + v-bind:name="'<?= $enc->attr( $this->formparam( array( 'seo', '_idx_', 'text.languageid' ) ) ); |
|
142 | +} |
|
143 | +?>'.replace('_idx_', idx)" |
|
141 | 144 | value="<?= $enc->attr( $languages->getCode()->first() ) ?>" /> |
142 | 145 | <?php endif; ?> |
143 | 146 | |
@@ -157,9 +160,12 @@ discard block |
||
157 | 160 | <?= $enc->html( $this->translate( 'admin', 'Types for additional texts like per one lb/kg or per month' ) ); ?> |
158 | 161 | </div> |
159 | 162 | </div> |
160 | - <?php else : ?> |
|
163 | + <?php else { |
|
164 | + : ?> |
|
161 | 165 | <input class="item-type" type="hidden" |
162 | - v-bind:name="'<?= $enc->attr( $this->formparam( array( 'seo', '_idx_', 'text.type' ) ) ); ?>'.replace('_idx_', idx)" |
|
166 | + v-bind:name="'<?= $enc->attr( $this->formparam( array( 'seo', '_idx_', 'text.type' ) ) ); |
|
167 | +} |
|
168 | +?>'.replace('_idx_', idx)" |
|
163 | 169 | value="<?= $enc->attr( $textTypes->getCode()->first() ) ?>" /> |
164 | 170 | <?php endif; ?> |
165 | 171 | |
@@ -207,9 +213,12 @@ discard block |
||
207 | 213 | <?= $enc->html( $this->translate( 'admin', 'Second level type for grouping items' ) ); ?> |
208 | 214 | </div> |
209 | 215 | </div> |
210 | - <?php else : ?> |
|
216 | + <?php else { |
|
217 | + : ?> |
|
211 | 218 | <input class="listitem-type" type="hidden" |
212 | - v-bind:name="'<?= $enc->attr( $this->formparam( ['seo', '_idx_', 'cms.lists.type'] ) ); ?>'.replace('_idx_', idx)" |
|
219 | + v-bind:name="'<?= $enc->attr( $this->formparam( ['seo', '_idx_', 'cms.lists.type'] ) ); |
|
220 | +} |
|
221 | +?>'.replace('_idx_', idx)" |
|
213 | 222 | value="<?= $enc->attr( $listTypes->getCode()->first() ) ?>" /> |
214 | 223 | <?php endif; ?> |
215 | 224 |
@@ -5,69 +5,69 @@ discard block |
||
5 | 5 | * @copyright Aimeos (aimeos.org), 2021 |
6 | 6 | */ |
7 | 7 | |
8 | -$selected = function( $key, $code ) { |
|
9 | - return ( $key == $code ? 'selected="selected"' : '' ); |
|
8 | +$selected = function($key, $code) { |
|
9 | + return ($key == $code ? 'selected="selected"' : ''); |
|
10 | 10 | }; |
11 | 11 | |
12 | 12 | |
13 | 13 | $enc = $this->encoder(); |
14 | 14 | |
15 | -$target = $this->config( 'admin/jqadm/url/save/target' ); |
|
16 | -$cntl = $this->config( 'admin/jqadm/url/save/controller', 'Jqadm' ); |
|
17 | -$action = $this->config( 'admin/jqadm/url/save/action', 'save' ); |
|
18 | -$config = $this->config( 'admin/jqadm/url/save/config', [] ); |
|
15 | +$target = $this->config('admin/jqadm/url/save/target'); |
|
16 | +$cntl = $this->config('admin/jqadm/url/save/controller', 'Jqadm'); |
|
17 | +$action = $this->config('admin/jqadm/url/save/action', 'save'); |
|
18 | +$config = $this->config('admin/jqadm/url/save/config', []); |
|
19 | 19 | |
20 | -$getTarget = $this->config( 'admin/jqadm/url/get/target' ); |
|
21 | -$getCntl = $this->config( 'admin/jqadm/url/get/controller', 'Jqadm' ); |
|
22 | -$getAction = $this->config( 'admin/jqadm/url/get/action', 'get' ); |
|
23 | -$getConfig = $this->config( 'admin/jqadm/url/get/config', [] ); |
|
20 | +$getTarget = $this->config('admin/jqadm/url/get/target'); |
|
21 | +$getCntl = $this->config('admin/jqadm/url/get/controller', 'Jqadm'); |
|
22 | +$getAction = $this->config('admin/jqadm/url/get/action', 'get'); |
|
23 | +$getConfig = $this->config('admin/jqadm/url/get/config', []); |
|
24 | 24 | |
25 | -$listTarget = $this->config( 'admin/jqadm/url/search/target' ); |
|
26 | -$listCntl = $this->config( 'admin/jqadm/url/search/controller', 'Jqadm' ); |
|
27 | -$listAction = $this->config( 'admin/jqadm/url/search/action', 'search' ); |
|
28 | -$listConfig = $this->config( 'admin/jqadm/url/search/config', [] ); |
|
25 | +$listTarget = $this->config('admin/jqadm/url/search/target'); |
|
26 | +$listCntl = $this->config('admin/jqadm/url/search/controller', 'Jqadm'); |
|
27 | +$listAction = $this->config('admin/jqadm/url/search/action', 'search'); |
|
28 | +$listConfig = $this->config('admin/jqadm/url/search/config', []); |
|
29 | 29 | |
30 | -$newTarget = $this->config( 'admin/jqadm/url/create/target' ); |
|
31 | -$newCntl = $this->config( 'admin/jqadm/url/create/controller', 'Jqadm' ); |
|
32 | -$newAction = $this->config( 'admin/jqadm/url/create/action', 'create' ); |
|
33 | -$newConfig = $this->config( 'admin/jqadm/url/create/config', [] ); |
|
30 | +$newTarget = $this->config('admin/jqadm/url/create/target'); |
|
31 | +$newCntl = $this->config('admin/jqadm/url/create/controller', 'Jqadm'); |
|
32 | +$newAction = $this->config('admin/jqadm/url/create/action', 'create'); |
|
33 | +$newConfig = $this->config('admin/jqadm/url/create/config', []); |
|
34 | 34 | |
35 | -$jsonTarget = $this->config( 'admin/jsonadm/url/target' ); |
|
36 | -$jsonCntl = $this->config( 'admin/jsonadm/url/controller', 'Jsonadm' ); |
|
37 | -$jsonAction = $this->config( 'admin/jsonadm/url/action', 'get' ); |
|
38 | -$jsonConfig = $this->config( 'admin/jsonadm/url/config', [] ); |
|
35 | +$jsonTarget = $this->config('admin/jsonadm/url/target'); |
|
36 | +$jsonCntl = $this->config('admin/jsonadm/url/controller', 'Jsonadm'); |
|
37 | +$jsonAction = $this->config('admin/jsonadm/url/action', 'get'); |
|
38 | +$jsonConfig = $this->config('admin/jsonadm/url/config', []); |
|
39 | 39 | |
40 | -$params = $this->get( 'pageParams', [] ); |
|
40 | +$params = $this->get('pageParams', []); |
|
41 | 41 | |
42 | 42 | |
43 | 43 | ?> |
44 | -<?php $this->block()->start( 'jqadm_content' ); ?> |
|
44 | +<?php $this->block()->start('jqadm_content'); ?> |
|
45 | 45 | |
46 | 46 | <form class="item item-cms item-tree form-horizontal container-fluid" method="POST" enctype="multipart/form-data" |
47 | - action="<?= $enc->attr( $this->url( $target, $cntl, $action, $params, [], $config ) ); ?>" |
|
48 | - data-rootid="<?= $enc->attr( $this->get( 'itemRootId' ) ); ?>" |
|
49 | - data-geturl="<?= $enc->attr( $this->url( $getTarget, $getCntl, $getAction, ['resource' => 'cms', 'id' => '_ID_'] + $params, [], $getConfig ) ); ?>" |
|
50 | - data-createurl="<?= $enc->attr( $this->url( $newTarget, $newCntl, $newAction, ['resource' => 'cms', 'id' => '_ID_'] + $params, [], $newConfig ) ); ?>" |
|
51 | - data-jsonurl="<?= $enc->attr( $this->url( $jsonTarget, $jsonCntl, $jsonAction, ['resource' => 'cms'], [], $jsonConfig ) ); ?>" |
|
52 | - data-idname="<?= $this->formparam( 'id' ); ?>" > |
|
53 | - |
|
54 | - <input id="item-id" type="hidden" name="<?= $enc->attr( $this->formparam( array( 'item', 'cms.id' ) ) ); ?>" |
|
55 | - value="<?= $enc->attr( $this->get( 'itemData/cms.id' ) ); ?>" /> |
|
56 | - <input id="item-parentid" type="hidden" name="<?= $enc->attr( $this->formparam( array( 'item', 'cms.parentid' ) ) ); ?>" |
|
57 | - value="<?= $enc->attr( $this->get( 'itemData/cms.parentid', $this->param( 'parentid', $this->param( 'id', $this->get( 'itemRootId' ) ) ) ) ); ?>" /> |
|
58 | - <input id="item-next" type="hidden" name="<?= $enc->attr( $this->formparam( array( 'next' ) ) ); ?>" value="get" /> |
|
47 | + action="<?= $enc->attr($this->url($target, $cntl, $action, $params, [], $config)); ?>" |
|
48 | + data-rootid="<?= $enc->attr($this->get('itemRootId')); ?>" |
|
49 | + data-geturl="<?= $enc->attr($this->url($getTarget, $getCntl, $getAction, ['resource' => 'cms', 'id' => '_ID_'] + $params, [], $getConfig)); ?>" |
|
50 | + data-createurl="<?= $enc->attr($this->url($newTarget, $newCntl, $newAction, ['resource' => 'cms', 'id' => '_ID_'] + $params, [], $newConfig)); ?>" |
|
51 | + data-jsonurl="<?= $enc->attr($this->url($jsonTarget, $jsonCntl, $jsonAction, ['resource' => 'cms'], [], $jsonConfig)); ?>" |
|
52 | + data-idname="<?= $this->formparam('id'); ?>" > |
|
53 | + |
|
54 | + <input id="item-id" type="hidden" name="<?= $enc->attr($this->formparam(array('item', 'cms.id'))); ?>" |
|
55 | + value="<?= $enc->attr($this->get('itemData/cms.id')); ?>" /> |
|
56 | + <input id="item-parentid" type="hidden" name="<?= $enc->attr($this->formparam(array('item', 'cms.parentid'))); ?>" |
|
57 | + value="<?= $enc->attr($this->get('itemData/cms.parentid', $this->param('parentid', $this->param('id', $this->get('itemRootId'))))); ?>" /> |
|
58 | + <input id="item-next" type="hidden" name="<?= $enc->attr($this->formparam(array('next'))); ?>" value="get" /> |
|
59 | 59 | <?= $this->csrf()->formfield(); ?> |
60 | 60 | |
61 | 61 | <nav class="main-navbar"> |
62 | 62 | <h1 class="navbar-brand"> |
63 | - <span class="navbar-title"><?= $enc->html( $this->translate( 'admin', 'CMS page' ) ); ?></span> |
|
64 | - <span class="navbar-id"><?= $enc->html( $this->get( 'itemData/cms.id' ) ); ?></span> |
|
65 | - <span class="navbar-label"><?= $enc->html( $this->get( 'itemData/cms.label' ) ?: $this->translate( 'admin', 'New' ) ); ?></span> |
|
66 | - <span class="navbar-site"><?= $enc->html( $this->site()->match( $this->get( 'itemData/cms.siteid' ) ) ); ?></span> |
|
63 | + <span class="navbar-title"><?= $enc->html($this->translate('admin', 'CMS page')); ?></span> |
|
64 | + <span class="navbar-id"><?= $enc->html($this->get('itemData/cms.id')); ?></span> |
|
65 | + <span class="navbar-label"><?= $enc->html($this->get('itemData/cms.label') ?: $this->translate('admin', 'New')); ?></span> |
|
66 | + <span class="navbar-site"><?= $enc->html($this->site()->match($this->get('itemData/cms.siteid'))); ?></span> |
|
67 | 67 | </h1> |
68 | 68 | <div class="item-actions"> |
69 | - <?php if( isset( $this->itemData ) ) : ?> |
|
70 | - <?= $this->partial( $this->config( 'admin/jqadm/partial/itemactions', 'common/partials/itemactions-standard' ), ['params' => $params] ); ?> |
|
69 | + <?php if (isset($this->itemData)) : ?> |
|
70 | + <?= $this->partial($this->config('admin/jqadm/partial/itemactions', 'common/partials/itemactions-standard'), ['params' => $params]); ?> |
|
71 | 71 | <?php else : ?> |
72 | 72 | <span class="placeholder"> </span> |
73 | 73 | <?php endif; ?> |
@@ -83,7 +83,7 @@ discard block |
||
83 | 83 | --><span class="btn btn-secondary fa expand-all" tabindex="1"></span><!-- |
84 | 84 | --><span class="btn btn-secondary fa collapse-all" tabindex="1"></span><!-- |
85 | 85 | --></div><!-- |
86 | - --><input type="text" class="form-control search-input" tabindex="1" placeholder="<?= $enc->attr( $this->translate( 'admin', 'Find page' ) ); ?>"><!-- |
|
86 | + --><input type="text" class="form-control search-input" tabindex="1" placeholder="<?= $enc->attr($this->translate('admin', 'Find page')); ?>"><!-- |
|
87 | 87 | --><div class="input-group-append"><!-- |
88 | 88 | --><span class="btn btn-secondary fa act-delete " tabindex="1"></span><!-- |
89 | 89 | --><span class="btn btn-primary fa act-add" tabindex="1"></span><!-- |
@@ -93,7 +93,7 @@ discard block |
||
93 | 93 | </div> |
94 | 94 | </div> |
95 | 95 | |
96 | - <?php if( isset( $this->itemData ) ) : ?> |
|
96 | + <?php if (isset($this->itemData)) : ?> |
|
97 | 97 | <div class="col-xl-9 cms-content"> |
98 | 98 | <div class="row"> |
99 | 99 | |
@@ -102,14 +102,14 @@ discard block |
||
102 | 102 | <ul class="nav nav-tabs flex-row flex-wrap d-flex box" role="tablist"> |
103 | 103 | <li class="nav-item basic"> |
104 | 104 | <a class="nav-link active" href="#basic" data-bs-toggle="tab" role="tab" aria-expanded="true" aria-controls="basic" tabindex="1"> |
105 | - <?= $enc->html( $this->translate( 'admin', 'Basic' ) ); ?> |
|
105 | + <?= $enc->html($this->translate('admin', 'Basic')); ?> |
|
106 | 106 | </a> |
107 | 107 | </li> |
108 | 108 | |
109 | - <?php foreach( array_values( $this->get( 'itemSubparts', [] ) ) as $idx => $subpart ) : ?> |
|
110 | - <li class="nav-item <?= $enc->attr( $subpart ); ?>"> |
|
111 | - <a class="nav-link" href="#<?= $enc->attr( $subpart ); ?>" data-bs-toggle="tab" role="tab" tabindex="<?= ++$idx + 1; ?>"> |
|
112 | - <?= $enc->html( $this->translate( 'admin', $subpart ) ); ?> |
|
109 | + <?php foreach (array_values($this->get('itemSubparts', [])) as $idx => $subpart) : ?> |
|
110 | + <li class="nav-item <?= $enc->attr($subpart); ?>"> |
|
111 | + <a class="nav-link" href="#<?= $enc->attr($subpart); ?>" data-bs-toggle="tab" role="tab" tabindex="<?= ++$idx + 1; ?>"> |
|
112 | + <?= $enc->html($this->translate('admin', $subpart)); ?> |
|
113 | 113 | </a> |
114 | 114 | </li> |
115 | 115 | <?php endforeach; ?> |
@@ -117,16 +117,16 @@ discard block |
||
117 | 117 | |
118 | 118 | <div class="item-meta text-muted"> |
119 | 119 | <small> |
120 | - <?= $enc->html( $this->translate( 'admin', 'Modified' ) ); ?>: |
|
121 | - <span class="meta-value"><?= $enc->html( $this->get( 'itemData/cms.mtime' ) ); ?></span> |
|
120 | + <?= $enc->html($this->translate('admin', 'Modified')); ?>: |
|
121 | + <span class="meta-value"><?= $enc->html($this->get('itemData/cms.mtime')); ?></span> |
|
122 | 122 | </small> |
123 | 123 | <small> |
124 | - <?= $enc->html( $this->translate( 'admin', 'Created' ) ); ?>: |
|
125 | - <span class="meta-value"><?= $enc->html( $this->get( 'itemData/cms.ctime' ) ); ?></span> |
|
124 | + <?= $enc->html($this->translate('admin', 'Created')); ?>: |
|
125 | + <span class="meta-value"><?= $enc->html($this->get('itemData/cms.ctime')); ?></span> |
|
126 | 126 | </small> |
127 | 127 | <small> |
128 | - <?= $enc->html( $this->translate( 'admin', 'Editor' ) ); ?>: |
|
129 | - <span class="meta-value"><?= $enc->html( $this->get( 'itemData/cms.editor' ) ); ?></span> |
|
128 | + <?= $enc->html($this->translate('admin', 'Editor')); ?>: |
|
129 | + <span class="meta-value"><?= $enc->html($this->get('itemData/cms.editor')); ?></span> |
|
130 | 130 | </small> |
131 | 131 | </div> |
132 | 132 | |
@@ -140,55 +140,55 @@ discard block |
||
140 | 140 | |
141 | 141 | <div class="box"> |
142 | 142 | <div class="row"> |
143 | - <div class="col-xl-6 <?= $this->site()->readonly( $this->get( 'itemData/cms.siteid' ) ); ?>"> |
|
143 | + <div class="col-xl-6 <?= $this->site()->readonly($this->get('itemData/cms.siteid')); ?>"> |
|
144 | 144 | <div class="form-group row mandatory"> |
145 | - <label class="col-sm-4 form-control-label"><?= $enc->html( $this->translate( 'admin', 'Status' ) ); ?></label> |
|
145 | + <label class="col-sm-4 form-control-label"><?= $enc->html($this->translate('admin', 'Status')); ?></label> |
|
146 | 146 | <div class="col-sm-8"> |
147 | 147 | <select class="form-control form-select item-status" required="required" tabindex="1" |
148 | - name="<?= $enc->attr( $this->formparam( array( 'item', 'cms.status' ) ) ); ?>" |
|
149 | - <?= $this->site()->readonly( $this->get( 'itemData/cms.siteid' ) ); ?> > |
|
148 | + name="<?= $enc->attr($this->formparam(array('item', 'cms.status'))); ?>" |
|
149 | + <?= $this->site()->readonly($this->get('itemData/cms.siteid')); ?> > |
|
150 | 150 | <option value=""> |
151 | - <?= $enc->html( $this->translate( 'admin', 'Please select' ) ); ?> |
|
151 | + <?= $enc->html($this->translate('admin', 'Please select')); ?> |
|
152 | 152 | </option> |
153 | - <option value="1" <?= $selected( $this->get( 'itemData/cms.status', 1 ), 1 ); ?> > |
|
154 | - <?= $enc->html( $this->translate( 'mshop/code', 'status:1' ) ); ?> |
|
153 | + <option value="1" <?= $selected($this->get('itemData/cms.status', 1), 1); ?> > |
|
154 | + <?= $enc->html($this->translate('mshop/code', 'status:1')); ?> |
|
155 | 155 | </option> |
156 | - <option value="0" <?= $selected( $this->get( 'itemData/cms.status', 1 ), 0 ); ?> > |
|
157 | - <?= $enc->html( $this->translate( 'mshop/code', 'status:0' ) ); ?> |
|
156 | + <option value="0" <?= $selected($this->get('itemData/cms.status', 1), 0); ?> > |
|
157 | + <?= $enc->html($this->translate('mshop/code', 'status:0')); ?> |
|
158 | 158 | </option> |
159 | - <option value="-1" <?= $selected( $this->get( 'itemData/cms.status', 1 ), -1 ); ?> > |
|
160 | - <?= $enc->html( $this->translate( 'mshop/code', 'status:-1' ) ); ?> |
|
159 | + <option value="-1" <?= $selected($this->get('itemData/cms.status', 1), -1); ?> > |
|
160 | + <?= $enc->html($this->translate('mshop/code', 'status:-1')); ?> |
|
161 | 161 | </option> |
162 | - <option value="-2" <?= $selected( $this->get( 'itemData/cms.status', 1 ), -2 ); ?> > |
|
163 | - <?= $enc->html( $this->translate( 'mshop/code', 'status:-2' ) ); ?> |
|
162 | + <option value="-2" <?= $selected($this->get('itemData/cms.status', 1), -2); ?> > |
|
163 | + <?= $enc->html($this->translate('mshop/code', 'status:-2')); ?> |
|
164 | 164 | </option> |
165 | 165 | </select> |
166 | 166 | </div> |
167 | 167 | </div> |
168 | 168 | <div class="form-group row mandatory"> |
169 | - <label class="col-sm-4 form-control-label help"><?= $enc->html( $this->translate( 'admin', 'URL' ) ); ?></label> |
|
169 | + <label class="col-sm-4 form-control-label help"><?= $enc->html($this->translate('admin', 'URL')); ?></label> |
|
170 | 170 | <div class="col-sm-8"> |
171 | 171 | <input class="form-control item-url" type="text" required="required" tabindex="1" |
172 | - name="<?= $enc->attr( $this->formparam( array( 'item', 'cms.url' ) ) ); ?>" |
|
173 | - placeholder="<?= $enc->attr( $this->translate( 'admin', 'Unique page URL (required)' ) ); ?>" |
|
174 | - value="<?= $enc->attr( $this->get( 'itemData/cms.url' ) ); ?>" |
|
175 | - <?= $this->site()->readonly( $this->get( 'itemData/cms.siteid' ) ); ?> /> |
|
172 | + name="<?= $enc->attr($this->formparam(array('item', 'cms.url'))); ?>" |
|
173 | + placeholder="<?= $enc->attr($this->translate('admin', 'Unique page URL (required)')); ?>" |
|
174 | + value="<?= $enc->attr($this->get('itemData/cms.url')); ?>" |
|
175 | + <?= $this->site()->readonly($this->get('itemData/cms.siteid')); ?> /> |
|
176 | 176 | </div> |
177 | 177 | <div class="col-sm-12 form-text text-muted help-text"> |
178 | - <?= $enc->html( $this->translate( 'admin', 'Unique page URL, e.g. "/page-name"' ) ); ?> |
|
178 | + <?= $enc->html($this->translate('admin', 'Unique page URL, e.g. "/page-name"')); ?> |
|
179 | 179 | </div> |
180 | 180 | </div> |
181 | 181 | <div class="form-group row mandatory"> |
182 | - <label class="col-sm-4 form-control-label help"><?= $enc->html( $this->translate( 'admin', 'Title' ) ); ?></label> |
|
182 | + <label class="col-sm-4 form-control-label help"><?= $enc->html($this->translate('admin', 'Title')); ?></label> |
|
183 | 183 | <div class="col-sm-8"> |
184 | 184 | <input class="form-control item-label" type="text" required="required" tabindex="1" |
185 | - name="<?= $this->formparam( array( 'item', 'cms.label' ) ); ?>" |
|
186 | - placeholder="<?= $enc->attr( $this->translate( 'admin', 'Internal name (required)' ) ); ?>" |
|
187 | - value="<?= $enc->attr( $this->get( 'itemData/cms.label' ) ); ?>" |
|
188 | - <?= $this->site()->readonly( $this->get( 'itemData/cms.siteid' ) ); ?> /> |
|
185 | + name="<?= $this->formparam(array('item', 'cms.label')); ?>" |
|
186 | + placeholder="<?= $enc->attr($this->translate('admin', 'Internal name (required)')); ?>" |
|
187 | + value="<?= $enc->attr($this->get('itemData/cms.label')); ?>" |
|
188 | + <?= $this->site()->readonly($this->get('itemData/cms.siteid')); ?> /> |
|
189 | 189 | </div> |
190 | 190 | <div class="col-sm-12 form-text text-muted help-text"> |
191 | - <?= $enc->html( $this->translate( 'admin', 'Page title, will be used on the web site if no title for the language is available' ) ); ?> |
|
191 | + <?= $enc->html($this->translate('admin', 'Page title, will be used on the web site if no title for the language is available')); ?> |
|
192 | 192 | </div> |
193 | 193 | </div> |
194 | 194 | </div> |
@@ -197,12 +197,12 @@ discard block |
||
197 | 197 | </div> |
198 | 198 | </div> |
199 | 199 | |
200 | - <?= $this->get( 'itemBody' ); ?> |
|
200 | + <?= $this->get('itemBody'); ?> |
|
201 | 201 | |
202 | 202 | </div> |
203 | 203 | |
204 | 204 | <div class="item-actions"> |
205 | - <?= $this->partial( $this->config( 'admin/jqadm/partial/itemactions', 'common/partials/itemactions-standard' ), ['params' => $params] ); ?> |
|
205 | + <?= $this->partial($this->config('admin/jqadm/partial/itemactions', 'common/partials/itemactions-standard'), ['params' => $params]); ?> |
|
206 | 206 | </div> |
207 | 207 | </div> |
208 | 208 | |
@@ -216,4 +216,4 @@ discard block |
||
216 | 216 | <?php $this->block()->stop(); ?> |
217 | 217 | |
218 | 218 | |
219 | -<?= $this->render( $this->config( 'admin/jqadm/template/page', 'common/page-standard' ) ); ?> |
|
219 | +<?= $this->render($this->config('admin/jqadm/template/page', 'common/page-standard')); ?> |
@@ -68,9 +68,12 @@ |
||
68 | 68 | <div class="item-actions"> |
69 | 69 | <?php if( isset( $this->itemData ) ) : ?> |
70 | 70 | <?= $this->partial( $this->config( 'admin/jqadm/partial/itemactions', 'common/partials/itemactions-standard' ), ['params' => $params] ); ?> |
71 | - <?php else : ?> |
|
71 | + <?php else { |
|
72 | + : ?> |
|
72 | 73 | <span class="placeholder"> </span> |
73 | - <?php endif; ?> |
|
74 | + <?php endif; |
|
75 | +} |
|
76 | +?> |
|
74 | 77 | </div> |
75 | 78 | </nav> |
76 | 79 |
@@ -112,9 +112,12 @@ discard block |
||
112 | 112 | <?= $enc->html( $this->translate( 'admin', 'Language of the entered text' ) ); ?> |
113 | 113 | </div> |
114 | 114 | </div> |
115 | - <?php else : ?> |
|
115 | + <?php else { |
|
116 | + : ?> |
|
116 | 117 | <input class="text-langid" type="hidden" |
117 | - v-bind:name="'<?= $enc->attr( $this->formparam( array( 'content', '_idx_', 'text.languageid' ) ) ); ?>'.replace('_idx_', idx)" |
|
118 | + v-bind:name="'<?= $enc->attr( $this->formparam( array( 'content', '_idx_', 'text.languageid' ) ) ); |
|
119 | +} |
|
120 | +?>'.replace('_idx_', idx)" |
|
118 | 121 | value="<?= $enc->attr( $languages->getCode()->first() ) ?>" /> |
119 | 122 | <?php endif; ?> |
120 | 123 | |
@@ -148,9 +151,12 @@ discard block |
||
148 | 151 | <?= $enc->html( $this->translate( 'admin', 'Second level type for grouping items' ) ); ?> |
149 | 152 | </div> |
150 | 153 | </div> |
151 | - <?php else : ?> |
|
154 | + <?php else { |
|
155 | + : ?> |
|
152 | 156 | <input class="listitem-type" type="hidden" |
153 | - v-bind:name="'<?= $enc->attr( $this->formparam( array( 'content', '_idx_', 'cms.lists.type' ) ) ); ?>'.replace('_idx_', idx)" |
|
157 | + v-bind:name="'<?= $enc->attr( $this->formparam( array( 'content', '_idx_', 'cms.lists.type' ) ) ); |
|
158 | +} |
|
159 | +?>'.replace('_idx_', idx)" |
|
154 | 160 | value="<?= $enc->attr( $listTypes->getCode()->first() ) ?>" /> |
155 | 161 | <?php endif; ?> |
156 | 162 |
@@ -25,7 +25,7 @@ discard block |
||
25 | 25 | <div id="content" class="item-content tab-pane fade" role="tablist" aria-labelledby="content"> |
26 | 26 | |
27 | 27 | <div id="item-content-group" |
28 | - data-items="<?= $enc->attr( $this->get( 'contentData', [] ) ); ?>" |
|
28 | + data-items="<?= $enc->attr($this->get('contentData', [])); ?>" |
|
29 | 29 | data-siteid="<?= $this->site()->siteid() ?>" |
30 | 30 | data-domain="cms" > |
31 | 31 | |
@@ -37,24 +37,24 @@ discard block |
||
37 | 37 | v-bind:data-target="'#item-text-group-data-' + idx" data-bs-toggle="collapse" role="tab" class="card-header header" |
38 | 38 | v-bind:aria-controls="'item-text-group-data-' + idx" aria-expanded="false" v-on:click="toggle('_show', idx)"> |
39 | 39 | <div class="card-tools-left"> |
40 | - <div class="btn btn-card-header act-show fa" tabindex="<?= $this->get( 'tabindex' ); ?>" |
|
41 | - title="<?= $enc->attr( $this->translate( 'admin', 'Show/hide this entry' ) ); ?>"> |
|
40 | + <div class="btn btn-card-header act-show fa" tabindex="<?= $this->get('tabindex'); ?>" |
|
41 | + title="<?= $enc->attr($this->translate('admin', 'Show/hide this entry')); ?>"> |
|
42 | 42 | </div> |
43 | 43 | </div> |
44 | 44 | <span class="item-label header-label" v-bind:class="{disabled: !active(idx)}">{{ label(idx) }}</span> |
45 | 45 | |
46 | 46 | <div class="card-tools-right"> |
47 | - <div class="btn btn-card-header act-copy fa" tabindex="<?= $this->get( 'tabindex' ); ?>" |
|
48 | - title="<?= $enc->attr( $this->translate( 'admin', 'Duplicate entry (Ctrl+D)' ) ); ?>" |
|
47 | + <div class="btn btn-card-header act-copy fa" tabindex="<?= $this->get('tabindex'); ?>" |
|
48 | + title="<?= $enc->attr($this->translate('admin', 'Duplicate entry (Ctrl+D)')); ?>" |
|
49 | 49 | v-on:click.stop="duplicate(idx)"> |
50 | 50 | </div> |
51 | 51 | <div v-if="item['cms.lists.siteid'] == siteid && !item['_nosort']" |
52 | - class="btn btn-card-header act-move fa" tabindex="<?= $this->get( 'tabindex' ); ?>" |
|
53 | - title="<?= $enc->attr( $this->translate( 'admin', 'Move this entry up/down' ) ); ?>"> |
|
52 | + class="btn btn-card-header act-move fa" tabindex="<?= $this->get('tabindex'); ?>" |
|
53 | + title="<?= $enc->attr($this->translate('admin', 'Move this entry up/down')); ?>"> |
|
54 | 54 | </div> |
55 | 55 | <div v-if="item['cms.lists.siteid'] == siteid" |
56 | - class="btn btn-card-header act-delete fa" tabindex="<?= $this->get( 'tabindex' ); ?>" |
|
57 | - title="<?= $enc->attr( $this->translate( 'admin', 'Delete this entry' ) ); ?>" |
|
56 | + class="btn btn-card-header act-delete fa" tabindex="<?= $this->get('tabindex'); ?>" |
|
57 | + title="<?= $enc->attr($this->translate('admin', 'Delete this entry')); ?>" |
|
58 | 58 | v-on:click.stop="remove(idx)"> |
59 | 59 | </div> |
60 | 60 | </div> |
@@ -64,29 +64,29 @@ discard block |
||
64 | 64 | v-bind:aria-labelledby="'item-text-group-item-' + idx" role="tabpanel" class="card-block collapse row"> |
65 | 65 | |
66 | 66 | <input type="hidden" v-model="item['text.id']" |
67 | - v-bind:name="'<?= $enc->attr( $this->formparam( array( 'content', '_idx_', 'text.id' ) ) ); ?>'.replace('_idx_', idx)" /> |
|
67 | + v-bind:name="'<?= $enc->attr($this->formparam(array('content', '_idx_', 'text.id'))); ?>'.replace('_idx_', idx)" /> |
|
68 | 68 | |
69 | 69 | <div class="col-xl-6"> |
70 | 70 | |
71 | 71 | <div class="form-group row mandatory"> |
72 | - <label class="col-sm-4 form-control-label"><?= $enc->html( $this->translate( 'admin', 'Status' ) ); ?></label> |
|
72 | + <label class="col-sm-4 form-control-label"><?= $enc->html($this->translate('admin', 'Status')); ?></label> |
|
73 | 73 | <div class="col-sm-8"> |
74 | - <select class="form-control form-select item-status" required="required" tabindex="<?= $this->get( 'tabindex' ); ?>" |
|
75 | - v-bind:name="'<?= $enc->attr( $this->formparam( array( 'content', '_idx_', 'text.status' ) ) ); ?>'.replace('_idx_', idx)" |
|
74 | + <select class="form-control form-select item-status" required="required" tabindex="<?= $this->get('tabindex'); ?>" |
|
75 | + v-bind:name="'<?= $enc->attr($this->formparam(array('content', '_idx_', 'text.status'))); ?>'.replace('_idx_', idx)" |
|
76 | 76 | v-bind:readonly="item['text.siteid'] != siteid" |
77 | 77 | v-model="item['text.status']" > |
78 | - <option value=""><?= $enc->html( $this->translate( 'admin', 'Please select' ) ); ?></option> |
|
78 | + <option value=""><?= $enc->html($this->translate('admin', 'Please select')); ?></option> |
|
79 | 79 | <option value="1" v-bind:selected="item['text.status'] == 1" > |
80 | - <?= $enc->html( $this->translate( 'mshop/code', 'status:1' ) ); ?> |
|
80 | + <?= $enc->html($this->translate('mshop/code', 'status:1')); ?> |
|
81 | 81 | </option> |
82 | 82 | <option value="0" v-bind:selected="item['text.status'] == 0" > |
83 | - <?= $enc->html( $this->translate( 'mshop/code', 'status:0' ) ); ?> |
|
83 | + <?= $enc->html($this->translate('mshop/code', 'status:0')); ?> |
|
84 | 84 | </option> |
85 | 85 | <option value="-1" v-bind:selected="item['text.status'] == -1" > |
86 | - <?= $enc->html( $this->translate( 'mshop/code', 'status:-1' ) ); ?> |
|
86 | + <?= $enc->html($this->translate('mshop/code', 'status:-1')); ?> |
|
87 | 87 | </option> |
88 | 88 | <option value="-2" v-bind:selected="item['text.status'] == -2" > |
89 | - <?= $enc->html( $this->translate( 'mshop/code', 'status:-2' ) ); ?> |
|
89 | + <?= $enc->html($this->translate('mshop/code', 'status:-2')); ?> |
|
90 | 90 | </option> |
91 | 91 | </select> |
92 | 92 | </div> |
@@ -95,35 +95,35 @@ discard block |
||
95 | 95 | </div> |
96 | 96 | <div class="col-xl-6"> |
97 | 97 | |
98 | - <?php if( !( $languages = $this->get( 'pageLangItems', map() ) )->count() !== 1 ) : ?> |
|
98 | + <?php if (!($languages = $this->get('pageLangItems', map()))->count() !== 1) : ?> |
|
99 | 99 | <div class="form-group row mandatory"> |
100 | - <label class="col-sm-4 form-control-label help"><?= $enc->html( $this->translate( 'admin', 'Language' ) ); ?></label> |
|
100 | + <label class="col-sm-4 form-control-label help"><?= $enc->html($this->translate('admin', 'Language')); ?></label> |
|
101 | 101 | <div class="col-sm-8"> |
102 | - <select is="select-component" required class="form-control form-select item-languageid" tabindex="<?= $enc->attr( $this->get( 'tabindex' ) ); ?>" |
|
103 | - v-bind:items="JSON.parse('<?= $enc->attr( $languages->col( 'locale.language.label', 'locale.language.id' )->toArray() ) ?>')" |
|
104 | - v-bind:name="'<?= $enc->attr( $this->formparam( ['content', '_idx_', 'text.languageid'] ) ); ?>'.replace('_idx_', idx)" |
|
105 | - v-bind:text="'<?= $enc->html( $this->translate( 'admin', 'Please select' ) ); ?>'" |
|
106 | - v-bind:all="'<?= $enc->html( $this->translate( 'admin', 'All' ) ); ?>'" |
|
102 | + <select is="select-component" required class="form-control form-select item-languageid" tabindex="<?= $enc->attr($this->get('tabindex')); ?>" |
|
103 | + v-bind:items="JSON.parse('<?= $enc->attr($languages->col('locale.language.label', 'locale.language.id')->toArray()) ?>')" |
|
104 | + v-bind:name="'<?= $enc->attr($this->formparam(['content', '_idx_', 'text.languageid'])); ?>'.replace('_idx_', idx)" |
|
105 | + v-bind:text="'<?= $enc->html($this->translate('admin', 'Please select')); ?>'" |
|
106 | + v-bind:all="'<?= $enc->html($this->translate('admin', 'All')); ?>'" |
|
107 | 107 | v-bind:readonly="item['text.siteid'] != siteid" |
108 | 108 | v-model="item['text.languageid']" > |
109 | 109 | </select> |
110 | 110 | </div> |
111 | 111 | <div class="col-sm-12 form-text text-muted help-text"> |
112 | - <?= $enc->html( $this->translate( 'admin', 'Language of the entered text' ) ); ?> |
|
112 | + <?= $enc->html($this->translate('admin', 'Language of the entered text')); ?> |
|
113 | 113 | </div> |
114 | 114 | </div> |
115 | 115 | <?php else : ?> |
116 | 116 | <input class="text-langid" type="hidden" |
117 | - v-bind:name="'<?= $enc->attr( $this->formparam( array( 'content', '_idx_', 'text.languageid' ) ) ); ?>'.replace('_idx_', idx)" |
|
118 | - value="<?= $enc->attr( $languages->getCode()->first() ) ?>" /> |
|
117 | + v-bind:name="'<?= $enc->attr($this->formparam(array('content', '_idx_', 'text.languageid'))); ?>'.replace('_idx_', idx)" |
|
118 | + value="<?= $enc->attr($languages->getCode()->first()) ?>" /> |
|
119 | 119 | <?php endif; ?> |
120 | 120 | |
121 | 121 | </div> |
122 | 122 | |
123 | 123 | <div class="col-xl-12"> |
124 | 124 | <grapesjs v-bind:setup="Aimeos.CMSContent.GrapesJS" |
125 | - v-bind:tabindex="<?= $this->get( 'tabindex' ); ?>" |
|
126 | - v-bind:name="'<?= $enc->attr( $this->formparam( array( 'content', '_idx_', 'text.content' ) ) ); ?>'.replace('_idx_', idx)" |
|
125 | + v-bind:tabindex="<?= $this->get('tabindex'); ?>" |
|
126 | + v-bind:name="'<?= $enc->attr($this->formparam(array('content', '_idx_', 'text.content'))); ?>'.replace('_idx_', idx)" |
|
127 | 127 | v-bind:readonly="item['text.siteid'] != siteid" |
128 | 128 | v-bind:value="item['text.content']" |
129 | 129 | v-model="item['text.content']" |
@@ -132,85 +132,85 @@ discard block |
||
132 | 132 | |
133 | 133 | <div v-on:click="toggle('_ext', idx)" class="col-xl-12 advanced" v-bind:class="{'collapsed': !item['_ext']}"> |
134 | 134 | <div class="card-tools-left"> |
135 | - <div class="btn act-show fa" tabindex="<?= $this->get( 'tabindex' ); ?>" |
|
136 | - title="<?= $enc->attr( $this->translate( 'admin', 'Show/hide advanced data' ) ); ?>"> |
|
135 | + <div class="btn act-show fa" tabindex="<?= $this->get('tabindex'); ?>" |
|
136 | + title="<?= $enc->attr($this->translate('admin', 'Show/hide advanced data')); ?>"> |
|
137 | 137 | </div> |
138 | 138 | </div> |
139 | - <span class="header-label"><?= $enc->html( $this->translate( 'admin', 'Advanced' ) ); ?></span> |
|
139 | + <span class="header-label"><?= $enc->html($this->translate('admin', 'Advanced')); ?></span> |
|
140 | 140 | </div> |
141 | 141 | |
142 | 142 | <div v-show="item['_ext']" class="col-xl-6 secondary"> |
143 | 143 | |
144 | - <?php if( !( $listTypes = $this->get( 'textListTypes', map() ) )->count() !== 1 ) : ?> |
|
144 | + <?php if (!($listTypes = $this->get('textListTypes', map()))->count() !== 1) : ?> |
|
145 | 145 | <div class="form-group row mandatory"> |
146 | - <label class="col-sm-4 form-control-label help"><?= $enc->html( $this->translate( 'admin', 'List type' ) ); ?></label> |
|
146 | + <label class="col-sm-4 form-control-label help"><?= $enc->html($this->translate('admin', 'List type')); ?></label> |
|
147 | 147 | <div class="col-sm-8"> |
148 | - <select is="select-component" required class="form-control form-select listitem-type" tabindex="<?= $enc->attr( $this->get( 'tabindex' ) ); ?>" |
|
149 | - v-bind:items="JSON.parse('<?= $enc->attr( $listTypes->col( 'cms.lists.type.label', 'cms.lists.type.code' )->toArray() ) ?>')" |
|
150 | - v-bind:name="'<?= $enc->attr( $this->formparam( ['content', '_idx_', 'cms.lists.type'] ) ); ?>'.replace('_idx_', idx)" |
|
151 | - v-bind:text="'<?= $enc->html( $this->translate( 'admin', 'Please select' ) ); ?>'" |
|
148 | + <select is="select-component" required class="form-control form-select listitem-type" tabindex="<?= $enc->attr($this->get('tabindex')); ?>" |
|
149 | + v-bind:items="JSON.parse('<?= $enc->attr($listTypes->col('cms.lists.type.label', 'cms.lists.type.code')->toArray()) ?>')" |
|
150 | + v-bind:name="'<?= $enc->attr($this->formparam(['content', '_idx_', 'cms.lists.type'])); ?>'.replace('_idx_', idx)" |
|
151 | + v-bind:text="'<?= $enc->html($this->translate('admin', 'Please select')); ?>'" |
|
152 | 152 | v-bind:readonly="item['cms.lists.siteid'] != siteid" |
153 | 153 | v-model="item['cms.lists.type']" > |
154 | 154 | </select> |
155 | 155 | </div> |
156 | 156 | <div class="col-sm-12 form-text text-muted help-text"> |
157 | - <?= $enc->html( $this->translate( 'admin', 'Second level type for grouping items' ) ); ?> |
|
157 | + <?= $enc->html($this->translate('admin', 'Second level type for grouping items')); ?> |
|
158 | 158 | </div> |
159 | 159 | </div> |
160 | 160 | <?php else : ?> |
161 | 161 | <input class="listitem-type" type="hidden" |
162 | - v-bind:name="'<?= $enc->attr( $this->formparam( array( 'content', '_idx_', 'cms.lists.type' ) ) ); ?>'.replace('_idx_', idx)" |
|
163 | - value="<?= $enc->attr( $listTypes->getCode()->first() ) ?>" /> |
|
162 | + v-bind:name="'<?= $enc->attr($this->formparam(array('content', '_idx_', 'cms.lists.type'))); ?>'.replace('_idx_', idx)" |
|
163 | + value="<?= $enc->attr($listTypes->getCode()->first()) ?>" /> |
|
164 | 164 | <?php endif; ?> |
165 | 165 | |
166 | 166 | <div class="form-group row optional"> |
167 | - <label class="col-sm-4 form-control-label help"><?= $enc->html( $this->translate( 'admin', 'Start date' ) ); ?></label> |
|
167 | + <label class="col-sm-4 form-control-label help"><?= $enc->html($this->translate('admin', 'Start date')); ?></label> |
|
168 | 168 | <div class="col-sm-8"> |
169 | - <input is="flat-pickr" class="form-control listitem-datestart" type="datetime-local" tabindex="<?= $this->get( 'tabindex' ); ?>" |
|
170 | - v-bind:name="'<?= $enc->attr( $this->formparam( array( 'content', '_idx_', 'cms.lists.datestart' ) ) ); ?>'.replace('_idx_', idx)" |
|
171 | - placeholder="<?= $enc->attr( $this->translate( 'admin', 'YYYY-MM-DD hh:mm:ss (optional)' ) ); ?>" |
|
169 | + <input is="flat-pickr" class="form-control listitem-datestart" type="datetime-local" tabindex="<?= $this->get('tabindex'); ?>" |
|
170 | + v-bind:name="'<?= $enc->attr($this->formparam(array('content', '_idx_', 'cms.lists.datestart'))); ?>'.replace('_idx_', idx)" |
|
171 | + placeholder="<?= $enc->attr($this->translate('admin', 'YYYY-MM-DD hh:mm:ss (optional)')); ?>" |
|
172 | 172 | v-bind:disabled="item['cms.lists.siteid'] != siteid" |
173 | 173 | v-bind:config="Aimeos.flatpickr.datetime" |
174 | 174 | v-model="item['cms.lists.datestart']" /> |
175 | 175 | </div> |
176 | 176 | <div class="col-sm-12 form-text text-muted help-text"> |
177 | - <?= $enc->html( $this->translate( 'admin', 'The item is only shown on the web site after that date and time' ) ); ?> |
|
177 | + <?= $enc->html($this->translate('admin', 'The item is only shown on the web site after that date and time')); ?> |
|
178 | 178 | </div> |
179 | 179 | </div> |
180 | 180 | <div class="form-group row optional"> |
181 | - <label class="col-sm-4 form-control-label help"><?= $enc->html( $this->translate( 'admin', 'End date' ) ); ?></label> |
|
181 | + <label class="col-sm-4 form-control-label help"><?= $enc->html($this->translate('admin', 'End date')); ?></label> |
|
182 | 182 | <div class="col-sm-8"> |
183 | - <input is="flat-pickr" class="form-control listitem-dateend" type="datetime-local" tabindex="<?= $this->get( 'tabindex' ); ?>" |
|
184 | - v-bind:name="'<?= $enc->attr( $this->formparam( array( 'content', '_idx_', 'cms.lists.dateend' ) ) ); ?>'.replace('_idx_', idx)" |
|
185 | - placeholder="<?= $enc->attr( $this->translate( 'admin', 'YYYY-MM-DD hh:mm:ss (optional)' ) ); ?>" |
|
183 | + <input is="flat-pickr" class="form-control listitem-dateend" type="datetime-local" tabindex="<?= $this->get('tabindex'); ?>" |
|
184 | + v-bind:name="'<?= $enc->attr($this->formparam(array('content', '_idx_', 'cms.lists.dateend'))); ?>'.replace('_idx_', idx)" |
|
185 | + placeholder="<?= $enc->attr($this->translate('admin', 'YYYY-MM-DD hh:mm:ss (optional)')); ?>" |
|
186 | 186 | v-bind:disabled="item['cms.lists.siteid'] != siteid" |
187 | 187 | v-bind:config="Aimeos.flatpickr.datetime" |
188 | 188 | v-model="item['cms.lists.dateend']" /> |
189 | 189 | </div> |
190 | 190 | <div class="col-sm-12 form-text text-muted help-text"> |
191 | - <?= $enc->html( $this->translate( 'admin', 'The item is only shown on the web site until that date and time' ) ); ?> |
|
191 | + <?= $enc->html($this->translate('admin', 'The item is only shown on the web site until that date and time')); ?> |
|
192 | 192 | </div> |
193 | 193 | </div> |
194 | 194 | </div> |
195 | 195 | |
196 | 196 | <div v-show="item['_ext']" class="col-xl-6 secondary" v-bind:class="{readonly: item['cms.lists.siteid'] != siteid}"> |
197 | - <config-table v-bind:tabindex="<?= $this->get( 'tabindex' ); ?>" |
|
198 | - v-bind:keys="JSON.parse('<?= $enc->attr( $this->config( 'admin/jqadm/cms/item/content/config/suggest', [] ) ) ?>')" |
|
199 | - v-bind:name="'<?= $enc->attr( $this->formparam( ['content', '_idx_', 'config', '_pos_', '_key_'] ) ); ?>'" |
|
197 | + <config-table v-bind:tabindex="<?= $this->get('tabindex'); ?>" |
|
198 | + v-bind:keys="JSON.parse('<?= $enc->attr($this->config('admin/jqadm/cms/item/content/config/suggest', [])) ?>')" |
|
199 | + v-bind:name="'<?= $enc->attr($this->formparam(['content', '_idx_', 'config', '_pos_', '_key_'])); ?>'" |
|
200 | 200 | v-bind:index="idx" v-bind:readonly="item['cms.lists.siteid'] != siteid" |
201 | 201 | v-bind:items="item['config']" v-on:update:config="item['config'] = $event"> |
202 | 202 | </config-table> |
203 | 203 | </div> |
204 | 204 | |
205 | - <?= $this->get( 'contentBody' ); ?> |
|
205 | + <?= $this->get('contentBody'); ?> |
|
206 | 206 | |
207 | 207 | </div> |
208 | 208 | </div> |
209 | 209 | </div> |
210 | 210 | |
211 | 211 | <div slot="footer" class="card-tools-more"> |
212 | - <div class="btn btn-primary btn-card-more act-add fa" tabindex="<?= $this->get( 'tabindex' ); ?>" |
|
213 | - title="<?= $enc->attr( $this->translate( 'admin', 'Insert new entry (Ctrl+I)' ) ); ?>" |
|
212 | + <div class="btn btn-primary btn-card-more act-add fa" tabindex="<?= $this->get('tabindex'); ?>" |
|
213 | + title="<?= $enc->attr($this->translate('admin', 'Insert new entry (Ctrl+I)')); ?>" |
|
214 | 214 | v-on:click="add()" > |
215 | 215 | </div> |
216 | 216 | </div> |
@@ -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/cms/fields |
@@ -53,72 +53,72 @@ discard block |
||
53 | 53 | * @category Developer |
54 | 54 | */ |
55 | 55 | $default = ['cms.status', 'cms.url', 'cms.label']; |
56 | -$default = $this->config( 'admin/jqadm/cms/fields', $default ); |
|
57 | -$fields = $this->session( 'aimeos/admin/jqadm/cms/fields', $default ); |
|
56 | +$default = $this->config('admin/jqadm/cms/fields', $default); |
|
57 | +$fields = $this->session('aimeos/admin/jqadm/cms/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 | -$searchAttributes = map( $this->get( 'filterAttributes', [] ) )->filter( function( $item ) { |
|
62 | +$searchAttributes = map($this->get('filterAttributes', []))->filter(function($item) { |
|
63 | 63 | return $item->isPublic(); |
64 | -} )->call( 'toArray' )->each( function( &$val ) { |
|
65 | - $val = $this->translate( 'admin/ext', $val['label'] ?? '' ); |
|
64 | +} )->call('toArray')->each(function(&$val) { |
|
65 | + $val = $this->translate('admin/ext', $val['label'] ?? ''); |
|
66 | 66 | } )->all(); |
67 | 67 | |
68 | -$operators = map( $this->get( 'filterOperators/compare', [] ) )->flip()->map( function( $val, $key ) { |
|
69 | - return $this->translate( 'admin/ext', $key ); |
|
68 | +$operators = map($this->get('filterOperators/compare', []))->flip()->map(function($val, $key) { |
|
69 | + return $this->translate('admin/ext', $key); |
|
70 | 70 | } )->all(); |
71 | 71 | |
72 | 72 | $columnList = [ |
73 | - 'cms.id' => $this->translate( 'admin', 'ID' ), |
|
74 | - 'cms.status' => $this->translate( 'admin', 'Status' ), |
|
75 | - 'cms.url' => $this->translate( 'admin', 'URL' ), |
|
76 | - 'cms.label' => $this->translate( 'admin', 'Title' ), |
|
77 | - 'cms.ctime' => $this->translate( 'admin', 'Created' ), |
|
78 | - 'cms.mtime' => $this->translate( 'admin', 'Modified' ), |
|
79 | - 'cms.editor' => $this->translate( 'admin', 'Editor' ), |
|
73 | + 'cms.id' => $this->translate('admin', 'ID'), |
|
74 | + 'cms.status' => $this->translate('admin', 'Status'), |
|
75 | + 'cms.url' => $this->translate('admin', 'URL'), |
|
76 | + 'cms.label' => $this->translate('admin', 'Title'), |
|
77 | + 'cms.ctime' => $this->translate('admin', 'Created'), |
|
78 | + 'cms.mtime' => $this->translate('admin', 'Modified'), |
|
79 | + 'cms.editor' => $this->translate('admin', 'Editor'), |
|
80 | 80 | ]; |
81 | 81 | |
82 | 82 | ?> |
83 | -<?php $this->block()->start( 'jqadm_content' ); ?> |
|
83 | +<?php $this->block()->start('jqadm_content'); ?> |
|
84 | 84 | |
85 | -<?= $this->partial( $this->config( 'admin/jqadm/partial/navsearch', 'common/partials/navsearch-standard' ) ) ?> |
|
85 | +<?= $this->partial($this->config('admin/jqadm/partial/navsearch', 'common/partials/navsearch-standard')) ?> |
|
86 | 86 | |
87 | 87 | <div class="list-view" |
88 | 88 | data-domain="cms" |
89 | - data-items="<?= $enc->attr( $this->get( 'items', map() )->call( 'toArray' )->all() ) ?>"> |
|
89 | + data-items="<?= $enc->attr($this->get('items', map())->call('toArray')->all()) ?>"> |
|
90 | 90 | |
91 | 91 | <nav class="main-navbar"> |
92 | 92 | |
93 | 93 | <span class="navbar-brand"> |
94 | - <?= $enc->html( $this->translate( 'admin', 'CMS pages' ) ); ?> |
|
95 | - <span class="navbar-secondary">(<?= $enc->html( $this->site()->label() ); ?>)</span> |
|
94 | + <?= $enc->html($this->translate('admin', 'CMS pages')); ?> |
|
95 | + <span class="navbar-secondary">(<?= $enc->html($this->site()->label()); ?>)</span> |
|
96 | 96 | </span> |
97 | 97 | |
98 | 98 | <div class="btn fa act-search" v-on:click="search = true" |
99 | - title="<?= $enc->attr( $this->translate( 'admin', 'Show search form' ) ) ?>" |
|
100 | - aria-label="<?= $enc->attr( $this->translate( 'admin', 'Show search form' ) ); ?>"> |
|
99 | + title="<?= $enc->attr($this->translate('admin', 'Show search form')) ?>" |
|
100 | + aria-label="<?= $enc->attr($this->translate('admin', 'Show search form')); ?>"> |
|
101 | 101 | </div> |
102 | 102 | </nav> |
103 | 103 | |
104 | 104 | <nav-search v-bind:show="search" v-on:close="search = false" |
105 | - v-bind:url="'<?= $enc->attr( $this->link( 'admin/jqadm/url/search', map( $searchParams )->except( 'filter' )->all() ) ) ?>'" |
|
106 | - v-bind:filter="<?= $enc->attr( $this->session( 'aimeos/admin/jqadm/cms/filter', [] ) ) ?>" |
|
107 | - v-bind:operators="<?= $enc->attr( $operators ) ?>" |
|
108 | - v-bind:name="'<?= $enc->formparam( ['filter', '_key_', '0'] ) ?>'" |
|
109 | - v-bind:cmss="<?= $enc->attr( $searchAttributes ) ?>"> |
|
105 | + v-bind:url="'<?= $enc->attr($this->link('admin/jqadm/url/search', map($searchParams)->except('filter')->all())) ?>'" |
|
106 | + v-bind:filter="<?= $enc->attr($this->session('aimeos/admin/jqadm/cms/filter', [])) ?>" |
|
107 | + v-bind:operators="<?= $enc->attr($operators) ?>" |
|
108 | + v-bind:name="'<?= $enc->formparam(['filter', '_key_', '0']) ?>'" |
|
109 | + v-bind:cmss="<?= $enc->attr($searchAttributes) ?>"> |
|
110 | 110 | </nav-search> |
111 | 111 | |
112 | 112 | <?= $this->partial( |
113 | - $this->config( 'admin/jqadm/partial/pagination', 'common/partials/pagination-standard' ), |
|
114 | - ['pageParams' => $params, 'pos' => 'top', 'total' => $this->get( 'total' ), |
|
115 | - 'page' => $this->session( 'aimeos/admin/jqadm/cms/page', [] )] |
|
113 | + $this->config('admin/jqadm/partial/pagination', 'common/partials/pagination-standard'), |
|
114 | + ['pageParams' => $params, 'pos' => 'top', 'total' => $this->get('total'), |
|
115 | + 'page' => $this->session('aimeos/admin/jqadm/cms/page', [])] |
|
116 | 116 | ); |
117 | 117 | ?> |
118 | 118 | |
119 | 119 | <form ref="form" class="list list-cms" method="POST" |
120 | - action="<?= $enc->attr( $this->url( $target, $controller, $action, $searchParams, [], $config ) ); ?>" |
|
121 | - data-deleteurl="<?= $enc->attr( $this->url( $delTarget, $delCntl, $delAction, $params, [], $delConfig ) ); ?>"> |
|
120 | + action="<?= $enc->attr($this->url($target, $controller, $action, $searchParams, [], $config)); ?>" |
|
121 | + data-deleteurl="<?= $enc->attr($this->url($delTarget, $delCntl, $delAction, $params, [], $delConfig)); ?>"> |
|
122 | 122 | |
123 | 123 | <?= $this->csrf()->formfield(); ?> |
124 | 124 | |
@@ -128,26 +128,26 @@ discard block |
||
128 | 128 | <th class="select"> |
129 | 129 | <a href="#" class="btn act-delete fa" tabindex="1" |
130 | 130 | v-on:click.prevent.stop="askDelete()" |
131 | - title="<?= $enc->attr( $this->translate( 'admin', 'Delete selected entries' ) ); ?>" |
|
132 | - aria-label="<?= $enc->attr( $this->translate( 'admin', 'Delete' ) ); ?>"> |
|
131 | + title="<?= $enc->attr($this->translate('admin', 'Delete selected entries')); ?>" |
|
132 | + aria-label="<?= $enc->attr($this->translate('admin', 'Delete')); ?>"> |
|
133 | 133 | </a> |
134 | 134 | </th> |
135 | 135 | |
136 | 136 | <?= $this->partial( |
137 | - $this->config( 'admin/jqadm/partial/listhead', 'common/partials/listhead-standard' ), |
|
138 | - ['fields' => $fields, 'params' => $params, 'data' => $columnList, 'sort' => $this->session( 'aimeos/admin/jqadm/cms/sort' )] |
|
137 | + $this->config('admin/jqadm/partial/listhead', 'common/partials/listhead-standard'), |
|
138 | + ['fields' => $fields, 'params' => $params, 'data' => $columnList, 'sort' => $this->session('aimeos/admin/jqadm/cms/sort')] |
|
139 | 139 | ); |
140 | 140 | ?> |
141 | 141 | |
142 | 142 | <th class="actions"> |
143 | 143 | <a class="btn fa act-add" tabindex="1" |
144 | - href="<?= $enc->attr( $this->url( $newTarget, $newCntl, $newAction, $params, [], $newConfig ) ); ?>" |
|
145 | - title="<?= $enc->attr( $this->translate( 'admin', 'Insert new entry (Ctrl+I)' ) ); ?>" |
|
146 | - aria-label="<?= $enc->attr( $this->translate( 'admin', 'Add' ) ); ?>"> |
|
144 | + href="<?= $enc->attr($this->url($newTarget, $newCntl, $newAction, $params, [], $newConfig)); ?>" |
|
145 | + title="<?= $enc->attr($this->translate('admin', 'Insert new entry (Ctrl+I)')); ?>" |
|
146 | + aria-label="<?= $enc->attr($this->translate('admin', 'Add')); ?>"> |
|
147 | 147 | </a> |
148 | 148 | |
149 | 149 | <?= $this->partial( |
150 | - $this->config( 'admin/jqadm/partial/columns', 'common/partials/columns-standard' ), |
|
150 | + $this->config('admin/jqadm/partial/columns', 'common/partials/columns-standard'), |
|
151 | 151 | ['fields' => $fields, 'data' => $columnList] |
152 | 152 | ); |
153 | 153 | ?> |
@@ -157,15 +157,15 @@ discard block |
||
157 | 157 | <tbody> |
158 | 158 | |
159 | 159 | <?= $this->partial( |
160 | - $this->config( 'admin/jqadm/partial/listsearch', 'common/partials/listsearch-standard' ), [ |
|
161 | - 'fields' => array_merge( $fields, ['select'] ), 'filter' => $this->session( 'aimeos/admin/jqadm/cms/filter', [] ), |
|
160 | + $this->config('admin/jqadm/partial/listsearch', 'common/partials/listsearch-standard'), [ |
|
161 | + 'fields' => array_merge($fields, ['select']), 'filter' => $this->session('aimeos/admin/jqadm/cms/filter', []), |
|
162 | 162 | 'data' => [ |
163 | 163 | 'cms.id' => ['op' => '=='], |
164 | 164 | 'cms.status' => ['op' => '==', 'type' => 'select', 'val' => [ |
165 | - '1' => $this->translate( 'mshop/code', 'status:1' ), |
|
166 | - '0' => $this->translate( 'mshop/code', 'status:0' ), |
|
167 | - '-1' => $this->translate( 'mshop/code', 'status:-1' ), |
|
168 | - '-2' => $this->translate( 'mshop/code', 'status:-2' ), |
|
165 | + '1' => $this->translate('mshop/code', 'status:1'), |
|
166 | + '0' => $this->translate('mshop/code', 'status:0'), |
|
167 | + '-1' => $this->translate('mshop/code', 'status:-1'), |
|
168 | + '-2' => $this->translate('mshop/code', 'status:-2'), |
|
169 | 169 | ]], |
170 | 170 | 'cms.url' => [], |
171 | 171 | 'cms.label' => [], |
@@ -176,43 +176,43 @@ discard block |
||
176 | 176 | ] ); |
177 | 177 | ?> |
178 | 178 | |
179 | - <?php foreach( $this->get( 'items', [] ) as $id => $item ) : ?> |
|
180 | - <?php $url = $enc->attr( $this->url( $getTarget, $getCntl, $getAction, ['id' => $id] + $params, [], $getConfig ) ); ?> |
|
181 | - <tr class="list-item <?= $this->site()->readonly( $item->getSiteId() ); ?>" data-label="<?= $enc->attr( $item->getLabel() ) ?>"> |
|
182 | - <td class="select"><input v-on:click="toggle('<?= $id ?>')" v-bind:checked="items['<?= $id ?>'].checked" class="form-check-input" type="checkbox" tabindex="1" name="<?= $enc->attr( $this->formparam( ['id', ''] ) ) ?>" value="<?= $enc->attr( $item->getId() ) ?>" /></td> |
|
183 | - <?php if( in_array( 'cms.id', $fields ) ) : ?> |
|
184 | - <td class="cms-id"><a class="items-field" href="<?= $url; ?>"><?= $enc->html( $item->getId() ); ?></a></td> |
|
179 | + <?php foreach ($this->get('items', []) as $id => $item) : ?> |
|
180 | + <?php $url = $enc->attr($this->url($getTarget, $getCntl, $getAction, ['id' => $id] + $params, [], $getConfig)); ?> |
|
181 | + <tr class="list-item <?= $this->site()->readonly($item->getSiteId()); ?>" data-label="<?= $enc->attr($item->getLabel()) ?>"> |
|
182 | + <td class="select"><input v-on:click="toggle('<?= $id ?>')" v-bind:checked="items['<?= $id ?>'].checked" class="form-check-input" type="checkbox" tabindex="1" name="<?= $enc->attr($this->formparam(['id', ''])) ?>" value="<?= $enc->attr($item->getId()) ?>" /></td> |
|
183 | + <?php if (in_array('cms.id', $fields)) : ?> |
|
184 | + <td class="cms-id"><a class="items-field" href="<?= $url; ?>"><?= $enc->html($item->getId()); ?></a></td> |
|
185 | 185 | <?php endif; ?> |
186 | - <?php if( in_array( 'cms.status', $fields ) ) : ?> |
|
187 | - <td class="cms-status"><a class="items-field" href="<?= $url; ?>"><div class="fa status-<?= $enc->attr( $item->getStatus() ); ?>"></div></a></td> |
|
186 | + <?php if (in_array('cms.status', $fields)) : ?> |
|
187 | + <td class="cms-status"><a class="items-field" href="<?= $url; ?>"><div class="fa status-<?= $enc->attr($item->getStatus()); ?>"></div></a></td> |
|
188 | 188 | <?php endif; ?> |
189 | - <?php if( in_array( 'cms.url', $fields ) ) : ?> |
|
190 | - <td class="cms-url"><a class="items-field" href="<?= $url; ?>"><?= $enc->html( $item->getUrl() ); ?></a></td> |
|
189 | + <?php if (in_array('cms.url', $fields)) : ?> |
|
190 | + <td class="cms-url"><a class="items-field" href="<?= $url; ?>"><?= $enc->html($item->getUrl()); ?></a></td> |
|
191 | 191 | <?php endif; ?> |
192 | - <?php if( in_array( 'cms.label', $fields ) ) : ?> |
|
193 | - <td class="cms-label"><a class="items-field" href="<?= $url; ?>"><?= $enc->html( $item->getLabel() ); ?></a></td> |
|
192 | + <?php if (in_array('cms.label', $fields)) : ?> |
|
193 | + <td class="cms-label"><a class="items-field" href="<?= $url; ?>"><?= $enc->html($item->getLabel()); ?></a></td> |
|
194 | 194 | <?php endif; ?> |
195 | - <?php if( in_array( 'cms.ctime', $fields ) ) : ?> |
|
196 | - <td class="cms-ctime"><a class="items-field" href="<?= $url; ?>"><?= $enc->html( $item->getTimeCreated() ); ?></a></td> |
|
195 | + <?php if (in_array('cms.ctime', $fields)) : ?> |
|
196 | + <td class="cms-ctime"><a class="items-field" href="<?= $url; ?>"><?= $enc->html($item->getTimeCreated()); ?></a></td> |
|
197 | 197 | <?php endif; ?> |
198 | - <?php if( in_array( 'cms.mtime', $fields ) ) : ?> |
|
199 | - <td class="cms-mtime"><a class="items-field" href="<?= $url; ?>"><?= $enc->html( $item->getTimeModified() ); ?></a></td> |
|
198 | + <?php if (in_array('cms.mtime', $fields)) : ?> |
|
199 | + <td class="cms-mtime"><a class="items-field" href="<?= $url; ?>"><?= $enc->html($item->getTimeModified()); ?></a></td> |
|
200 | 200 | <?php endif; ?> |
201 | - <?php if( in_array( 'cms.editor', $fields ) ) : ?> |
|
202 | - <td class="cms-editor"><a class="items-field" href="<?= $url; ?>"><?= $enc->html( $item->getEditor() ); ?></a></td> |
|
201 | + <?php if (in_array('cms.editor', $fields)) : ?> |
|
202 | + <td class="cms-editor"><a class="items-field" href="<?= $url; ?>"><?= $enc->html($item->getEditor()); ?></a></td> |
|
203 | 203 | <?php endif; ?> |
204 | 204 | |
205 | 205 | <td class="actions"> |
206 | 206 | <a class="btn act-copy fa" tabindex="1" |
207 | - href="<?= $enc->attr( $this->url( $copyTarget, $copyCntl, $copyAction, ['id' => $id] + $params, [], $copyConfig ) ); ?>" |
|
208 | - title="<?= $enc->attr( $this->translate( 'admin', 'Copy this entry' ) ); ?>" |
|
209 | - aria-label="<?= $enc->attr( $this->translate( 'admin', 'Copy' ) ); ?>"> |
|
207 | + href="<?= $enc->attr($this->url($copyTarget, $copyCntl, $copyAction, ['id' => $id] + $params, [], $copyConfig)); ?>" |
|
208 | + title="<?= $enc->attr($this->translate('admin', 'Copy this entry')); ?>" |
|
209 | + aria-label="<?= $enc->attr($this->translate('admin', 'Copy')); ?>"> |
|
210 | 210 | </a> |
211 | - <?php if( !$this->site()->readonly( $item->getSiteId() ) ) : ?> |
|
211 | + <?php if (!$this->site()->readonly($item->getSiteId())) : ?> |
|
212 | 212 | <a class="btn act-delete fa" tabindex="1" href="#" |
213 | - v-on:click.prevent.stop="askDelete('<?= $enc->attr( $id ) ?>')" |
|
214 | - title="<?= $enc->attr( $this->translate( 'admin', 'Delete this entry' ) ); ?>" |
|
215 | - aria-label="<?= $enc->attr( $this->translate( 'admin', 'Delete' ) ); ?>"> |
|
213 | + v-on:click.prevent.stop="askDelete('<?= $enc->attr($id) ?>')" |
|
214 | + title="<?= $enc->attr($this->translate('admin', 'Delete this entry')); ?>" |
|
215 | + aria-label="<?= $enc->attr($this->translate('admin', 'Delete')); ?>"> |
|
216 | 216 | </a> |
217 | 217 | <?php endif; ?> |
218 | 218 | </td> |
@@ -221,15 +221,15 @@ discard block |
||
221 | 221 | </tbody> |
222 | 222 | </table> |
223 | 223 | |
224 | - <?php if( $this->get( 'items', map() )->isEmpty() ) : ?> |
|
225 | - <div class="noitems"><?= $enc->html( sprintf( $this->translate( 'admin', 'No items found' ) ) ); ?></div> |
|
224 | + <?php if ($this->get('items', map())->isEmpty()) : ?> |
|
225 | + <div class="noitems"><?= $enc->html(sprintf($this->translate('admin', 'No items found'))); ?></div> |
|
226 | 226 | <?php endif; ?> |
227 | 227 | </form> |
228 | 228 | |
229 | 229 | <?= $this->partial( |
230 | - $this->config( 'admin/jqadm/partial/pagination', 'common/partials/pagination-standard' ), |
|
231 | - ['pageParams' => $params, 'pos' => 'bottom', 'total' => $this->get( 'total' ), |
|
232 | - 'page' => $this->session( 'aimeos/admin/jqadm/cms/page', [] )] |
|
230 | + $this->config('admin/jqadm/partial/pagination', 'common/partials/pagination-standard'), |
|
231 | + ['pageParams' => $params, 'pos' => 'bottom', 'total' => $this->get('total'), |
|
232 | + 'page' => $this->session('aimeos/admin/jqadm/cms/page', [])] |
|
233 | 233 | ); |
234 | 234 | ?> |
235 | 235 | |
@@ -239,4 +239,4 @@ discard block |
||
239 | 239 | </div> |
240 | 240 | <?php $this->block()->stop(); ?> |
241 | 241 | |
242 | -<?= $this->render( $this->config( 'admin/jqadm/template/page', 'common/page-standard' ) ); ?> |
|
242 | +<?= $this->render($this->config('admin/jqadm/template/page', 'common/page-standard')); ?> |
@@ -17,16 +17,16 @@ discard block |
||
17 | 17 | |
18 | 18 | $includepaths = $aimeos->getIncludePaths(); |
19 | 19 | $includepaths[] = get_include_path(); |
20 | - set_include_path( implode( PATH_SEPARATOR, $includepaths ) ); |
|
20 | + set_include_path(implode(PATH_SEPARATOR, $includepaths)); |
|
21 | 21 | } |
22 | 22 | |
23 | 23 | |
24 | 24 | public static function getAimeos() |
25 | 25 | { |
26 | - if( !isset( self::$aimeos ) ) |
|
26 | + if (!isset(self::$aimeos)) |
|
27 | 27 | { |
28 | 28 | require_once 'Bootstrap.php'; |
29 | - spl_autoload_register( 'Aimeos\\Bootstrap::autoload' ); |
|
29 | + spl_autoload_register('Aimeos\\Bootstrap::autoload'); |
|
30 | 30 | |
31 | 31 | self::$aimeos = new \Aimeos\Bootstrap(); |
32 | 32 | } |
@@ -35,60 +35,60 @@ discard block |
||
35 | 35 | } |
36 | 36 | |
37 | 37 | |
38 | - public static function getContext( $site = 'unittest' ) |
|
38 | + public static function getContext($site = 'unittest') |
|
39 | 39 | { |
40 | - if( !isset( self::$context[$site] ) ) { |
|
41 | - self::$context[$site] = self::createContext( $site ); |
|
40 | + if (!isset(self::$context[$site])) { |
|
41 | + self::$context[$site] = self::createContext($site); |
|
42 | 42 | } |
43 | 43 | |
44 | 44 | return clone self::$context[$site]; |
45 | 45 | } |
46 | 46 | |
47 | 47 | |
48 | - public static function getView( $site = 'unittest', \Aimeos\MW\Config\Iface $config = null ) |
|
48 | + public static function getView($site = 'unittest', \Aimeos\MW\Config\Iface $config = null) |
|
49 | 49 | { |
50 | - if( $config === null ) { |
|
51 | - $config = self::getContext( $site )->getConfig(); |
|
50 | + if ($config === null) { |
|
51 | + $config = self::getContext($site)->getConfig(); |
|
52 | 52 | } |
53 | 53 | |
54 | - $view = new \Aimeos\MW\View\Standard( self::getTemplatePaths() ); |
|
54 | + $view = new \Aimeos\MW\View\Standard(self::getTemplatePaths()); |
|
55 | 55 | |
56 | - $helper = new \Aimeos\MW\View\Helper\Param\Standard( $view, ['site' => 'unittest'] ); |
|
57 | - $view->addHelper( 'param', $helper ); |
|
56 | + $helper = new \Aimeos\MW\View\Helper\Param\Standard($view, ['site' => 'unittest']); |
|
57 | + $view->addHelper('param', $helper); |
|
58 | 58 | |
59 | - $trans = new \Aimeos\MW\Translation\None( 'de_DE' ); |
|
60 | - $helper = new \Aimeos\MW\View\Helper\Translate\Standard( $view, $trans ); |
|
61 | - $view->addHelper( 'translate', $helper ); |
|
59 | + $trans = new \Aimeos\MW\Translation\None('de_DE'); |
|
60 | + $helper = new \Aimeos\MW\View\Helper\Translate\Standard($view, $trans); |
|
61 | + $view->addHelper('translate', $helper); |
|
62 | 62 | |
63 | - $helper = new \Aimeos\MW\View\Helper\Url\Standard( $view, 'http://baseurl' ); |
|
64 | - $view->addHelper( 'url', $helper ); |
|
63 | + $helper = new \Aimeos\MW\View\Helper\Url\Standard($view, 'http://baseurl'); |
|
64 | + $view->addHelper('url', $helper); |
|
65 | 65 | |
66 | - $helper = new \Aimeos\MW\View\Helper\Number\Standard( $view, '.', '' ); |
|
67 | - $view->addHelper( 'number', $helper ); |
|
66 | + $helper = new \Aimeos\MW\View\Helper\Number\Standard($view, '.', ''); |
|
67 | + $view->addHelper('number', $helper); |
|
68 | 68 | |
69 | - $helper = new \Aimeos\MW\View\Helper\Date\Standard( $view, 'Y-m-d' ); |
|
70 | - $view->addHelper( 'date', $helper ); |
|
69 | + $helper = new \Aimeos\MW\View\Helper\Date\Standard($view, 'Y-m-d'); |
|
70 | + $view->addHelper('date', $helper); |
|
71 | 71 | |
72 | - $config = new \Aimeos\MW\Config\Decorator\Protect( $config, array( 'admin', 'client/html', 'controller/jsonadm' ) ); |
|
73 | - $helper = new \Aimeos\MW\View\Helper\Config\Standard( $view, $config ); |
|
74 | - $view->addHelper( 'config', $helper ); |
|
72 | + $config = new \Aimeos\MW\Config\Decorator\Protect($config, array('admin', 'client/html', 'controller/jsonadm')); |
|
73 | + $helper = new \Aimeos\MW\View\Helper\Config\Standard($view, $config); |
|
74 | + $view->addHelper('config', $helper); |
|
75 | 75 | |
76 | - $helper = new \Aimeos\MW\View\Helper\Session\Standard( $view, new \Aimeos\MW\Session\None() ); |
|
77 | - $view->addHelper( 'session', $helper ); |
|
76 | + $helper = new \Aimeos\MW\View\Helper\Session\Standard($view, new \Aimeos\MW\Session\None()); |
|
77 | + $view->addHelper('session', $helper); |
|
78 | 78 | |
79 | 79 | $psr17Factory = new \Nyholm\Psr7\Factory\Psr17Factory(); |
80 | - $helper = new \Aimeos\MW\View\Helper\Request\Standard( $view, $psr17Factory->createServerRequest( 'GET', 'https://aimeos.org' ) ); |
|
81 | - $view->addHelper( 'request', $helper ); |
|
80 | + $helper = new \Aimeos\MW\View\Helper\Request\Standard($view, $psr17Factory->createServerRequest('GET', 'https://aimeos.org')); |
|
81 | + $view->addHelper('request', $helper); |
|
82 | 82 | |
83 | - $helper = new \Aimeos\MW\View\Helper\Response\Standard( $view, $psr17Factory->createResponse() ); |
|
84 | - $view->addHelper( 'response', $helper ); |
|
83 | + $helper = new \Aimeos\MW\View\Helper\Response\Standard($view, $psr17Factory->createResponse()); |
|
84 | + $view->addHelper('response', $helper); |
|
85 | 85 | |
86 | - $helper = new \Aimeos\MW\View\Helper\Csrf\Standard( $view, '_csrf_token', '_csrf_value' ); |
|
87 | - $view->addHelper( 'csrf', $helper ); |
|
86 | + $helper = new \Aimeos\MW\View\Helper\Csrf\Standard($view, '_csrf_token', '_csrf_value'); |
|
87 | + $view->addHelper('csrf', $helper); |
|
88 | 88 | |
89 | - $fcn = function() { return array( 'admin' ); }; |
|
90 | - $helper = new \Aimeos\MW\View\Helper\Access\Standard( $view, $fcn ); |
|
91 | - $view->addHelper( 'access', $helper ); |
|
89 | + $fcn = function() { return array('admin'); }; |
|
90 | + $helper = new \Aimeos\MW\View\Helper\Access\Standard($view, $fcn); |
|
91 | + $view->addHelper('access', $helper); |
|
92 | 92 | |
93 | 93 | $view->pageSitePath = []; |
94 | 94 | |
@@ -98,11 +98,11 @@ discard block |
||
98 | 98 | |
99 | 99 | public static function getTemplatePaths() |
100 | 100 | { |
101 | - return self::getAimeos()->getCustomPaths( 'admin/jqadm/templates' ); |
|
101 | + return self::getAimeos()->getCustomPaths('admin/jqadm/templates'); |
|
102 | 102 | } |
103 | 103 | |
104 | 104 | |
105 | - private static function createContext( $site ) |
|
105 | + private static function createContext($site) |
|
106 | 106 | { |
107 | 107 | $ctx = new \Aimeos\MShop\Context\Item\Standard(); |
108 | 108 | $aimeos = self::getAimeos(); |
@@ -111,36 +111,36 @@ discard block |
||
111 | 111 | $paths = $aimeos->getConfigPaths(); |
112 | 112 | $paths[] = __DIR__ . DIRECTORY_SEPARATOR . 'config'; |
113 | 113 | |
114 | - $conf = new \Aimeos\MW\Config\PHPArray( array(), $paths ); |
|
115 | - $ctx->setConfig( $conf ); |
|
114 | + $conf = new \Aimeos\MW\Config\PHPArray(array(), $paths); |
|
115 | + $ctx->setConfig($conf); |
|
116 | 116 | |
117 | 117 | |
118 | - $dbm = new \Aimeos\MW\DB\Manager\DBAL( $conf ); |
|
119 | - $ctx->setDatabaseManager( $dbm ); |
|
118 | + $dbm = new \Aimeos\MW\DB\Manager\DBAL($conf); |
|
119 | + $ctx->setDatabaseManager($dbm); |
|
120 | 120 | |
121 | 121 | |
122 | - $logger = new \Aimeos\MW\Logger\File( $site . '.log', \Aimeos\MW\Logger\Base::DEBUG ); |
|
123 | - $ctx->setLogger( $logger ); |
|
122 | + $logger = new \Aimeos\MW\Logger\File($site . '.log', \Aimeos\MW\Logger\Base::DEBUG); |
|
123 | + $ctx->setLogger($logger); |
|
124 | 124 | |
125 | 125 | |
126 | 126 | $cache = new \Aimeos\MW\Cache\None(); |
127 | - $ctx->setCache( $cache ); |
|
127 | + $ctx->setCache($cache); |
|
128 | 128 | |
129 | 129 | |
130 | - $i18n = new \Aimeos\MW\Translation\None( 'en' ); |
|
131 | - $ctx->setI18n( array( 'en' => $i18n ) ); |
|
130 | + $i18n = new \Aimeos\MW\Translation\None('en'); |
|
131 | + $ctx->setI18n(array('en' => $i18n)); |
|
132 | 132 | |
133 | 133 | |
134 | 134 | $session = new \Aimeos\MW\Session\None(); |
135 | - $ctx->setSession( $session ); |
|
135 | + $ctx->setSession($session); |
|
136 | 136 | |
137 | 137 | |
138 | - $localeManager = \Aimeos\MShop\Locale\Manager\Factory::create( $ctx ); |
|
139 | - $locale = $localeManager->bootstrap( $site, '', '', false ); |
|
140 | - $ctx->setLocale( $locale ); |
|
138 | + $localeManager = \Aimeos\MShop\Locale\Manager\Factory::create($ctx); |
|
139 | + $locale = $localeManager->bootstrap($site, '', '', false); |
|
140 | + $ctx->setLocale($locale); |
|
141 | 141 | |
142 | 142 | |
143 | - $ctx->setEditor( 'ai-cms-grapejs:admin/jqadm' ); |
|
143 | + $ctx->setEditor('ai-cms-grapejs:admin/jqadm'); |
|
144 | 144 | |
145 | 145 | return $ctx; |
146 | 146 | } |
@@ -17,42 +17,42 @@ |
||
17 | 17 | protected function setUp() : void |
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\Cms\Lists\Factory::create( $this->context ); |
|
27 | - $this->assertInstanceOf( '\\Aimeos\\Admin\\JQAdm\\Iface', $client ); |
|
26 | + $client = \Aimeos\Admin\JQAdm\Type\Cms\Lists\Factory::create($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\Cms\Lists\Factory::create( $this->context, 'Standard' ); |
|
34 | - $this->assertInstanceOf( '\\Aimeos\\Admin\\JQAdm\\Iface', $client ); |
|
33 | + $client = \Aimeos\Admin\JQAdm\Type\Cms\Lists\Factory::create($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->expectException( '\\Aimeos\\Admin\\JQAdm\\Exception' ); |
|
41 | - \Aimeos\Admin\JQAdm\Type\Cms\Lists\Factory::create( $this->context, '' ); |
|
40 | + $this->expectException('\\Aimeos\\Admin\\JQAdm\\Exception'); |
|
41 | + \Aimeos\Admin\JQAdm\Type\Cms\Lists\Factory::create($this->context, ''); |
|
42 | 42 | } |
43 | 43 | |
44 | 44 | |
45 | 45 | public function testCreateClientNameInvalid() |
46 | 46 | { |
47 | - $this->expectException( '\\Aimeos\\Admin\\JQAdm\\Exception' ); |
|
48 | - \Aimeos\Admin\JQAdm\Type\Cms\Lists\Factory::create( $this->context, '%type/cms/lists' ); |
|
47 | + $this->expectException('\\Aimeos\\Admin\\JQAdm\\Exception'); |
|
48 | + \Aimeos\Admin\JQAdm\Type\Cms\Lists\Factory::create($this->context, '%type/cms/lists'); |
|
49 | 49 | } |
50 | 50 | |
51 | 51 | |
52 | 52 | public function testCreateClientNameNotFound() |
53 | 53 | { |
54 | - $this->expectException( '\\Aimeos\\Admin\\JQAdm\\Exception' ); |
|
55 | - \Aimeos\Admin\JQAdm\Type\Cms\Lists\Factory::create( $this->context, 'test' ); |
|
54 | + $this->expectException('\\Aimeos\\Admin\\JQAdm\\Exception'); |
|
55 | + \Aimeos\Admin\JQAdm\Type\Cms\Lists\Factory::create($this->context, 'test'); |
|
56 | 56 | } |
57 | 57 | |
58 | 58 | } |
@@ -21,16 +21,16 @@ discard block |
||
21 | 21 | $this->view = \TestHelperJqadm::getView(); |
22 | 22 | $this->context = \TestHelperJqadm::getContext(); |
23 | 23 | |
24 | - $this->object = new \Aimeos\Admin\JQAdm\Type\Cms\Lists\Standard( $this->context ); |
|
25 | - $this->object = new \Aimeos\Admin\JQAdm\Common\Decorator\Page( $this->object, $this->context ); |
|
26 | - $this->object->setAimeos( \TestHelperJqadm::getAimeos() ); |
|
27 | - $this->object->setView( $this->view ); |
|
24 | + $this->object = new \Aimeos\Admin\JQAdm\Type\Cms\Lists\Standard($this->context); |
|
25 | + $this->object = new \Aimeos\Admin\JQAdm\Common\Decorator\Page($this->object, $this->context); |
|
26 | + $this->object->setAimeos(\TestHelperJqadm::getAimeos()); |
|
27 | + $this->object->setView($this->view); |
|
28 | 28 | } |
29 | 29 | |
30 | 30 | |
31 | 31 | protected function tearDown() : void |
32 | 32 | { |
33 | - unset( $this->object, $this->view, $this->context ); |
|
33 | + unset($this->object, $this->view, $this->context); |
|
34 | 34 | } |
35 | 35 | |
36 | 36 | |
@@ -38,22 +38,22 @@ discard block |
||
38 | 38 | { |
39 | 39 | $result = $this->object->create(); |
40 | 40 | |
41 | - $this->assertStringContainsString( 'item-cms-lists-type', $result ); |
|
42 | - $this->assertEmpty( $this->view->get( 'errors' ) ); |
|
41 | + $this->assertStringContainsString('item-cms-lists-type', $result); |
|
42 | + $this->assertEmpty($this->view->get('errors')); |
|
43 | 43 | } |
44 | 44 | |
45 | 45 | |
46 | 46 | public function testCreateException() |
47 | 47 | { |
48 | - $object = $this->getMockBuilder( \Aimeos\Admin\JQAdm\Type\Cms\Lists\Standard::class ) |
|
49 | - ->setConstructorArgs( array( $this->context, \TestHelperJqadm::getTemplatePaths() ) ) |
|
50 | - ->setMethods( array( 'getSubClients' ) ) |
|
48 | + $object = $this->getMockBuilder(\Aimeos\Admin\JQAdm\Type\Cms\Lists\Standard::class) |
|
49 | + ->setConstructorArgs(array($this->context, \TestHelperJqadm::getTemplatePaths())) |
|
50 | + ->setMethods(array('getSubClients')) |
|
51 | 51 | ->getMock(); |
52 | 52 | |
53 | - $object->expects( $this->once() )->method( 'getSubClients' ) |
|
54 | - ->will( $this->throwException( new \RuntimeException() ) ); |
|
53 | + $object->expects($this->once())->method('getSubClients') |
|
54 | + ->will($this->throwException(new \RuntimeException())); |
|
55 | 55 | |
56 | - $object->setView( $this->getViewNoRender() ); |
|
56 | + $object->setView($this->getViewNoRender()); |
|
57 | 57 | |
58 | 58 | $object->create(); |
59 | 59 | } |
@@ -61,29 +61,29 @@ discard block |
||
61 | 61 | |
62 | 62 | public function testCopy() |
63 | 63 | { |
64 | - $manager = \Aimeos\MShop::create( $this->context, 'cms/lists/type' ); |
|
64 | + $manager = \Aimeos\MShop::create($this->context, 'cms/lists/type'); |
|
65 | 65 | |
66 | - $param = ['type' => 'unittest', 'id' => $manager->find( 'default', [], 'text' )->getId()]; |
|
67 | - $helper = new \Aimeos\MW\View\Helper\Param\Standard( $this->view, $param ); |
|
68 | - $this->view->addHelper( 'param', $helper ); |
|
66 | + $param = ['type' => 'unittest', 'id' => $manager->find('default', [], 'text')->getId()]; |
|
67 | + $helper = new \Aimeos\MW\View\Helper\Param\Standard($this->view, $param); |
|
68 | + $this->view->addHelper('param', $helper); |
|
69 | 69 | |
70 | 70 | $result = $this->object->copy(); |
71 | 71 | |
72 | - $this->assertStringContainsString( 'default', $result ); |
|
72 | + $this->assertStringContainsString('default', $result); |
|
73 | 73 | } |
74 | 74 | |
75 | 75 | |
76 | 76 | public function testCopyException() |
77 | 77 | { |
78 | - $object = $this->getMockBuilder( \Aimeos\Admin\JQAdm\Type\Cms\Lists\Standard::class ) |
|
79 | - ->setConstructorArgs( array( $this->context, \TestHelperJqadm::getTemplatePaths() ) ) |
|
80 | - ->setMethods( array( 'getSubClients' ) ) |
|
78 | + $object = $this->getMockBuilder(\Aimeos\Admin\JQAdm\Type\Cms\Lists\Standard::class) |
|
79 | + ->setConstructorArgs(array($this->context, \TestHelperJqadm::getTemplatePaths())) |
|
80 | + ->setMethods(array('getSubClients')) |
|
81 | 81 | ->getMock(); |
82 | 82 | |
83 | - $object->expects( $this->once() )->method( 'getSubClients' ) |
|
84 | - ->will( $this->throwException( new \RuntimeException() ) ); |
|
83 | + $object->expects($this->once())->method('getSubClients') |
|
84 | + ->will($this->throwException(new \RuntimeException())); |
|
85 | 85 | |
86 | - $object->setView( $this->getViewNoRender() ); |
|
86 | + $object->setView($this->getViewNoRender()); |
|
87 | 87 | |
88 | 88 | $object->copy(); |
89 | 89 | } |
@@ -91,21 +91,21 @@ discard block |
||
91 | 91 | |
92 | 92 | public function testDelete() |
93 | 93 | { |
94 | - $this->assertNull( $this->getClientMock( ['redirect'], false )->delete() ); |
|
94 | + $this->assertNull($this->getClientMock(['redirect'], false)->delete()); |
|
95 | 95 | } |
96 | 96 | |
97 | 97 | |
98 | 98 | public function testDeleteException() |
99 | 99 | { |
100 | - $object = $this->getMockBuilder( \Aimeos\Admin\JQAdm\Type\Cms\Lists\Standard::class ) |
|
101 | - ->setConstructorArgs( array( $this->context, \TestHelperJqadm::getTemplatePaths() ) ) |
|
102 | - ->setMethods( array( 'getSubClients', 'search' ) ) |
|
100 | + $object = $this->getMockBuilder(\Aimeos\Admin\JQAdm\Type\Cms\Lists\Standard::class) |
|
101 | + ->setConstructorArgs(array($this->context, \TestHelperJqadm::getTemplatePaths())) |
|
102 | + ->setMethods(array('getSubClients', 'search')) |
|
103 | 103 | ->getMock(); |
104 | 104 | |
105 | - $object->expects( $this->once() )->method( 'getSubClients' ) |
|
106 | - ->will( $this->throwException( new \RuntimeException() ) ); |
|
105 | + $object->expects($this->once())->method('getSubClients') |
|
106 | + ->will($this->throwException(new \RuntimeException())); |
|
107 | 107 | |
108 | - $object->setView( $this->getViewNoRender() ); |
|
108 | + $object->setView($this->getViewNoRender()); |
|
109 | 109 | |
110 | 110 | $object->delete(); |
111 | 111 | } |
@@ -113,29 +113,29 @@ discard block |
||
113 | 113 | |
114 | 114 | public function testGet() |
115 | 115 | { |
116 | - $manager = \Aimeos\MShop::create( $this->context, 'cms/lists/type' ); |
|
116 | + $manager = \Aimeos\MShop::create($this->context, 'cms/lists/type'); |
|
117 | 117 | |
118 | - $param = ['type' => 'unittest', 'id' => $manager->find( 'default', [], 'text' )->getId()]; |
|
119 | - $helper = new \Aimeos\MW\View\Helper\Param\Standard( $this->view, $param ); |
|
120 | - $this->view->addHelper( 'param', $helper ); |
|
118 | + $param = ['type' => 'unittest', 'id' => $manager->find('default', [], 'text')->getId()]; |
|
119 | + $helper = new \Aimeos\MW\View\Helper\Param\Standard($this->view, $param); |
|
120 | + $this->view->addHelper('param', $helper); |
|
121 | 121 | |
122 | 122 | $result = $this->object->get(); |
123 | 123 | |
124 | - $this->assertStringContainsString( 'default', $result ); |
|
124 | + $this->assertStringContainsString('default', $result); |
|
125 | 125 | } |
126 | 126 | |
127 | 127 | |
128 | 128 | public function testGetException() |
129 | 129 | { |
130 | - $object = $this->getMockBuilder( \Aimeos\Admin\JQAdm\Type\Cms\Lists\Standard::class ) |
|
131 | - ->setConstructorArgs( array( $this->context, \TestHelperJqadm::getTemplatePaths() ) ) |
|
132 | - ->setMethods( array( 'getSubClients' ) ) |
|
130 | + $object = $this->getMockBuilder(\Aimeos\Admin\JQAdm\Type\Cms\Lists\Standard::class) |
|
131 | + ->setConstructorArgs(array($this->context, \TestHelperJqadm::getTemplatePaths())) |
|
132 | + ->setMethods(array('getSubClients')) |
|
133 | 133 | ->getMock(); |
134 | 134 | |
135 | - $object->expects( $this->once() )->method( 'getSubClients' ) |
|
136 | - ->will( $this->throwException( new \RuntimeException() ) ); |
|
135 | + $object->expects($this->once())->method('getSubClients') |
|
136 | + ->will($this->throwException(new \RuntimeException())); |
|
137 | 137 | |
138 | - $object->setView( $this->getViewNoRender() ); |
|
138 | + $object->setView($this->getViewNoRender()); |
|
139 | 139 | |
140 | 140 | $object->get(); |
141 | 141 | } |
@@ -143,16 +143,16 @@ discard block |
||
143 | 143 | |
144 | 144 | public function testGetViewException() |
145 | 145 | { |
146 | - $object = new \Aimeos\Admin\JQAdm\Type\Cms\Lists\Standard( $this->context, [] ); |
|
146 | + $object = new \Aimeos\Admin\JQAdm\Type\Cms\Lists\Standard($this->context, []); |
|
147 | 147 | |
148 | - $this->expectException( \Aimeos\Admin\JQAdm\Exception::class ); |
|
148 | + $this->expectException(\Aimeos\Admin\JQAdm\Exception::class); |
|
149 | 149 | $object->getView(); |
150 | 150 | } |
151 | 151 | |
152 | 152 | |
153 | 153 | public function testSave() |
154 | 154 | { |
155 | - $manager = \Aimeos\MShop::create( $this->context, 'cms/lists/type' ); |
|
155 | + $manager = \Aimeos\MShop::create($this->context, 'cms/lists/type'); |
|
156 | 156 | |
157 | 157 | $param = array( |
158 | 158 | 'type' => 'unittest', |
@@ -165,29 +165,29 @@ discard block |
||
165 | 165 | ), |
166 | 166 | ); |
167 | 167 | |
168 | - $helper = new \Aimeos\MW\View\Helper\Param\Standard( $this->view, $param ); |
|
169 | - $this->view->addHelper( 'param', $helper ); |
|
168 | + $helper = new \Aimeos\MW\View\Helper\Param\Standard($this->view, $param); |
|
169 | + $this->view->addHelper('param', $helper); |
|
170 | 170 | |
171 | 171 | $result = $this->object->save(); |
172 | 172 | |
173 | - $manager->delete( $manager->find( 'jqadm@test', [], 'text' )->getId() ); |
|
173 | + $manager->delete($manager->find('jqadm@test', [], 'text')->getId()); |
|
174 | 174 | |
175 | - $this->assertEmpty( $this->view->get( 'errors' ) ); |
|
176 | - $this->assertNull( $result ); |
|
175 | + $this->assertEmpty($this->view->get('errors')); |
|
176 | + $this->assertNull($result); |
|
177 | 177 | } |
178 | 178 | |
179 | 179 | |
180 | 180 | public function testSaveException() |
181 | 181 | { |
182 | - $object = $this->getMockBuilder( \Aimeos\Admin\JQAdm\Type\Cms\Lists\Standard::class ) |
|
183 | - ->setConstructorArgs( array( $this->context, \TestHelperJqadm::getTemplatePaths() ) ) |
|
184 | - ->setMethods( array( 'fromArray' ) ) |
|
182 | + $object = $this->getMockBuilder(\Aimeos\Admin\JQAdm\Type\Cms\Lists\Standard::class) |
|
183 | + ->setConstructorArgs(array($this->context, \TestHelperJqadm::getTemplatePaths())) |
|
184 | + ->setMethods(array('fromArray')) |
|
185 | 185 | ->getMock(); |
186 | 186 | |
187 | - $object->expects( $this->once() )->method( 'fromArray' ) |
|
188 | - ->will( $this->throwException( new \RuntimeException() ) ); |
|
187 | + $object->expects($this->once())->method('fromArray') |
|
188 | + ->will($this->throwException(new \RuntimeException())); |
|
189 | 189 | |
190 | - $object->setView( $this->getViewNoRender() ); |
|
190 | + $object->setView($this->getViewNoRender()); |
|
191 | 191 | |
192 | 192 | $object->save(); |
193 | 193 | } |
@@ -198,32 +198,32 @@ discard block |
||
198 | 198 | $param = array( |
199 | 199 | 'type' => 'unittest', 'lang' => 'de', |
200 | 200 | 'filter' => array( |
201 | - 'key' => array( 0 => 'cms.lists.type.code' ), |
|
202 | - 'op' => array( 0 => '==' ), |
|
203 | - 'val' => array( 0 => 'default' ), |
|
201 | + 'key' => array(0 => 'cms.lists.type.code'), |
|
202 | + 'op' => array(0 => '=='), |
|
203 | + 'val' => array(0 => 'default'), |
|
204 | 204 | ), |
205 | - 'sort' => array( '-cms.lists.type.id' ), |
|
205 | + 'sort' => array('-cms.lists.type.id'), |
|
206 | 206 | ); |
207 | - $helper = new \Aimeos\MW\View\Helper\Param\Standard( $this->view, $param ); |
|
208 | - $this->view->addHelper( 'param', $helper ); |
|
207 | + $helper = new \Aimeos\MW\View\Helper\Param\Standard($this->view, $param); |
|
208 | + $this->view->addHelper('param', $helper); |
|
209 | 209 | |
210 | 210 | $result = $this->object->search(); |
211 | 211 | |
212 | - $this->assertStringContainsString( '>default<', $result ); |
|
212 | + $this->assertStringContainsString('>default<', $result); |
|
213 | 213 | } |
214 | 214 | |
215 | 215 | |
216 | 216 | public function testSearchException() |
217 | 217 | { |
218 | - $object = $this->getMockBuilder( \Aimeos\Admin\JQAdm\Type\Cms\Lists\Standard::class ) |
|
219 | - ->setConstructorArgs( array( $this->context, \TestHelperJqadm::getTemplatePaths() ) ) |
|
220 | - ->setMethods( array( 'initCriteria' ) ) |
|
218 | + $object = $this->getMockBuilder(\Aimeos\Admin\JQAdm\Type\Cms\Lists\Standard::class) |
|
219 | + ->setConstructorArgs(array($this->context, \TestHelperJqadm::getTemplatePaths())) |
|
220 | + ->setMethods(array('initCriteria')) |
|
221 | 221 | ->getMock(); |
222 | 222 | |
223 | - $object->expects( $this->once() )->method( 'initCriteria' ) |
|
224 | - ->will( $this->throwException( new \RuntimeException() ) ); |
|
223 | + $object->expects($this->once())->method('initCriteria') |
|
224 | + ->will($this->throwException(new \RuntimeException())); |
|
225 | 225 | |
226 | - $object->setView( $this->getViewNoRender() ); |
|
226 | + $object->setView($this->getViewNoRender()); |
|
227 | 227 | |
228 | 228 | $object->search(); |
229 | 229 | } |
@@ -231,50 +231,50 @@ discard block |
||
231 | 231 | |
232 | 232 | public function testGetSubClientInvalid() |
233 | 233 | { |
234 | - $this->expectException( \Aimeos\Admin\JQAdm\Exception::class ); |
|
235 | - $this->object->getSubClient( '$unknown$' ); |
|
234 | + $this->expectException(\Aimeos\Admin\JQAdm\Exception::class); |
|
235 | + $this->object->getSubClient('$unknown$'); |
|
236 | 236 | } |
237 | 237 | |
238 | 238 | |
239 | 239 | public function testGetSubClientUnknown() |
240 | 240 | { |
241 | - $this->expectException( \Aimeos\Admin\JQAdm\Exception::class ); |
|
242 | - $this->object->getSubClient( 'unknown' ); |
|
241 | + $this->expectException(\Aimeos\Admin\JQAdm\Exception::class); |
|
242 | + $this->object->getSubClient('unknown'); |
|
243 | 243 | } |
244 | 244 | |
245 | 245 | |
246 | - public function getClientMock( $methods, $real = true ) |
|
246 | + public function getClientMock($methods, $real = true) |
|
247 | 247 | { |
248 | - $object = $this->getMockBuilder( \Aimeos\Admin\JQAdm\Type\Cms\Lists\Standard::class ) |
|
249 | - ->setConstructorArgs( array( $this->context, \TestHelperJqadm::getTemplatePaths() ) ) |
|
250 | - ->setMethods( (array) $methods ) |
|
248 | + $object = $this->getMockBuilder(\Aimeos\Admin\JQAdm\Type\Cms\Lists\Standard::class) |
|
249 | + ->setConstructorArgs(array($this->context, \TestHelperJqadm::getTemplatePaths())) |
|
250 | + ->setMethods((array) $methods) |
|
251 | 251 | ->getMock(); |
252 | 252 | |
253 | - $object->setAimeos( \TestHelperJqadm::getAimeos() ); |
|
254 | - $object->setView( $this->getViewNoRender( $real ) ); |
|
253 | + $object->setAimeos(\TestHelperJqadm::getAimeos()); |
|
254 | + $object->setView($this->getViewNoRender($real)); |
|
255 | 255 | |
256 | 256 | return $object; |
257 | 257 | } |
258 | 258 | |
259 | 259 | |
260 | - protected function getViewNoRender( $real = true ) |
|
260 | + protected function getViewNoRender($real = true) |
|
261 | 261 | { |
262 | - $view = $this->getMockBuilder( \Aimeos\MW\View\Standard::class ) |
|
263 | - ->setConstructorArgs( array( [] ) ) |
|
264 | - ->setMethods( array( 'render' ) ) |
|
262 | + $view = $this->getMockBuilder(\Aimeos\MW\View\Standard::class) |
|
263 | + ->setConstructorArgs(array([])) |
|
264 | + ->setMethods(array('render')) |
|
265 | 265 | ->getMock(); |
266 | 266 | |
267 | - $manager = \Aimeos\MShop::create( $this->context, 'cms/lists/type' ); |
|
267 | + $manager = \Aimeos\MShop::create($this->context, 'cms/lists/type'); |
|
268 | 268 | |
269 | - $param = ['site' => 'unittest', 'id' => $real ? $manager->find( 'default', [], 'text' )->getId() : -1]; |
|
270 | - $helper = new \Aimeos\MW\View\Helper\Param\Standard( $view, $param ); |
|
271 | - $view->addHelper( 'param', $helper ); |
|
269 | + $param = ['site' => 'unittest', 'id' => $real ? $manager->find('default', [], 'text')->getId() : -1]; |
|
270 | + $helper = new \Aimeos\MW\View\Helper\Param\Standard($view, $param); |
|
271 | + $view->addHelper('param', $helper); |
|
272 | 272 | |
273 | - $helper = new \Aimeos\MW\View\Helper\Config\Standard( $view, $this->context->getConfig() ); |
|
274 | - $view->addHelper( 'config', $helper ); |
|
273 | + $helper = new \Aimeos\MW\View\Helper\Config\Standard($view, $this->context->getConfig()); |
|
274 | + $view->addHelper('config', $helper); |
|
275 | 275 | |
276 | - $helper = new \Aimeos\MW\View\Helper\Access\Standard( $view, [] ); |
|
277 | - $view->addHelper( 'access', $helper ); |
|
276 | + $helper = new \Aimeos\MW\View\Helper\Access\Standard($view, []); |
|
277 | + $view->addHelper('access', $helper); |
|
278 | 278 | |
279 | 279 | return $view; |
280 | 280 | } |
@@ -17,42 +17,42 @@ |
||
17 | 17 | protected function setUp() : void |
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\Cms\Factory::create( $this->context ); |
|
27 | - $this->assertInstanceOf( '\\Aimeos\\Admin\\JQAdm\\Iface', $client ); |
|
26 | + $client = \Aimeos\Admin\JQAdm\Cms\Factory::create($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\Cms\Factory::create( $this->context, 'Standard' ); |
|
34 | - $this->assertInstanceOf( '\\Aimeos\\Admin\\JQAdm\\Iface', $client ); |
|
33 | + $client = \Aimeos\Admin\JQAdm\Cms\Factory::create($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->expectException( '\\Aimeos\\Admin\\JQAdm\\Exception' ); |
|
41 | - \Aimeos\Admin\JQAdm\Cms\Factory::create( $this->context, '' ); |
|
40 | + $this->expectException('\\Aimeos\\Admin\\JQAdm\\Exception'); |
|
41 | + \Aimeos\Admin\JQAdm\Cms\Factory::create($this->context, ''); |
|
42 | 42 | } |
43 | 43 | |
44 | 44 | |
45 | 45 | public function testCreateClientNameInvalid() |
46 | 46 | { |
47 | - $this->expectException( '\\Aimeos\\Admin\\JQAdm\\Exception' ); |
|
48 | - \Aimeos\Admin\JQAdm\Cms\Factory::create( $this->context, '%service' ); |
|
47 | + $this->expectException('\\Aimeos\\Admin\\JQAdm\\Exception'); |
|
48 | + \Aimeos\Admin\JQAdm\Cms\Factory::create($this->context, '%service'); |
|
49 | 49 | } |
50 | 50 | |
51 | 51 | |
52 | 52 | public function testCreateClientNameNotFound() |
53 | 53 | { |
54 | - $this->expectException( '\\Aimeos\\Admin\\JQAdm\\Exception' ); |
|
55 | - \Aimeos\Admin\JQAdm\Cms\Factory::create( $this->context, 'test' ); |
|
54 | + $this->expectException('\\Aimeos\\Admin\\JQAdm\\Exception'); |
|
55 | + \Aimeos\Admin\JQAdm\Cms\Factory::create($this->context, 'test'); |
|
56 | 56 | } |
57 | 57 | |
58 | 58 | } |