@@ -19,50 +19,50 @@ |
||
19 | 19 | */ |
20 | 20 | |
21 | 21 | |
22 | -$sort = function( $sortcode, $code ) { |
|
23 | - return ( $sortcode === $code ? '-' . $code : $code ); |
|
22 | +$sort = function($sortcode, $code) { |
|
23 | + return ($sortcode === $code ? '-' . $code : $code); |
|
24 | 24 | }; |
25 | 25 | |
26 | -$sortclass = function( $sortcode, $code ) { |
|
27 | - if( $sortcode === $code ) { |
|
26 | +$sortclass = function($sortcode, $code) { |
|
27 | + if ($sortcode === $code) { |
|
28 | 28 | return 'sort-desc'; |
29 | 29 | } |
30 | - if( $sortcode === '-' . $code ) { |
|
30 | + if ($sortcode === '-' . $code) { |
|
31 | 31 | return 'sort-asc'; |
32 | 32 | } |
33 | 33 | }; |
34 | 34 | |
35 | 35 | |
36 | -if( $this->get( 'action' ) === 'get' ) |
|
36 | +if ($this->get('action') === 'get') |
|
37 | 37 | { |
38 | - $target = $this->config( 'admin/jqadm/url/get/target' ); |
|
39 | - $controller = $this->config( 'admin/jqadm/url/get/controller', 'Jqadm' ); |
|
40 | - $action = $this->config( 'admin/jqadm/url/get/action', 'get' ); |
|
41 | - $config = $this->config( 'admin/jqadm/url/get/config', [] ); |
|
38 | + $target = $this->config('admin/jqadm/url/get/target'); |
|
39 | + $controller = $this->config('admin/jqadm/url/get/controller', 'Jqadm'); |
|
40 | + $action = $this->config('admin/jqadm/url/get/action', 'get'); |
|
41 | + $config = $this->config('admin/jqadm/url/get/config', []); |
|
42 | 42 | } |
43 | 43 | else |
44 | 44 | { |
45 | - $target = $this->config( 'admin/jqadm/url/search/target' ); |
|
46 | - $controller = $this->config( 'admin/jqadm/url/search/controller', 'Jqadm' ); |
|
47 | - $action = $this->config( 'admin/jqadm/url/search/action', 'search' ); |
|
48 | - $config = $this->config( 'admin/jqadm/url/search/config', [] ); |
|
45 | + $target = $this->config('admin/jqadm/url/search/target'); |
|
46 | + $controller = $this->config('admin/jqadm/url/search/controller', 'Jqadm'); |
|
47 | + $action = $this->config('admin/jqadm/url/search/action', 'search'); |
|
48 | + $config = $this->config('admin/jqadm/url/search/config', []); |
|
49 | 49 | } |
50 | 50 | |
51 | -$fields = $this->get( 'fields', [] ); |
|
52 | -$params = $this->get( 'params', [] ); |
|
53 | -$fragment = (array) $this->get( 'fragment', [] ); |
|
54 | -$sortcode = $this->get( 'sort' ); |
|
51 | +$fields = $this->get('fields', []); |
|
52 | +$params = $this->get('params', []); |
|
53 | +$fragment = (array) $this->get('fragment', []); |
|
54 | +$sortcode = $this->get('sort'); |
|
55 | 55 | |
56 | 56 | $enc = $this->encoder(); |
57 | 57 | |
58 | 58 | |
59 | 59 | ?> |
60 | -<?php foreach( $this->get( 'data', [] ) as $key => $name ) : ?> |
|
61 | - <?php if( in_array( $key, $fields ) ) : ?> |
|
62 | - <th class="<?= $enc->attr( str_replace( '.', '-', $key ) ); ?>"> |
|
63 | - <a class="<?= $sortclass( $sortcode, $key ); ?>" tabindex="<?= $this->get( 'tabindex', 1 ); ?>" |
|
64 | - href="<?= $enc->attr( $this->url( $target, $controller, $action, ['sort' => $sort( $sortcode, $key )] + $params, $fragment, $config ) ); ?>"> |
|
65 | - <?= $enc->html( $name ); ?> |
|
60 | +<?php foreach ($this->get('data', []) as $key => $name) : ?> |
|
61 | + <?php if (in_array($key, $fields)) : ?> |
|
62 | + <th class="<?= $enc->attr(str_replace('.', '-', $key)); ?>"> |
|
63 | + <a class="<?= $sortclass($sortcode, $key); ?>" tabindex="<?= $this->get('tabindex', 1); ?>" |
|
64 | + href="<?= $enc->attr($this->url($target, $controller, $action, ['sort' => $sort($sortcode, $key)] + $params, $fragment, $config)); ?>"> |
|
65 | + <?= $enc->html($name); ?> |
|
66 | 66 | </a> |
67 | 67 | </th> |
68 | 68 | <?php endif; ?> |
@@ -39,8 +39,7 @@ |
||
39 | 39 | $controller = $this->config( 'admin/jqadm/url/get/controller', 'Jqadm' ); |
40 | 40 | $action = $this->config( 'admin/jqadm/url/get/action', 'get' ); |
41 | 41 | $config = $this->config( 'admin/jqadm/url/get/config', [] ); |
42 | -} |
|
43 | -else |
|
42 | +} else |
|
44 | 43 | { |
45 | 44 | $target = $this->config( 'admin/jqadm/url/search/target' ); |
46 | 45 | $controller = $this->config( 'admin/jqadm/url/search/controller', 'Jqadm' ); |
@@ -6,16 +6,16 @@ |
||
6 | 6 | */ |
7 | 7 | |
8 | 8 | $enc = $this->encoder(); |
9 | -$errors = $this->get( 'errors', [] ); |
|
9 | +$errors = $this->get('errors', []); |
|
10 | 10 | |
11 | 11 | ?> |
12 | -<?php if( !empty( $errors ) ) : ?> |
|
12 | +<?php if (!empty($errors)) : ?> |
|
13 | 13 | <ul class="error-list alert alert-danger" role="alert"> |
14 | - <?php foreach( $errors as $key => $error ) : ?> |
|
15 | - <li class="error-item" data-key="<?= $enc->attr( $key ); ?>"> |
|
14 | + <?php foreach ($errors as $key => $error) : ?> |
|
15 | + <li class="error-item" data-key="<?= $enc->attr($key); ?>"> |
|
16 | 16 | <span class="fa fa-exclamation-circle" aria-hidden="true"></span> |
17 | - <span class="sr-only"><?= $enc->html( $this->translate( 'admin', 'Error' ) ); ?></span> |
|
18 | - <?= $enc->html( $error ); ?> |
|
17 | + <span class="sr-only"><?= $enc->html($this->translate('admin', 'Error')); ?></span> |
|
18 | + <?= $enc->html($error); ?> |
|
19 | 19 | </li> |
20 | 20 | <?php endforeach; ?> |
21 | 21 | </ul> |
@@ -56,16 +56,14 @@ |
||
56 | 56 | $controller = $this->config( 'admin/jqadm/url/get/controller', 'Jqadm' ); |
57 | 57 | $action = $this->config( 'admin/jqadm/url/get/action', 'get' ); |
58 | 58 | $config = $this->config( 'admin/jqadm/url/get/config', [] ); |
59 | - } |
|
60 | - else |
|
59 | + } else |
|
61 | 60 | { |
62 | 61 | $target = $this->config( 'admin/jqadm/url/create/target' ); |
63 | 62 | $controller = $this->config( 'admin/jqadm/url/create/controller', 'Jqadm' ); |
64 | 63 | $action = $this->config( 'admin/jqadm/url/create/action', 'create' ); |
65 | 64 | $config = $this->config( 'admin/jqadm/url/create/config', [] ); |
66 | 65 | } |
67 | -} |
|
68 | -else |
|
66 | +} else |
|
69 | 67 | { |
70 | 68 | $target = $this->config( 'admin/jqadm/url/search/target' ); |
71 | 69 | $controller = $this->config( 'admin/jqadm/url/search/controller', 'Jqadm' ); |
@@ -21,56 +21,56 @@ discard block |
||
21 | 21 | */ |
22 | 22 | |
23 | 23 | |
24 | -$pgroup = function( array $params, $group ) |
|
24 | +$pgroup = function(array $params, $group) |
|
25 | 25 | { |
26 | - if( $group != null ) { |
|
26 | + if ($group != null) { |
|
27 | 27 | return [$group => ['page' => $params]]; |
28 | 28 | } |
29 | 29 | |
30 | 30 | return ['page' => $params]; |
31 | 31 | }; |
32 | 32 | |
33 | -$fragment = (array) $this->get( 'fragment', [] ); |
|
34 | -$total = min( $this->get( 'total', 0 ), 10000 ); |
|
35 | -$pOffset = $pLimit = $this->get( 'page', [] ); |
|
36 | -$params = $this->get( 'pageParams', [] ); |
|
37 | -$group = $this->get( 'group' ); |
|
33 | +$fragment = (array) $this->get('fragment', []); |
|
34 | +$total = min($this->get('total', 0), 10000); |
|
35 | +$pOffset = $pLimit = $this->get('page', []); |
|
36 | +$params = $this->get('pageParams', []); |
|
37 | +$group = $this->get('group'); |
|
38 | 38 | |
39 | -$offset = max( $this->get( 'page/offset', 0 ), 0 ); |
|
40 | -$limit = max( $this->get( 'page/limit', 25 ), 1 ); |
|
39 | +$offset = max($this->get('page/offset', 0), 0); |
|
40 | +$limit = max($this->get('page/limit', 25), 1); |
|
41 | 41 | |
42 | -$first = ( $offset > 0 ? 0 : null ); |
|
43 | -$prev = ( $offset - $limit >= 0 ? $offset - $limit : null ); |
|
44 | -$next = ( $offset + $limit < $total ? $offset + $limit : null ); |
|
45 | -$last = ( floor(($total - 1) / $limit) * $limit > $offset ? floor(($total - 1) / $limit) * $limit : null ); |
|
42 | +$first = ($offset > 0 ? 0 : null); |
|
43 | +$prev = ($offset - $limit >= 0 ? $offset - $limit : null); |
|
44 | +$next = ($offset + $limit < $total ? $offset + $limit : null); |
|
45 | +$last = (floor(($total - 1) / $limit) * $limit > $offset ? floor(($total - 1) / $limit) * $limit : null); |
|
46 | 46 | |
47 | -$pageCurrent = floor( $offset / $limit ) + 1; |
|
48 | -$pageTotal = ( $total != 0 ? ceil( $total / $limit ) : 1 ); |
|
47 | +$pageCurrent = floor($offset / $limit) + 1; |
|
48 | +$pageTotal = ($total != 0 ? ceil($total / $limit) : 1); |
|
49 | 49 | |
50 | 50 | |
51 | -if( $this->get( 'action' ) === 'get' ) |
|
51 | +if ($this->get('action') === 'get') |
|
52 | 52 | { |
53 | - if( isset( $params['id'] ) ) |
|
53 | + if (isset($params['id'])) |
|
54 | 54 | { |
55 | - $target = $this->config( 'admin/jqadm/url/get/target' ); |
|
56 | - $controller = $this->config( 'admin/jqadm/url/get/controller', 'Jqadm' ); |
|
57 | - $action = $this->config( 'admin/jqadm/url/get/action', 'get' ); |
|
58 | - $config = $this->config( 'admin/jqadm/url/get/config', [] ); |
|
55 | + $target = $this->config('admin/jqadm/url/get/target'); |
|
56 | + $controller = $this->config('admin/jqadm/url/get/controller', 'Jqadm'); |
|
57 | + $action = $this->config('admin/jqadm/url/get/action', 'get'); |
|
58 | + $config = $this->config('admin/jqadm/url/get/config', []); |
|
59 | 59 | } |
60 | 60 | else |
61 | 61 | { |
62 | - $target = $this->config( 'admin/jqadm/url/create/target' ); |
|
63 | - $controller = $this->config( 'admin/jqadm/url/create/controller', 'Jqadm' ); |
|
64 | - $action = $this->config( 'admin/jqadm/url/create/action', 'create' ); |
|
65 | - $config = $this->config( 'admin/jqadm/url/create/config', [] ); |
|
62 | + $target = $this->config('admin/jqadm/url/create/target'); |
|
63 | + $controller = $this->config('admin/jqadm/url/create/controller', 'Jqadm'); |
|
64 | + $action = $this->config('admin/jqadm/url/create/action', 'create'); |
|
65 | + $config = $this->config('admin/jqadm/url/create/config', []); |
|
66 | 66 | } |
67 | 67 | } |
68 | 68 | else |
69 | 69 | { |
70 | - $target = $this->config( 'admin/jqadm/url/search/target' ); |
|
71 | - $controller = $this->config( 'admin/jqadm/url/search/controller', 'Jqadm' ); |
|
72 | - $action = $this->config( 'admin/jqadm/url/search/action', 'search' ); |
|
73 | - $config = $this->config( 'admin/jqadm/url/search/config', [] ); |
|
70 | + $target = $this->config('admin/jqadm/url/search/target'); |
|
71 | + $controller = $this->config('admin/jqadm/url/search/controller', 'Jqadm'); |
|
72 | + $action = $this->config('admin/jqadm/url/search/action', 'search'); |
|
73 | + $config = $this->config('admin/jqadm/url/search/config', []); |
|
74 | 74 | } |
75 | 75 | |
76 | 76 | |
@@ -78,68 +78,68 @@ discard block |
||
78 | 78 | |
79 | 79 | |
80 | 80 | ?> |
81 | -<?php if( $total > $limit || $offset > 0 || $this->get( 'pos', 'top' ) === 'bottom' ) : ?> |
|
81 | +<?php if ($total > $limit || $offset > 0 || $this->get('pos', 'top') === 'bottom') : ?> |
|
82 | 82 | <nav class="list-page"> |
83 | 83 | <ul class="page-offset pagination"> |
84 | - <li class="page-item <?= ( $first === null ? 'disabled' : '' ) ?>"> |
|
85 | - <a class="page-link" tabindex="<?= $this->get( 'tabindex', 1 ); ?>" |
|
86 | - href="<?php $pOffset['offset'] = $first; echo $enc->attr( $this->url( $target, $controller, $action, $pgroup( $pOffset, $group ) + $params, $fragment, $config ) ); ?>" |
|
87 | - aria-label="<?= $enc->attr( $this->translate( 'admin', 'First' ) ); ?>"> |
|
84 | + <li class="page-item <?= ($first === null ? 'disabled' : '') ?>"> |
|
85 | + <a class="page-link" tabindex="<?= $this->get('tabindex', 1); ?>" |
|
86 | + href="<?php $pOffset['offset'] = $first; echo $enc->attr($this->url($target, $controller, $action, $pgroup($pOffset, $group) + $params, $fragment, $config)); ?>" |
|
87 | + aria-label="<?= $enc->attr($this->translate('admin', 'First')); ?>"> |
|
88 | 88 | <span class="fa fa-fast-backward" aria-hidden="true"></span> |
89 | 89 | </a> |
90 | 90 | </li><!-- |
91 | - --><li class="page-item <?= ( $prev === null ? 'disabled' : '' ) ?>"> |
|
92 | - <a class="page-link" tabindex="<?= $this->get( 'tabindex', 1 ); ?>" |
|
93 | - href="<?php $pOffset['offset'] = $prev; echo $enc->attr( $this->url( $target, $controller, $action, $pgroup( $pOffset, $group ) + $params, $fragment, $config ) ); ?>" |
|
94 | - aria-label="<?= $enc->attr( $this->translate( 'admin', 'Previous' ) ); ?>"> |
|
91 | + --><li class="page-item <?= ($prev === null ? 'disabled' : '') ?>"> |
|
92 | + <a class="page-link" tabindex="<?= $this->get('tabindex', 1); ?>" |
|
93 | + href="<?php $pOffset['offset'] = $prev; echo $enc->attr($this->url($target, $controller, $action, $pgroup($pOffset, $group) + $params, $fragment, $config)); ?>" |
|
94 | + aria-label="<?= $enc->attr($this->translate('admin', 'Previous')); ?>"> |
|
95 | 95 | <span class="fa fa-step-backward" aria-hidden="true"></span> |
96 | 96 | </a> |
97 | 97 | </li><!-- |
98 | 98 | --><li class="page-item disabled"> |
99 | - <a class="page-link" tabindex="<?= $this->get( 'tabindex', 1 ); ?>" href="#"> |
|
100 | - <?= $enc->html( sprintf( $this->translate( 'admin', 'Page %1$d of %2$d' ), $pageCurrent, $pageTotal ) ); ?> |
|
99 | + <a class="page-link" tabindex="<?= $this->get('tabindex', 1); ?>" href="#"> |
|
100 | + <?= $enc->html(sprintf($this->translate('admin', 'Page %1$d of %2$d'), $pageCurrent, $pageTotal)); ?> |
|
101 | 101 | </a> |
102 | 102 | </li><!-- |
103 | - --><li class="page-item <?= ( $next === null ? 'disabled' : '' ) ?>"> |
|
104 | - <a class="page-link" tabindex="<?= $this->get( 'tabindex', 1 ); ?>" |
|
105 | - href="<?php $pOffset['offset'] = $next; echo $enc->attr( $this->url( $target, $controller, $action, $pgroup( $pOffset, $group ) + $params, $fragment, $config ) ); ?>" |
|
106 | - aria-label="<?= $enc->attr( $this->translate( 'admin', 'Next' ) ); ?>"> |
|
103 | + --><li class="page-item <?= ($next === null ? 'disabled' : '') ?>"> |
|
104 | + <a class="page-link" tabindex="<?= $this->get('tabindex', 1); ?>" |
|
105 | + href="<?php $pOffset['offset'] = $next; echo $enc->attr($this->url($target, $controller, $action, $pgroup($pOffset, $group) + $params, $fragment, $config)); ?>" |
|
106 | + aria-label="<?= $enc->attr($this->translate('admin', 'Next')); ?>"> |
|
107 | 107 | <span class="fa fa-step-forward" aria-hidden="true"></span> |
108 | 108 | </a> |
109 | 109 | </li><!-- |
110 | - --><li class="page-item <?= ( $last === null ? 'disabled' : '' ) ?>"> |
|
111 | - <a class="page-link" tabindex="<?= $this->get( 'tabindex', 1 ); ?>" |
|
112 | - href="<?php $pOffset['offset'] = $last; echo $enc->attr( $this->url( $target, $controller, $action, $pgroup( $pOffset, $group ) + $params, $fragment, $config ) ); ?>" |
|
113 | - aria-label="<?= $enc->attr( $this->translate( 'admin', 'Last' ) ); ?>"> |
|
110 | + --><li class="page-item <?= ($last === null ? 'disabled' : '') ?>"> |
|
111 | + <a class="page-link" tabindex="<?= $this->get('tabindex', 1); ?>" |
|
112 | + href="<?php $pOffset['offset'] = $last; echo $enc->attr($this->url($target, $controller, $action, $pgroup($pOffset, $group) + $params, $fragment, $config)); ?>" |
|
113 | + aria-label="<?= $enc->attr($this->translate('admin', 'Last')); ?>"> |
|
114 | 114 | <span class="fa fa-fast-forward" aria-hidden="true"></span> |
115 | 115 | </a> |
116 | 116 | </li> |
117 | 117 | </ul> |
118 | - <div class="page-limit btn-group <?= ( $this->get( 'pos', 'top' ) === 'bottom' ? 'dropup' : '' ); ?>" role="group"> |
|
118 | + <div class="page-limit btn-group <?= ($this->get('pos', 'top') === 'bottom' ? 'dropup' : ''); ?>" role="group"> |
|
119 | 119 | <button type="button" class="btn btn-secondary dropdown-toggle" data-toggle="dropdown" |
120 | - tabindex="<?= $this->get( 'tabindex', 1 ); ?>" aria-haspopup="true" aria-expanded="false"> |
|
120 | + tabindex="<?= $this->get('tabindex', 1); ?>" aria-haspopup="true" aria-expanded="false"> |
|
121 | 121 | <?= $limit; ?> <span class="caret"></span> |
122 | 122 | </button> |
123 | 123 | <ul class="dropdown-menu"> |
124 | 124 | <li class="dropdown-item"> |
125 | - <a href="<?php $pLimit['limit'] = 25; echo $enc->attr( $this->url( $target, $controller, $action, $pgroup( $pLimit, $group ) + $params, $fragment, $config ) ); ?>" |
|
126 | - tabindex="<?= $this->get( 'tabindex', 1 ); ?>">25</a> |
|
125 | + <a href="<?php $pLimit['limit'] = 25; echo $enc->attr($this->url($target, $controller, $action, $pgroup($pLimit, $group) + $params, $fragment, $config)); ?>" |
|
126 | + tabindex="<?= $this->get('tabindex', 1); ?>">25</a> |
|
127 | 127 | </li> |
128 | 128 | <li class="dropdown-item"> |
129 | - <a href="<?php $pLimit['limit'] = 50; echo $enc->attr( $this->url( $target, $controller, $action, $pgroup( $pLimit, $group ) + $params, $fragment, $config ) ); ?>" |
|
130 | - tabindex="<?= $this->get( 'tabindex', 1 ); ?>">50</a> |
|
129 | + <a href="<?php $pLimit['limit'] = 50; echo $enc->attr($this->url($target, $controller, $action, $pgroup($pLimit, $group) + $params, $fragment, $config)); ?>" |
|
130 | + tabindex="<?= $this->get('tabindex', 1); ?>">50</a> |
|
131 | 131 | </li> |
132 | 132 | <li class="dropdown-item"> |
133 | - <a href="<?php $pLimit['limit'] = 100; echo $enc->attr( $this->url( $target, $controller, $action, $pgroup( $pLimit, $group ) + $params, $fragment, $config ) ); ?>" |
|
134 | - tabindex="<?= $this->get( 'tabindex', 1 ); ?>">100</a> |
|
133 | + <a href="<?php $pLimit['limit'] = 100; echo $enc->attr($this->url($target, $controller, $action, $pgroup($pLimit, $group) + $params, $fragment, $config)); ?>" |
|
134 | + tabindex="<?= $this->get('tabindex', 1); ?>">100</a> |
|
135 | 135 | </li> |
136 | 136 | <li class="dropdown-item"> |
137 | - <a href="<?php $pLimit['limit'] = 200; echo $enc->attr( $this->url( $target, $controller, $action, $pgroup( $pLimit, $group ) + $params, $fragment, $config ) ); ?>" |
|
138 | - tabindex="<?= $this->get( 'tabindex', 1 ); ?>">200</a> |
|
137 | + <a href="<?php $pLimit['limit'] = 200; echo $enc->attr($this->url($target, $controller, $action, $pgroup($pLimit, $group) + $params, $fragment, $config)); ?>" |
|
138 | + tabindex="<?= $this->get('tabindex', 1); ?>">200</a> |
|
139 | 139 | </li> |
140 | 140 | <li class="dropdown-item"> |
141 | - <a href="<?php $pLimit['limit'] = 500; echo $enc->attr( $this->url( $target, $controller, $action, $pgroup( $pLimit, $group ) + $params, $fragment, $config ) ); ?>" |
|
142 | - tabindex="<?= $this->get( 'tabindex', 1 ); ?>">500</a> |
|
141 | + <a href="<?php $pLimit['limit'] = 500; echo $enc->attr($this->url($target, $controller, $action, $pgroup($pLimit, $group) + $params, $fragment, $config)); ?>" |
|
142 | + tabindex="<?= $this->get('tabindex', 1); ?>">500</a> |
|
143 | 143 | </li> |
144 | 144 | </ul> |
145 | 145 | </div> |
@@ -17,14 +17,14 @@ discard block |
||
17 | 17 | */ |
18 | 18 | |
19 | 19 | |
20 | -$selected = function( $key, $code ) { |
|
21 | - return ( (string) $key === (string) $code ? 'selected="selected"' : '' ); |
|
20 | +$selected = function($key, $code) { |
|
21 | + return ((string) $key === (string) $code ? 'selected="selected"' : ''); |
|
22 | 22 | }; |
23 | 23 | |
24 | 24 | |
25 | -$group = (array) $this->get( 'group', [] ); |
|
26 | -$filter = $this->get( 'filter', [] ); |
|
27 | -$fields = $this->get( 'fields', [] ); |
|
25 | +$group = (array) $this->get('group', []); |
|
26 | +$filter = $this->get('filter', []); |
|
27 | +$fields = $this->get('fields', []); |
|
28 | 28 | $idx = 0; |
29 | 29 | |
30 | 30 | $enc = $this->encoder(); |
@@ -32,41 +32,41 @@ discard block |
||
32 | 32 | |
33 | 33 | ?> |
34 | 34 | <tr class="list-search"> |
35 | - <?php foreach( $this->get( 'data', [] ) as $key => $list ) : $idx++ ?> |
|
36 | - <?php if( in_array( $key, $fields ) ) : ?> |
|
37 | - <td class="<?= str_replace( '.', '-', $key ); ?>"> |
|
38 | - <input type="hidden" value="<?= $enc->attr( $key ); ?>" |
|
39 | - name="<?= $enc->attr( $this->formparam( array_merge( $group, ['filter', 'key', $idx] ) ) ); ?>" /> |
|
40 | - <input type="hidden" value="<?= $enc->attr( $this->value( $list, 'op', '=~' ) ); ?>" |
|
41 | - name="<?= $enc->attr( $this->formparam( array_merge( $group, ['filter', 'op', $idx] ) ) ); ?>" /> |
|
35 | + <?php foreach ($this->get('data', []) as $key => $list) : $idx++ ?> |
|
36 | + <?php if (in_array($key, $fields)) : ?> |
|
37 | + <td class="<?= str_replace('.', '-', $key); ?>"> |
|
38 | + <input type="hidden" value="<?= $enc->attr($key); ?>" |
|
39 | + name="<?= $enc->attr($this->formparam(array_merge($group, ['filter', 'key', $idx]))); ?>" /> |
|
40 | + <input type="hidden" value="<?= $enc->attr($this->value($list, 'op', '=~')); ?>" |
|
41 | + name="<?= $enc->attr($this->formparam(array_merge($group, ['filter', 'op', $idx]))); ?>" /> |
|
42 | 42 | |
43 | - <?php if( ( $type = $this->value( $list, 'type', 'text' ) ) === 'select' ) : ?> |
|
44 | - <select class="form-control custom-select" tabindex="<?= $this->get( 'tabindex' ); ?>" |
|
45 | - name="<?= $enc->attr( $this->formparam( array_merge( $group, ['filter', 'val', $idx] ) ) ); ?>"> |
|
46 | - <option value=""><?= $enc->attr( $this->translate( 'admin', 'All' ) ); ?></option> |
|
43 | + <?php if (($type = $this->value($list, 'type', 'text')) === 'select') : ?> |
|
44 | + <select class="form-control custom-select" tabindex="<?= $this->get('tabindex'); ?>" |
|
45 | + name="<?= $enc->attr($this->formparam(array_merge($group, ['filter', 'val', $idx]))); ?>"> |
|
46 | + <option value=""><?= $enc->attr($this->translate('admin', 'All')); ?></option> |
|
47 | 47 | |
48 | - <?php foreach( (array) $this->value( $list, 'val', [] ) as $val => $name ) : ?> |
|
49 | - <option value="<?= $enc->attr( $val ); ?>" <?= $selected( $this->value( $filter, 'val/' . $idx ), $val ); ?> > |
|
50 | - <?= $enc->html( $name ); ?> |
|
48 | + <?php foreach ((array) $this->value($list, 'val', []) as $val => $name) : ?> |
|
49 | + <option value="<?= $enc->attr($val); ?>" <?= $selected($this->value($filter, 'val/' . $idx), $val); ?> > |
|
50 | + <?= $enc->html($name); ?> |
|
51 | 51 | </option> |
52 | 52 | <?php endforeach; ?> |
53 | 53 | </select> |
54 | 54 | <?php else : ?> |
55 | - <input class="form-control" type="<?= $enc->attr( $type ); ?>" tabindex="<?= $this->get( 'tabindex' ); ?>" |
|
56 | - name="<?= $enc->attr( $this->formparam( array_merge( $group, ['filter', 'val', $idx] ) ) ); ?>" |
|
57 | - value="<?= $enc->attr( $this->value( $filter, 'val/' . $idx ) ); ?>" /> |
|
55 | + <input class="form-control" type="<?= $enc->attr($type); ?>" tabindex="<?= $this->get('tabindex'); ?>" |
|
56 | + name="<?= $enc->attr($this->formparam(array_merge($group, ['filter', 'val', $idx]))); ?>" |
|
57 | + value="<?= $enc->attr($this->value($filter, 'val/' . $idx)); ?>" /> |
|
58 | 58 | <?php endif; ?> |
59 | 59 | </td> |
60 | 60 | <?php endif; ?> |
61 | 61 | <?php endforeach; ?> |
62 | 62 | |
63 | 63 | <td class="actions"> |
64 | - <button type="submit" class="btn act-search fa" tabindex="<?= $this->get( 'tabindex' ); ?>" |
|
65 | - title="<?= $enc->attr( $this->translate( 'admin', 'Search') ); ?>" |
|
66 | - aria-label="<?= $enc->attr( $this->translate( 'admin', 'Search' ) ); ?>"> |
|
64 | + <button type="submit" class="btn act-search fa" tabindex="<?= $this->get('tabindex'); ?>" |
|
65 | + title="<?= $enc->attr($this->translate('admin', 'Search')); ?>" |
|
66 | + aria-label="<?= $enc->attr($this->translate('admin', 'Search')); ?>"> |
|
67 | 67 | </button> |
68 | - <a class="btn act-reset fa" href="#" tabindex="<?= $this->get( 'tabindex' ); ?>" |
|
69 | - title="<?= $enc->attr( $this->translate( 'admin', 'Reset') ); ?>" |
|
70 | - aria-label="<?= $enc->attr( $this->translate( 'admin', 'Reset' ) ); ?>"></a> |
|
68 | + <a class="btn act-reset fa" href="#" tabindex="<?= $this->get('tabindex'); ?>" |
|
69 | + title="<?= $enc->attr($this->translate('admin', 'Reset')); ?>" |
|
70 | + aria-label="<?= $enc->attr($this->translate('admin', 'Reset')); ?>"></a> |
|
71 | 71 | </td> |
72 | 72 | </tr> |
@@ -51,8 +51,11 @@ |
||
51 | 51 | </option> |
52 | 52 | <?php endforeach; ?> |
53 | 53 | </select> |
54 | - <?php else : ?> |
|
55 | - <input class="form-control" type="<?= $enc->attr( $type ); ?>" tabindex="<?= $this->get( 'tabindex' ); ?>" |
|
54 | + <?php else { |
|
55 | + : ?> |
|
56 | + <input class="form-control" type="<?= $enc->attr( $type ); |
|
57 | +} |
|
58 | +?>" tabindex="<?= $this->get( 'tabindex' ); ?>" |
|
56 | 59 | name="<?= $enc->attr( $this->formparam( array_merge( $group, ['filter', 'val', $idx] ) ) ); ?>" |
57 | 60 | value="<?= $enc->attr( $this->value( $filter, 'val/' . $idx ) ); ?>" /> |
58 | 61 | <?php endif; ?> |
@@ -161,7 +161,6 @@ |
||
161 | 161 | * |
162 | 162 | * You can add, remove or reorder the links in the navigation bar by |
163 | 163 | * setting a new list of client resource names. |
164 | - |
|
165 | 164 | * In the configuration files of extensions, you should only add entries using |
166 | 165 | * one of these lines: |
167 | 166 | * |
@@ -262,8 +262,11 @@ discard block |
||
262 | 262 | <?php foreach( $this->pageSiteList as $siteItem ) : ?> |
263 | 263 | <?php if( $siteItem->getId() === $this->pageSiteTree->getId() ) : ?> |
264 | 264 | <?php $siteFcn( $this->pageSiteTree ); ?> |
265 | - <?php else : ?> |
|
266 | - <?php $siteFcn( $siteItem ); ?> |
|
265 | + <?php else { |
|
266 | + : ?> |
|
267 | + <?php $siteFcn( $siteItem ); |
|
268 | +} |
|
269 | +?> |
|
267 | 270 | <?php endif; ?> |
268 | 271 | <?php endforeach; ?> |
269 | 272 | </ul> |
@@ -295,9 +298,12 @@ discard block |
||
295 | 298 | </li> |
296 | 299 | |
297 | 300 | <?php endif; ?> |
298 | - <?php else : ?> |
|
301 | + <?php else { |
|
302 | + : ?> |
|
299 | 303 | <?php if( $this->access( $this->config( 'admin/jqadm/resource/' . $navitem . '/groups', [] ) ) ) : ?> |
300 | - <?php $key = $this->config( 'admin/jqadm/resource/' . $navitem . '/key' ); ?> |
|
304 | + <?php $key = $this->config( 'admin/jqadm/resource/' . $navitem . '/key' ); |
|
305 | +} |
|
306 | +?> |
|
301 | 307 | |
302 | 308 | <li class="<?= $enc->attr( $navitem ); ?> <?= $this->param( 'resource', $navfirst ) === $navitem ? 'active' : '' ?>"> |
303 | 309 | <a href="<?= $enc->attr( $this->url( $searchTarget, $cntl, $action, array( 'resource' => $navitem ) + $params, [], $config ) ); ?>" |
@@ -344,10 +350,13 @@ discard block |
||
344 | 350 | </li> |
345 | 351 | |
346 | 352 | <?php endif; ?> |
347 | - <?php else : ?> |
|
353 | + <?php else { |
|
354 | + : ?> |
|
348 | 355 | <?php if( $this->access( $this->config( 'admin/jqadm/resource/' . $navitem . '/groups', [] ) ) ) : ?> |
349 | 356 | |
350 | - <?php $key = $this->config( 'admin/jqadm/resource/' . $navitem . '/key' ); ?> |
|
357 | + <?php $key = $this->config( 'admin/jqadm/resource/' . $navitem . '/key' ); |
|
358 | +} |
|
359 | +?> |
|
351 | 360 | <li class="<?= $enc->attr( $navitem ); ?> <?= $this->param( 'resource', $navfirst ) === $navitem ? 'active' : '' ?>"> |
352 | 361 | <a href="<?= $enc->attr( $this->url( $searchTarget, $cntl, $action, array( 'resource' => $navitem ) + $params, [], $config ) ); ?>" |
353 | 362 | title="<?= $enc->attr( sprintf( $title, $this->translate( 'admin', $navitem ), $key ) ); ?>" |
@@ -8,10 +8,10 @@ discard block |
||
8 | 8 | $enc = $this->encoder(); |
9 | 9 | |
10 | 10 | $target = $this->request()->getTarget(); |
11 | -$searchTarget = $this->config( 'admin/jqadm/url/search/target' ); |
|
12 | -$cntl = $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 | +$searchTarget = $this->config('admin/jqadm/url/search/target'); |
|
12 | +$cntl = $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 | 17 | /** admin/jsonadm/url/options/target |
@@ -28,7 +28,7 @@ discard block |
||
28 | 28 | * @see admin/jsonadm/url/options/action |
29 | 29 | * @see admin/jsonadm/url/options/config |
30 | 30 | */ |
31 | -$jsonTarget = $this->config( 'admin/jsonadm/url/options/target' ); |
|
31 | +$jsonTarget = $this->config('admin/jsonadm/url/options/target'); |
|
32 | 32 | |
33 | 33 | /** admin/jsonadm/url/options/controller |
34 | 34 | * Name of the controller whose action should be called |
@@ -44,7 +44,7 @@ discard block |
||
44 | 44 | * @see admin/jsonadm/url/options/action |
45 | 45 | * @see admin/jsonadm/url/options/config |
46 | 46 | */ |
47 | -$jsonCntl = $this->config( 'admin/jsonadm/url/options/controller', 'Jsonadm' ); |
|
47 | +$jsonCntl = $this->config('admin/jsonadm/url/options/controller', 'Jsonadm'); |
|
48 | 48 | |
49 | 49 | /** admin/jsonadm/url/options/action |
50 | 50 | * Name of the action that should create the output |
@@ -60,7 +60,7 @@ discard block |
||
60 | 60 | * @see admin/jsonadm/url/options/controller |
61 | 61 | * @see admin/jsonadm/url/options/config |
62 | 62 | */ |
63 | -$jsonAction = $this->config( 'admin/jsonadm/url/options/action', 'options' ); |
|
63 | +$jsonAction = $this->config('admin/jsonadm/url/options/action', 'options'); |
|
64 | 64 | |
65 | 65 | /** admin/jsonadm/url/options/config |
66 | 66 | * Associative list of configuration options used for generating the URL |
@@ -82,7 +82,7 @@ discard block |
||
82 | 82 | * @see admin/jsonadm/url/options/controller |
83 | 83 | * @see admin/jsonadm/url/options/action |
84 | 84 | */ |
85 | -$jsonConfig = $this->config( 'admin/jsonadm/url/options/config', [] ); |
|
85 | +$jsonConfig = $this->config('admin/jsonadm/url/options/config', []); |
|
86 | 86 | |
87 | 87 | |
88 | 88 | /** admin/jqadm/navbar |
@@ -106,7 +106,7 @@ discard block |
||
106 | 106 | * @category Developer |
107 | 107 | * @see admin/jqadm/navbar-limit |
108 | 108 | */ |
109 | -$navlist = $this->config( 'admin/jqadm/navbar', [] ); |
|
109 | +$navlist = $this->config('admin/jqadm/navbar', []); |
|
110 | 110 | |
111 | 111 | /** admin/jqadm/navbar-limit |
112 | 112 | * Number of JQAdm client links in the navigation bar shown by default |
@@ -122,26 +122,26 @@ discard block |
||
122 | 122 | * @category Developer |
123 | 123 | * @see admin/jqadm/navbar |
124 | 124 | */ |
125 | -$navlimit = $this->config( 'admin/jqadm/navbar-limit', 7 ); |
|
125 | +$navlimit = $this->config('admin/jqadm/navbar-limit', 7); |
|
126 | 126 | |
127 | 127 | |
128 | -$navfirst = reset( $navlist ); |
|
129 | -if( is_array( $navfirst ) ) { |
|
130 | - $navfirst = key( $navlist ); |
|
128 | +$navfirst = reset($navlist); |
|
129 | +if (is_array($navfirst)) { |
|
130 | + $navfirst = key($navlist); |
|
131 | 131 | } |
132 | 132 | |
133 | -$resource = $this->param( 'resource', 'dashboard' ); |
|
134 | -$site = $this->param( 'site', 'default' ); |
|
135 | -$lang = $this->param( 'lang' ); |
|
133 | +$resource = $this->param('resource', 'dashboard'); |
|
134 | +$site = $this->param('site', 'default'); |
|
135 | +$lang = $this->param('lang'); |
|
136 | 136 | |
137 | 137 | $params = ['resource' => $resource, 'site' => $site]; |
138 | 138 | $extParams = ['site' => $site]; |
139 | 139 | |
140 | -if( $lang ) { |
|
140 | +if ($lang) { |
|
141 | 141 | $params['lang'] = $extParams['lang'] = $lang; |
142 | 142 | } |
143 | 143 | |
144 | -$title = $this->translate( 'admin', '%1$s (Ctrl+Alt+%2$s)' ); |
|
144 | +$title = $this->translate('admin', '%1$s (Ctrl+Alt+%2$s)'); |
|
145 | 145 | |
146 | 146 | |
147 | 147 | /** admin/jqadm/partial/confirm |
@@ -211,82 +211,82 @@ discard block |
||
211 | 211 | */ |
212 | 212 | |
213 | 213 | |
214 | -$infoMsgs = $this->get( 'info', [] ); |
|
214 | +$infoMsgs = $this->get('info', []); |
|
215 | 215 | |
216 | -switch( $this->param( 'act' ) ) |
|
216 | +switch ($this->param('act')) |
|
217 | 217 | { |
218 | 218 | case 'save': |
219 | - $infoMsgs[] = $this->translate( 'admin', 'Item saved successfully' ); break; |
|
219 | + $infoMsgs[] = $this->translate('admin', 'Item saved successfully'); break; |
|
220 | 220 | case 'delete': |
221 | - $infoMsgs[] = $this->translate( 'admin', 'Item deleted successfully' ); break; |
|
221 | + $infoMsgs[] = $this->translate('admin', 'Item deleted successfully'); break; |
|
222 | 222 | } |
223 | 223 | |
224 | 224 | |
225 | 225 | ?> |
226 | -<div class="aimeos" lang="<?= $this->param( 'lang' ); ?>" data-url="<?= $enc->attr( $this->url( $jsonTarget, $jsonCntl, $jsonAction, array( 'site' => $site ), [], $jsonConfig ) ); ?>"> |
|
226 | +<div class="aimeos" lang="<?= $this->param('lang'); ?>" data-url="<?= $enc->attr($this->url($jsonTarget, $jsonCntl, $jsonAction, array('site' => $site), [], $jsonConfig)); ?>"> |
|
227 | 227 | |
228 | 228 | <nav class="main-sidebar"> |
229 | 229 | <div class="sidebar-wrapper"> |
230 | 230 | |
231 | - <a class="logo" target="_blank" href="https://aimeos.org/update/?type=<?= $this->get( 'aimeosType' ) ?>&version=<?= $this->get( 'aimeosVersion' ) ?>"> |
|
232 | - <img src="https://aimeos.org/check/?type=<?= $this->get( 'aimeosType' ) ?>&version=<?= $this->get( 'aimeosVersion' ) ?>&extensions=<?= $this->get( 'aimeosExtensions' ) ?>" alt="Aimeos update" title="Aimeos update"> |
|
231 | + <a class="logo" target="_blank" href="https://aimeos.org/update/?type=<?= $this->get('aimeosType') ?>&version=<?= $this->get('aimeosVersion') ?>"> |
|
232 | + <img src="https://aimeos.org/check/?type=<?= $this->get('aimeosType') ?>&version=<?= $this->get('aimeosVersion') ?>&extensions=<?= $this->get('aimeosExtensions') ?>" alt="Aimeos update" title="Aimeos update"> |
|
233 | 233 | </a> |
234 | 234 | |
235 | 235 | <ul class="sidebar-menu basic"> |
236 | 236 | |
237 | - <?php if( ( count( $this->get( 'pageSiteList', [] ) ) > 1 || $this->pageSiteTree->getChildren() !== [] || count( $this->get( 'pageSitePath', [] ) ) > 1 ) && $this->access( $this->config( 'admin/jqadm/resource/site/groups', [] ) ) ) : ?> |
|
237 | + <?php if ((count($this->get('pageSiteList', [])) > 1 || $this->pageSiteTree->getChildren() !== [] || count($this->get('pageSitePath', [])) > 1) && $this->access($this->config('admin/jqadm/resource/site/groups', []))) : ?> |
|
238 | 238 | <li class="site treeview"> |
239 | 239 | <a href="#"> |
240 | 240 | <i class="icon"></i> |
241 | - <span class="title"><?= $enc->html( $this->site()->label() ); ?></span> |
|
241 | + <span class="title"><?= $enc->html($this->site()->label()); ?></span> |
|
242 | 242 | </a> |
243 | 243 | <ul class="tree-menu"> |
244 | - <li class="menu-header"><strong><?= $enc->html( $this->translate( 'admin', 'Site' ) ); ?></strong></li> |
|
244 | + <li class="menu-header"><strong><?= $enc->html($this->translate('admin', 'Site')); ?></strong></li> |
|
245 | 245 | |
246 | - <?php $siteFcn = function( \Aimeos\MShop\Locale\Item\Site\Iface $site ) use ( &$siteFcn, $enc, $searchTarget, $cntl, $action, $params, $config ) { ?> |
|
246 | + <?php $siteFcn = function(\Aimeos\MShop\Locale\Item\Site\Iface $site) use (&$siteFcn, $enc, $searchTarget, $cntl, $action, $params, $config) { ?> |
|
247 | 247 | |
248 | - <li class="site-<?= $enc->attr( $site->getCode() ) ?>"> |
|
249 | - <a href="<?= $enc->attr( $this->url( $searchTarget, $cntl, $action, array( 'site' => $site->getCode() ) + $params, [], $config ) ); ?>"> |
|
250 | - <span class="name"><?= $enc->html( $site->getLabel() ); ?></span> |
|
248 | + <li class="site-<?= $enc->attr($site->getCode()) ?>"> |
|
249 | + <a href="<?= $enc->attr($this->url($searchTarget, $cntl, $action, array('site' => $site->getCode()) + $params, [], $config)); ?>"> |
|
250 | + <span class="name"><?= $enc->html($site->getLabel()); ?></span> |
|
251 | 251 | </a> |
252 | 252 | |
253 | - <?php if( $site->getChildren() !== [] ) : ?> |
|
253 | + <?php if ($site->getChildren() !== []) : ?> |
|
254 | 254 | <ul class="menu-sub"> |
255 | - <?php foreach( $site->getChildren() as $site ) { $siteFcn( $site ); } ?> |
|
255 | + <?php foreach ($site->getChildren() as $site) { $siteFcn($site); } ?> |
|
256 | 256 | </ul> |
257 | 257 | <?php endif; ?> |
258 | 258 | </li> |
259 | 259 | |
260 | 260 | <?php }; ?> |
261 | 261 | |
262 | - <?php foreach( $this->pageSiteList as $siteItem ) : ?> |
|
263 | - <?php if( $siteItem->getId() === $this->pageSiteTree->getId() ) : ?> |
|
264 | - <?php $siteFcn( $this->pageSiteTree ); ?> |
|
262 | + <?php foreach ($this->pageSiteList as $siteItem) : ?> |
|
263 | + <?php if ($siteItem->getId() === $this->pageSiteTree->getId()) : ?> |
|
264 | + <?php $siteFcn($this->pageSiteTree); ?> |
|
265 | 265 | <?php else : ?> |
266 | - <?php $siteFcn( $siteItem ); ?> |
|
266 | + <?php $siteFcn($siteItem); ?> |
|
267 | 267 | <?php endif; ?> |
268 | 268 | <?php endforeach; ?> |
269 | 269 | </ul> |
270 | 270 | </li> |
271 | 271 | <?php endif; ?> |
272 | 272 | |
273 | - <?php foreach( array_splice( $navlist, 0, $navlimit ) as $nav => $navitem ) : ?> |
|
274 | - <?php if( is_array( $navitem ) ) : ?> |
|
275 | - <?php if( $this->access( $this->config( 'admin/jqadm/resource/' . $nav . '/groups', [] ) ) ) : ?> |
|
273 | + <?php foreach (array_splice($navlist, 0, $navlimit) as $nav => $navitem) : ?> |
|
274 | + <?php if (is_array($navitem)) : ?> |
|
275 | + <?php if ($this->access($this->config('admin/jqadm/resource/' . $nav . '/groups', []))) : ?> |
|
276 | 276 | |
277 | - <li class="treeview <?= $enc->attr( $nav ) ?> <?= strncmp( $this->param( 'resource' ), $nav, strlen( $nav ) ) ? '' : 'active' ?>"> |
|
277 | + <li class="treeview <?= $enc->attr($nav) ?> <?= strncmp($this->param('resource'), $nav, strlen($nav)) ? '' : 'active' ?>"> |
|
278 | 278 | <span> |
279 | 279 | <i class="icon"></i> |
280 | - <span class="title"><?= $enc->attr( $this->translate( 'admin', $nav ) ); ?></span> |
|
280 | + <span class="title"><?= $enc->attr($this->translate('admin', $nav)); ?></span> |
|
281 | 281 | </span> |
282 | 282 | <ul class="tree-menu"> |
283 | - <li class="menu-header"><strong><?= $enc->html( $this->translate( 'admin', $nav ) ); ?></strong></li> |
|
283 | + <li class="menu-header"><strong><?= $enc->html($this->translate('admin', $nav)); ?></strong></li> |
|
284 | 284 | |
285 | - <?php foreach( $navitem as $subresource ) : ?> |
|
286 | - <?php if( $this->access( $this->config( 'admin/jqadm/resource/' . $subresource . '/groups', [] ) ) ) : ?> |
|
287 | - <li class="<?= str_replace( '/', '-', $subresource); ?>"> |
|
288 | - <a href="<?= $enc->attr( $this->url( $searchTarget, $cntl, $action, ['resource' => $subresource] + $params, [], $config ) ); ?>"> |
|
289 | - <span class="name"><?= $enc->html( $this->translate( 'admin', $subresource ) ); ?></span> |
|
285 | + <?php foreach ($navitem as $subresource) : ?> |
|
286 | + <?php if ($this->access($this->config('admin/jqadm/resource/' . $subresource . '/groups', []))) : ?> |
|
287 | + <li class="<?= str_replace('/', '-', $subresource); ?>"> |
|
288 | + <a href="<?= $enc->attr($this->url($searchTarget, $cntl, $action, ['resource' => $subresource] + $params, [], $config)); ?>"> |
|
289 | + <span class="name"><?= $enc->html($this->translate('admin', $subresource)); ?></span> |
|
290 | 290 | </a> |
291 | 291 | </li> |
292 | 292 | <?php endif; ?> |
@@ -296,15 +296,15 @@ discard block |
||
296 | 296 | |
297 | 297 | <?php endif; ?> |
298 | 298 | <?php else : ?> |
299 | - <?php if( $this->access( $this->config( 'admin/jqadm/resource/' . $navitem . '/groups', [] ) ) ) : ?> |
|
300 | - <?php $key = $this->config( 'admin/jqadm/resource/' . $navitem . '/key' ); ?> |
|
299 | + <?php if ($this->access($this->config('admin/jqadm/resource/' . $navitem . '/groups', []))) : ?> |
|
300 | + <?php $key = $this->config('admin/jqadm/resource/' . $navitem . '/key'); ?> |
|
301 | 301 | |
302 | - <li class="<?= $enc->attr( $navitem ); ?> <?= $this->param( 'resource', $navfirst ) === $navitem ? 'active' : '' ?>"> |
|
303 | - <a href="<?= $enc->attr( $this->url( $searchTarget, $cntl, $action, array( 'resource' => $navitem ) + $params, [], $config ) ); ?>" |
|
304 | - title="<?= $enc->attr( sprintf( $title, $this->translate( 'admin', $navitem ), $key ) ); ?>" |
|
305 | - data-ctrlkey="<?= $enc->attr( strtolower( $key ) ); ?>"> |
|
302 | + <li class="<?= $enc->attr($navitem); ?> <?= $this->param('resource', $navfirst) === $navitem ? 'active' : '' ?>"> |
|
303 | + <a href="<?= $enc->attr($this->url($searchTarget, $cntl, $action, array('resource' => $navitem) + $params, [], $config)); ?>" |
|
304 | + title="<?= $enc->attr(sprintf($title, $this->translate('admin', $navitem), $key)); ?>" |
|
305 | + data-ctrlkey="<?= $enc->attr(strtolower($key)); ?>"> |
|
306 | 306 | <i class="icon"></i> |
307 | - <span class="title"><?= $enc->html( $this->translate( 'admin', $navitem ) ); ?></span> |
|
307 | + <span class="title"><?= $enc->html($this->translate('admin', $navitem)); ?></span> |
|
308 | 308 | </a> |
309 | 309 | </li> |
310 | 310 | |
@@ -318,23 +318,23 @@ discard block |
||
318 | 318 | |
319 | 319 | <ul class="sidebar-menu advanced"> |
320 | 320 | |
321 | - <?php foreach( $navlist as $nav => $navitem ) : ?> |
|
322 | - <?php if( is_array( $navitem ) ) : ?> |
|
323 | - <?php if( $this->access( $this->config( 'admin/jqadm/resource/' . $nav . '/groups', [] ) ) ) : ?> |
|
321 | + <?php foreach ($navlist as $nav => $navitem) : ?> |
|
322 | + <?php if (is_array($navitem)) : ?> |
|
323 | + <?php if ($this->access($this->config('admin/jqadm/resource/' . $nav . '/groups', []))) : ?> |
|
324 | 324 | |
325 | - <li class="treeview <?= $enc->attr( $nav ) ?> <?= strncmp( $this->param( 'resource' ), $nav, strlen( $nav ) ) ? '' : 'active' ?>"> |
|
325 | + <li class="treeview <?= $enc->attr($nav) ?> <?= strncmp($this->param('resource'), $nav, strlen($nav)) ? '' : 'active' ?>"> |
|
326 | 326 | <span> |
327 | 327 | <i class="icon"></i> |
328 | - <span class="title"><?= $enc->attr( $this->translate( 'admin', $nav ) ); ?></span> |
|
328 | + <span class="title"><?= $enc->attr($this->translate('admin', $nav)); ?></span> |
|
329 | 329 | </span> |
330 | 330 | <ul class="tree-menu"> |
331 | - <li class="menu-header"><strong><?= $enc->html( $this->translate( 'admin', $nav ) ); ?></strong></li> |
|
331 | + <li class="menu-header"><strong><?= $enc->html($this->translate('admin', $nav)); ?></strong></li> |
|
332 | 332 | |
333 | - <?php foreach( $navitem as $subresource ) : ?> |
|
334 | - <?php if( $this->access( $this->config( 'admin/jqadm/resource/' . $subresource . '/groups', [] ) ) ) : ?> |
|
335 | - <li class="<?= str_replace( '/', '-', $subresource); ?>"> |
|
336 | - <a href="<?= $enc->attr( $this->url( $searchTarget, $cntl, $action, ['resource' => $subresource] + $params, [], $config ) ); ?>"> |
|
337 | - <span class="name"><?= $enc->html( $this->translate( 'admin', $subresource ) ); ?></span> |
|
333 | + <?php foreach ($navitem as $subresource) : ?> |
|
334 | + <?php if ($this->access($this->config('admin/jqadm/resource/' . $subresource . '/groups', []))) : ?> |
|
335 | + <li class="<?= str_replace('/', '-', $subresource); ?>"> |
|
336 | + <a href="<?= $enc->attr($this->url($searchTarget, $cntl, $action, ['resource' => $subresource] + $params, [], $config)); ?>"> |
|
337 | + <span class="name"><?= $enc->html($this->translate('admin', $subresource)); ?></span> |
|
338 | 338 | </a> |
339 | 339 | </li> |
340 | 340 | <?php endif; ?> |
@@ -345,15 +345,15 @@ discard block |
||
345 | 345 | |
346 | 346 | <?php endif; ?> |
347 | 347 | <?php else : ?> |
348 | - <?php if( $this->access( $this->config( 'admin/jqadm/resource/' . $navitem . '/groups', [] ) ) ) : ?> |
|
348 | + <?php if ($this->access($this->config('admin/jqadm/resource/' . $navitem . '/groups', []))) : ?> |
|
349 | 349 | |
350 | - <?php $key = $this->config( 'admin/jqadm/resource/' . $navitem . '/key' ); ?> |
|
351 | - <li class="<?= $enc->attr( $navitem ); ?> <?= $this->param( 'resource', $navfirst ) === $navitem ? 'active' : '' ?>"> |
|
352 | - <a href="<?= $enc->attr( $this->url( $searchTarget, $cntl, $action, array( 'resource' => $navitem ) + $params, [], $config ) ); ?>" |
|
353 | - title="<?= $enc->attr( sprintf( $title, $this->translate( 'admin', $navitem ), $key ) ); ?>" |
|
354 | - data-ctrlkey="<?= $enc->attr( strtolower( $key ) ); ?>"> |
|
350 | + <?php $key = $this->config('admin/jqadm/resource/' . $navitem . '/key'); ?> |
|
351 | + <li class="<?= $enc->attr($navitem); ?> <?= $this->param('resource', $navfirst) === $navitem ? 'active' : '' ?>"> |
|
352 | + <a href="<?= $enc->attr($this->url($searchTarget, $cntl, $action, array('resource' => $navitem) + $params, [], $config)); ?>" |
|
353 | + title="<?= $enc->attr(sprintf($title, $this->translate('admin', $navitem), $key)); ?>" |
|
354 | + data-ctrlkey="<?= $enc->attr(strtolower($key)); ?>"> |
|
355 | 355 | <i class="icon"></i> |
356 | - <span class="title"><?= $enc->html( $this->translate( 'admin', $navitem ) ); ?></span> |
|
356 | + <span class="title"><?= $enc->html($this->translate('admin', $navitem)); ?></span> |
|
357 | 357 | </a> |
358 | 358 | </li> |
359 | 359 | |
@@ -361,18 +361,18 @@ discard block |
||
361 | 361 | <?php endif; ?> |
362 | 362 | <?php endforeach; ?> |
363 | 363 | |
364 | - <?php if( $this->access( $this->config( 'admin/jqadm/resource/language/groups', [] ) ) ) : ?> |
|
364 | + <?php if ($this->access($this->config('admin/jqadm/resource/language/groups', []))) : ?> |
|
365 | 365 | <li class="language treeview"> |
366 | 366 | <span> |
367 | 367 | <i class="icon"></i> |
368 | - <span class="title"><?= $enc->attr( $this->translate( 'language', $this->param( 'lang', $this->translate( 'admin', 'Language' ) ) ) ); ?></span> |
|
368 | + <span class="title"><?= $enc->attr($this->translate('language', $this->param('lang', $this->translate('admin', 'Language')))); ?></span> |
|
369 | 369 | </span> |
370 | 370 | <ul class="tree-menu"> |
371 | - <li class="menu-header"><strong><?= $enc->html( $this->translate( 'admin', 'Language' ) ); ?></strong></li> |
|
372 | - <?php foreach( $this->get( 'pageI18nList', [] ) as $langid ) : ?> |
|
373 | - <li class="lang-<?= $enc->attr( $langid ) ?>"> |
|
374 | - <a href="<?= $enc->attr( $this->url( $searchTarget, $cntl, $action, array( 'lang' => $langid ) + $params, [], $config ) ); ?>"> |
|
375 | - <span class="name"><?= $enc->html( $this->translate( 'language', $langid ) ); ?> (<?= $langid ?>)</span> |
|
371 | + <li class="menu-header"><strong><?= $enc->html($this->translate('admin', 'Language')); ?></strong></li> |
|
372 | + <?php foreach ($this->get('pageI18nList', []) as $langid) : ?> |
|
373 | + <li class="lang-<?= $enc->attr($langid) ?>"> |
|
374 | + <a href="<?= $enc->attr($this->url($searchTarget, $cntl, $action, array('lang' => $langid) + $params, [], $config)); ?>"> |
|
375 | + <span class="name"><?= $enc->html($this->translate('language', $langid)); ?> (<?= $langid ?>)</span> |
|
376 | 376 | </a> |
377 | 377 | </li> |
378 | 378 | <?php endforeach; ?> |
@@ -386,20 +386,20 @@ discard block |
||
386 | 386 | |
387 | 387 | <main class="main-content"> |
388 | 388 | |
389 | - <?= $this->partial( $this->config( 'admin/jqadm/partial/error', 'common/partials/error-standard' ), array( 'errors' => $this->get( 'errors', [] ) ) ); ?> |
|
390 | - <?= $this->partial( $this->config( 'admin/jqadm/partial/info', 'common/partials/info-standard' ), array( 'info' => $infoMsgs ) ); ?> |
|
389 | + <?= $this->partial($this->config('admin/jqadm/partial/error', 'common/partials/error-standard'), array('errors' => $this->get('errors', []))); ?> |
|
390 | + <?= $this->partial($this->config('admin/jqadm/partial/info', 'common/partials/info-standard'), array('info' => $infoMsgs)); ?> |
|
391 | 391 | |
392 | - <?= $this->block()->get( 'jqadm_content' ); ?> |
|
392 | + <?= $this->block()->get('jqadm_content'); ?> |
|
393 | 393 | |
394 | 394 | </main> |
395 | 395 | |
396 | 396 | <footer class="main-footer"> |
397 | 397 | <a href="https://github.com/aimeos/ai-admin-jqadm/issues" target="_blank"> |
398 | - <?= $enc->html( $this->translate( 'admin', 'Bug or suggestion?' ) ); ?> |
|
398 | + <?= $enc->html($this->translate('admin', 'Bug or suggestion?')); ?> |
|
399 | 399 | </a> |
400 | 400 | </footer> |
401 | 401 | |
402 | - <?= $this->partial( $this->config( 'admin/jqadm/partial/confirm', 'common/partials/confirm-standard' ) ); ?> |
|
403 | - <?= $this->partial( $this->config( 'admin/jqadm/partial/problem', 'common/partials/problem-standard' ) ); ?> |
|
402 | + <?= $this->partial($this->config('admin/jqadm/partial/confirm', 'common/partials/confirm-standard')); ?> |
|
403 | + <?= $this->partial($this->config('admin/jqadm/partial/problem', 'common/partials/problem-standard')); ?> |
|
404 | 404 | |
405 | 405 | </div> |
@@ -374,8 +374,11 @@ |
||
374 | 374 | aria-label="<?= $enc->attr( $this->translate( 'admin', 'Show' ) ); ?>"> |
375 | 375 | <?= $enc->html( $refId ); ?> - <?= $enc->html( $refItem->getLabel() . ' (' . $refItem->getCode() . ')' ); ?> |
376 | 376 | </a> |
377 | - <?php else : ?> |
|
378 | - <?= $enc->html( $refId ); ?> (<?= $enc->html( $this->translate( 'admin', 'not available any more' ) ); ?>) |
|
377 | + <?php else { |
|
378 | + : ?> |
|
379 | + <?= $enc->html( $refId ); |
|
380 | +} |
|
381 | +?> (<?= $enc->html( $this->translate( 'admin', 'not available any more' ) ); ?>) |
|
379 | 382 | <?php endif; ?> |
380 | 383 | </td> |
381 | 384 | <?php endif; ?> |
@@ -5,28 +5,28 @@ discard block |
||
5 | 5 | * @copyright Aimeos (aimeos.org), 2017-2018 |
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 | -$params = $this->get( 'pageParams', [] ); |
|
14 | +$params = $this->get('pageParams', []); |
|
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 | -$delTarget = $this->config( 'admin/jsonadm/url/target' ); |
|
27 | -$delCntl = $this->config( 'admin/jsonadm/url/controller', 'Jsonadm' ); |
|
28 | -$delAction = $this->config( 'admin/jsonadm/url/action', 'delete' ); |
|
29 | -$delConfig = $this->config( 'admin/jsonadm/url/config', [] ); |
|
26 | +$delTarget = $this->config('admin/jsonadm/url/target'); |
|
27 | +$delCntl = $this->config('admin/jsonadm/url/controller', 'Jsonadm'); |
|
28 | +$delAction = $this->config('admin/jsonadm/url/action', 'delete'); |
|
29 | +$delConfig = $this->config('admin/jsonadm/url/config', []); |
|
30 | 30 | |
31 | 31 | |
32 | 32 | /** admin/jqadm/supplier/product/fields |
@@ -44,21 +44,21 @@ discard block |
||
44 | 44 | * @category Developer |
45 | 45 | */ |
46 | 46 | $default = ['supplier.lists.position', 'supplier.lists.status', 'supplier.lists.type', 'supplier.lists.config', 'supplier.lists.refid']; |
47 | -$default = $this->config( 'admin/jqadm/supplier/product/fields', $default ); |
|
48 | -$fields = $this->session( 'aimeos/admin/jqadm/supplierproduct/fields', $default ); |
|
47 | +$default = $this->config('admin/jqadm/supplier/product/fields', $default); |
|
48 | +$fields = $this->session('aimeos/admin/jqadm/supplierproduct/fields', $default); |
|
49 | 49 | |
50 | -$listItems = $this->get( 'productListItems', [] ); |
|
51 | -$refItems = $this->get( 'productItems', [] ); |
|
50 | +$listItems = $this->get('productListItems', []); |
|
51 | +$refItems = $this->get('productItems', []); |
|
52 | 52 | |
53 | 53 | |
54 | 54 | ?> |
55 | 55 | <div id="product" class="item-product content-block tab-pane fade" role="tabpanel" aria-labelledby="product"> |
56 | 56 | |
57 | 57 | <?= $this->partial( |
58 | - $this->config( 'admin/jqadm/partial/pagination', 'common/partials/pagination-standard' ), |
|
59 | - ['pageParams' => $params, 'pos' => 'top', 'total' => $this->get( 'productTotal' ), |
|
58 | + $this->config('admin/jqadm/partial/pagination', 'common/partials/pagination-standard'), |
|
59 | + ['pageParams' => $params, 'pos' => 'top', 'total' => $this->get('productTotal'), |
|
60 | 60 | 'group' => 'sp', 'action' => 'get', 'fragment' => 'product', |
61 | - 'page' => $this->session( 'aimeos/admin/jqadm/supplierproduct/page', [] )] |
|
61 | + 'page' => $this->session('aimeos/admin/jqadm/supplierproduct/page', [])] |
|
62 | 62 | ); |
63 | 63 | ?> |
64 | 64 | |
@@ -66,39 +66,39 @@ discard block |
||
66 | 66 | <thead class="list-header"> |
67 | 67 | <tr> |
68 | 68 | <?= $this->partial( |
69 | - $this->config( 'admin/jqadm/partial/listhead', 'common/partials/listhead-standard' ), [ |
|
70 | - 'fields' => $fields, 'params' => $params, 'tabindex' => $this->get( 'tabindex' ), |
|
69 | + $this->config('admin/jqadm/partial/listhead', 'common/partials/listhead-standard'), [ |
|
70 | + 'fields' => $fields, 'params' => $params, 'tabindex' => $this->get('tabindex'), |
|
71 | 71 | 'group' => 'sp', 'action' => 'get', 'fragment' => 'product', |
72 | - 'sort' => $this->session( 'aimeos/admin/jqadm/supplierproduct/sort' ), |
|
72 | + 'sort' => $this->session('aimeos/admin/jqadm/supplierproduct/sort'), |
|
73 | 73 | 'data' => [ |
74 | - 'supplier.lists.position' => $this->translate( 'admin', 'Position' ), |
|
75 | - 'supplier.lists.status' => $this->translate( 'admin', 'Status' ), |
|
76 | - 'supplier.lists.type' => $this->translate( 'admin', 'Type' ), |
|
77 | - 'supplier.lists.config' => $this->translate( 'admin', 'Config' ), |
|
78 | - 'supplier.lists.datestart' => $this->translate( 'admin', 'Start date' ), |
|
79 | - 'supplier.lists.dateend' => $this->translate( 'admin', 'End date' ), |
|
80 | - 'supplier.lists.refid' => $this->translate( 'admin', 'Product ID' ), |
|
74 | + 'supplier.lists.position' => $this->translate('admin', 'Position'), |
|
75 | + 'supplier.lists.status' => $this->translate('admin', 'Status'), |
|
76 | + 'supplier.lists.type' => $this->translate('admin', 'Type'), |
|
77 | + 'supplier.lists.config' => $this->translate('admin', 'Config'), |
|
78 | + 'supplier.lists.datestart' => $this->translate('admin', 'Start date'), |
|
79 | + 'supplier.lists.dateend' => $this->translate('admin', 'End date'), |
|
80 | + 'supplier.lists.refid' => $this->translate('admin', 'Product ID'), |
|
81 | 81 | ] |
82 | 82 | ] ); |
83 | 83 | ?> |
84 | 84 | |
85 | 85 | <th class="actions"> |
86 | - <a class="btn fa act-add" href="#" tabindex="<?= $this->get( 'tabindex' ); ?>" |
|
87 | - title="<?= $enc->attr( $this->translate( 'admin', 'Insert new entry (Ctrl+I)') ); ?>" |
|
88 | - aria-label="<?= $enc->attr( $this->translate( 'admin', 'Add' ) ); ?>"> |
|
86 | + <a class="btn fa act-add" href="#" tabindex="<?= $this->get('tabindex'); ?>" |
|
87 | + title="<?= $enc->attr($this->translate('admin', 'Insert new entry (Ctrl+I)')); ?>" |
|
88 | + aria-label="<?= $enc->attr($this->translate('admin', 'Add')); ?>"> |
|
89 | 89 | </a> |
90 | 90 | |
91 | 91 | <?= $this->partial( |
92 | - $this->config( 'admin/jqadm/partial/columns', 'common/partials/columns-standard' ), [ |
|
93 | - 'fields' => $fields, 'group' => 'sp', 'tabindex' => $this->get( 'tabindex' ), |
|
92 | + $this->config('admin/jqadm/partial/columns', 'common/partials/columns-standard'), [ |
|
93 | + 'fields' => $fields, 'group' => 'sp', 'tabindex' => $this->get('tabindex'), |
|
94 | 94 | 'data' => [ |
95 | - 'supplier.lists.position' => $this->translate( 'admin', 'Position' ), |
|
96 | - 'supplier.lists.status' => $this->translate( 'admin', 'Status' ), |
|
97 | - 'supplier.lists.type' => $this->translate( 'admin', 'Type' ), |
|
98 | - 'supplier.lists.config' => $this->translate( 'admin', 'Config' ), |
|
99 | - 'supplier.lists.datestart' => $this->translate( 'admin', 'Start date' ), |
|
100 | - 'supplier.lists.dateend' => $this->translate( 'admin', 'End date' ), |
|
101 | - 'supplier.lists.refid' => $this->translate( 'admin', 'Product' ), |
|
95 | + 'supplier.lists.position' => $this->translate('admin', 'Position'), |
|
96 | + 'supplier.lists.status' => $this->translate('admin', 'Status'), |
|
97 | + 'supplier.lists.type' => $this->translate('admin', 'Type'), |
|
98 | + 'supplier.lists.config' => $this->translate('admin', 'Config'), |
|
99 | + 'supplier.lists.datestart' => $this->translate('admin', 'Start date'), |
|
100 | + 'supplier.lists.dateend' => $this->translate('admin', 'End date'), |
|
101 | + 'supplier.lists.refid' => $this->translate('admin', 'Product'), |
|
102 | 102 | ] |
103 | 103 | ] ); |
104 | 104 | ?> |
@@ -107,18 +107,18 @@ discard block |
||
107 | 107 | </thead> |
108 | 108 | <tbody> |
109 | 109 | <?= $this->partial( |
110 | - $this->config( 'admin/jqadm/partial/listsearch', 'common/partials/listsearch-standard' ), [ |
|
111 | - 'filter' => $this->session( 'aimeos/admin/jqadm/supplierproduct/filter', [] ), |
|
112 | - 'fields' => $fields, 'group' => 'sp', 'tabindex' => $this->get( 'tabindex' ), |
|
110 | + $this->config('admin/jqadm/partial/listsearch', 'common/partials/listsearch-standard'), [ |
|
111 | + 'filter' => $this->session('aimeos/admin/jqadm/supplierproduct/filter', []), |
|
112 | + 'fields' => $fields, 'group' => 'sp', 'tabindex' => $this->get('tabindex'), |
|
113 | 113 | 'data' => [ |
114 | 114 | 'supplier.lists.position' => ['op' => '>=', 'type' => 'number'], |
115 | 115 | 'supplier.lists.status' => ['op' => '==', 'type' => 'select', 'val' => [ |
116 | - '1' => $this->translate( 'mshop/code', 'status:1' ), |
|
117 | - '0' => $this->translate( 'mshop/code', 'status:0' ), |
|
118 | - '-1' => $this->translate( 'mshop/code', 'status:-1' ), |
|
119 | - '-2' => $this->translate( 'mshop/code', 'status:-2' ), |
|
116 | + '1' => $this->translate('mshop/code', 'status:1'), |
|
117 | + '0' => $this->translate('mshop/code', 'status:0'), |
|
118 | + '-1' => $this->translate('mshop/code', 'status:-1'), |
|
119 | + '-2' => $this->translate('mshop/code', 'status:-2'), |
|
120 | 120 | ]], |
121 | - 'supplier.lists.type' => ['op' => '==', 'type' => 'select', 'val' => $this->get( 'productListTypes', [])], |
|
121 | + 'supplier.lists.type' => ['op' => '==', 'type' => 'select', 'val' => $this->get('productListTypes', [])], |
|
122 | 122 | 'supplier.lists.config' => ['op' => '~='], |
123 | 123 | 'supplier.lists.datestart' => ['op' => '>=', 'type' => 'datetime-local'], |
124 | 124 | 'supplier.lists.dateend' => ['op' => '>=', 'type' => 'datetime-local'], |
@@ -128,80 +128,80 @@ discard block |
||
128 | 128 | ?> |
129 | 129 | |
130 | 130 | <tr class="list-item-new prototype"> |
131 | - <td colspan="<?= count( $fields ); ?>"> |
|
131 | + <td colspan="<?= count($fields); ?>"> |
|
132 | 132 | <div class="content-block row"> |
133 | 133 | <div class="col-xl-6"> |
134 | 134 | <div class="form-group row mandatory"> |
135 | - <label class="col-sm-4 form-control-label"><?= $enc->html( $this->translate( 'admin', 'Product' ) ); ?></label> |
|
135 | + <label class="col-sm-4 form-control-label"><?= $enc->html($this->translate('admin', 'Product')); ?></label> |
|
136 | 136 | <div class="col-sm-8"> |
137 | 137 | <input class="item-listid" type="hidden" disabled="disabled" |
138 | - name="<?= $enc->attr( $this->formparam( array( 'product', 'supplier.lists.id', '' ) ) ); ?>" /> |
|
138 | + name="<?= $enc->attr($this->formparam(array('product', 'supplier.lists.id', ''))); ?>" /> |
|
139 | 139 | <input class="item-config" type="hidden" disabled="disabled" |
140 | - name="<?= $enc->attr( $this->formparam( array( 'product', 'supplier.lists.config', '' ) ) ); ?>" /> |
|
140 | + name="<?= $enc->attr($this->formparam(array('product', 'supplier.lists.config', ''))); ?>" /> |
|
141 | 141 | <input class="item-label" type="hidden" disabled="disabled" |
142 | - name="<?= $enc->attr( $this->formparam( array( 'product', 'product.label', '' ) ) ); ?>" /> |
|
143 | - <select class="combobox-prototype item-refid" tabindex="<?= $this->get( 'tabindex' ); ?>" disabled="disabled" |
|
144 | - name="<?= $enc->attr( $this->formparam( array( 'product', 'supplier.lists.refid', '' ) ) ); ?>"> |
|
142 | + name="<?= $enc->attr($this->formparam(array('product', 'product.label', ''))); ?>" /> |
|
143 | + <select class="combobox-prototype item-refid" tabindex="<?= $this->get('tabindex'); ?>" disabled="disabled" |
|
144 | + name="<?= $enc->attr($this->formparam(array('product', 'supplier.lists.refid', ''))); ?>"> |
|
145 | 145 | </select> |
146 | 146 | </div> |
147 | 147 | </div> |
148 | 148 | <div class="form-group row mandatory"> |
149 | - <label class="col-sm-4 form-control-label"><?= $enc->html( $this->translate( 'admin', 'Status' ) ); ?></label> |
|
149 | + <label class="col-sm-4 form-control-label"><?= $enc->html($this->translate('admin', 'Status')); ?></label> |
|
150 | 150 | <div class="col-sm-8"> |
151 | - <select class="form-control custom-select item-status" required="required" tabindex="<?= $this->get( 'tabindex' ); ?>" disabled="disabled" |
|
152 | - name="<?= $enc->attr( $this->formparam( array( 'product', 'supplier.lists.status', '' ) ) ); ?>"> |
|
151 | + <select class="form-control custom-select item-status" required="required" tabindex="<?= $this->get('tabindex'); ?>" disabled="disabled" |
|
152 | + name="<?= $enc->attr($this->formparam(array('product', 'supplier.lists.status', ''))); ?>"> |
|
153 | 153 | <option value=""> |
154 | - <?= $enc->html( $this->translate( 'admin', 'Please select' ) ); ?> |
|
154 | + <?= $enc->html($this->translate('admin', 'Please select')); ?> |
|
155 | 155 | </option> |
156 | 156 | <option value="1"> |
157 | - <?= $enc->html( $this->translate( 'mshop/code', 'status:1' ) ); ?> |
|
157 | + <?= $enc->html($this->translate('mshop/code', 'status:1')); ?> |
|
158 | 158 | </option> |
159 | 159 | <option value="0"> |
160 | - <?= $enc->html( $this->translate( 'mshop/code', 'status:0' ) ); ?> |
|
160 | + <?= $enc->html($this->translate('mshop/code', 'status:0')); ?> |
|
161 | 161 | </option> |
162 | 162 | <option value="-1"> |
163 | - <?= $enc->html( $this->translate( 'mshop/code', 'status:-1' ) ); ?> |
|
163 | + <?= $enc->html($this->translate('mshop/code', 'status:-1')); ?> |
|
164 | 164 | </option> |
165 | 165 | <option value="-2"> |
166 | - <?= $enc->html( $this->translate( 'mshop/code', 'status:-2' ) ); ?> |
|
166 | + <?= $enc->html($this->translate('mshop/code', 'status:-2')); ?> |
|
167 | 167 | </option> |
168 | 168 | </select> |
169 | 169 | </div> |
170 | 170 | </div> |
171 | 171 | <div class="form-group row mandatory"> |
172 | - <label class="col-sm-4 form-control-label"><?= $enc->html( $this->translate( 'admin', 'Type' ) ); ?></label> |
|
172 | + <label class="col-sm-4 form-control-label"><?= $enc->html($this->translate('admin', 'Type')); ?></label> |
|
173 | 173 | <div class="col-sm-8"> |
174 | - <select class="form-control custom-select item-type" required="required" tabindex="<?= $this->get( 'tabindex' ); ?>" disabled="disabled" |
|
175 | - name="<?= $enc->attr( $this->formparam( array( 'product', 'supplier.lists.type', '' ) ) ); ?>" > |
|
174 | + <select class="form-control custom-select item-type" required="required" tabindex="<?= $this->get('tabindex'); ?>" disabled="disabled" |
|
175 | + name="<?= $enc->attr($this->formparam(array('product', 'supplier.lists.type', ''))); ?>" > |
|
176 | 176 | <option value=""> |
177 | - <?= $enc->html( $this->translate( 'admin', 'Please select' ) ); ?> |
|
177 | + <?= $enc->html($this->translate('admin', 'Please select')); ?> |
|
178 | 178 | </option> |
179 | 179 | |
180 | - <?php foreach( $this->get( 'productListTypes', [] ) as $id => $type ) : ?> |
|
181 | - <option value="<?= $enc->attr( $id ); ?>"><?= $enc->html( $type ); ?></option> |
|
180 | + <?php foreach ($this->get('productListTypes', []) as $id => $type) : ?> |
|
181 | + <option value="<?= $enc->attr($id); ?>"><?= $enc->html($type); ?></option> |
|
182 | 182 | <?php endforeach; ?> |
183 | 183 | </select> |
184 | 184 | </div> |
185 | 185 | </div> |
186 | 186 | <div class="form-group row optional"> |
187 | - <label class="col-sm-4 form-control-label"><?= $enc->html( $this->translate( 'admin', 'Start date' ) ); ?></label> |
|
187 | + <label class="col-sm-4 form-control-label"><?= $enc->html($this->translate('admin', 'Start date')); ?></label> |
|
188 | 188 | <div class="col-sm-8"> |
189 | - <input class="form-control item-datestart" type="datetime-local" tabindex="<?= $this->get( 'tabindex' ); ?>" |
|
190 | - name="<?= $enc->attr( $this->formparam( array( 'product', 'supplier.lists.datestart', '' ) ) ); ?>" disabled="disabled" /> |
|
189 | + <input class="form-control item-datestart" type="datetime-local" tabindex="<?= $this->get('tabindex'); ?>" |
|
190 | + name="<?= $enc->attr($this->formparam(array('product', 'supplier.lists.datestart', ''))); ?>" disabled="disabled" /> |
|
191 | 191 | </div> |
192 | 192 | </div> |
193 | 193 | <div class="form-group row optional"> |
194 | - <label class="col-sm-4 form-control-label"><?= $enc->html( $this->translate( 'admin', 'End date' ) ); ?></label> |
|
194 | + <label class="col-sm-4 form-control-label"><?= $enc->html($this->translate('admin', 'End date')); ?></label> |
|
195 | 195 | <div class="col-sm-8"> |
196 | - <input class="form-control item-dateend" type="datetime-local" tabindex="<?= $this->get( 'tabindex' ); ?>" |
|
197 | - name="<?= $enc->attr( $this->formparam( array( 'product', 'supplier.lists.dateend', '' ) ) ); ?>" disabled="disabled" /> |
|
196 | + <input class="form-control item-dateend" type="datetime-local" tabindex="<?= $this->get('tabindex'); ?>" |
|
197 | + name="<?= $enc->attr($this->formparam(array('product', 'supplier.lists.dateend', ''))); ?>" disabled="disabled" /> |
|
198 | 198 | </div> |
199 | 199 | </div> |
200 | 200 | <div class="form-group row optional"> |
201 | - <label class="col-sm-4 form-control-label"><?= $enc->html( $this->translate( 'admin', 'Position' ) ); ?></label> |
|
201 | + <label class="col-sm-4 form-control-label"><?= $enc->html($this->translate('admin', 'Position')); ?></label> |
|
202 | 202 | <div class="col-sm-8"> |
203 | - <input class="form-control item-position" type="number" step="1" tabindex="<?= $this->get( 'tabindex' ); ?>" |
|
204 | - name="<?= $enc->attr( $this->formparam( array( 'product', 'supplier.lists.position', '' ) ) ); ?>" disabled="disabled" /> |
|
203 | + <input class="form-control item-position" type="number" step="1" tabindex="<?= $this->get('tabindex'); ?>" |
|
204 | + name="<?= $enc->attr($this->formparam(array('product', 'supplier.lists.position', ''))); ?>" disabled="disabled" /> |
|
205 | 205 | </div> |
206 | 206 | </div> |
207 | 207 | </div> |
@@ -210,17 +210,17 @@ discard block |
||
210 | 210 | <thead> |
211 | 211 | <tr> |
212 | 212 | <th> |
213 | - <span class="help"><?= $enc->html( $this->translate( 'admin', 'Option' ) ); ?></span> |
|
213 | + <span class="help"><?= $enc->html($this->translate('admin', 'Option')); ?></span> |
|
214 | 214 | <div class="form-text text-muted help-text"> |
215 | - <?= $enc->html( $this->translate( 'admin', 'Article specific configuration options, will be available as key/value pairs in the templates' ) ); ?> |
|
215 | + <?= $enc->html($this->translate('admin', 'Article specific configuration options, will be available as key/value pairs in the templates')); ?> |
|
216 | 216 | </div> |
217 | 217 | </th> |
218 | 218 | <th> |
219 | - <?= $enc->html( $this->translate( 'admin', 'Value' ) ); ?> |
|
219 | + <?= $enc->html($this->translate('admin', 'Value')); ?> |
|
220 | 220 | </th> |
221 | 221 | <th class="actions"> |
222 | - <div class="btn act-add fa" tabindex="<?= $this->get( 'tabindex' ); ?>" |
|
223 | - title="<?= $enc->attr( $this->translate( 'admin', 'Insert new entry (Ctrl+I)') ); ?>"> |
|
222 | + <div class="btn act-add fa" tabindex="<?= $this->get('tabindex'); ?>" |
|
223 | + title="<?= $enc->attr($this->translate('admin', 'Insert new entry (Ctrl+I)')); ?>"> |
|
224 | 224 | </div> |
225 | 225 | </th> |
226 | 226 | </tr> |
@@ -228,16 +228,16 @@ discard block |
||
228 | 228 | <tbody> |
229 | 229 | <tr class="prototype"> |
230 | 230 | <td> |
231 | - <input type="text" class="config-key form-control" tabindex="<?= $this->get( 'tabindex' ); ?>" disabled="disabled" |
|
232 | - name="<?= $enc->attr( $this->formparam( array( 'product', 'config', 'idx', 'key', '' ) ) ); ?>" /> |
|
231 | + <input type="text" class="config-key form-control" tabindex="<?= $this->get('tabindex'); ?>" disabled="disabled" |
|
232 | + name="<?= $enc->attr($this->formparam(array('product', 'config', 'idx', 'key', ''))); ?>" /> |
|
233 | 233 | </td> |
234 | 234 | <td> |
235 | - <input type="text" class="config-value form-control" tabindex="<?= $this->get( 'tabindex' ); ?>" disabled="disabled" |
|
236 | - name="<?= $enc->attr( $this->formparam( array( 'product', 'config', 'idx', 'val', '' ) ) ); ?>" /> |
|
235 | + <input type="text" class="config-value form-control" tabindex="<?= $this->get('tabindex'); ?>" disabled="disabled" |
|
236 | + name="<?= $enc->attr($this->formparam(array('product', 'config', 'idx', 'val', ''))); ?>" /> |
|
237 | 237 | </td> |
238 | 238 | <td class="actions"> |
239 | - <div class="btn act-delete fa" tabindex="<?= $this->get( 'tabindex' ); ?>" |
|
240 | - title="<?= $enc->attr( $this->translate( 'admin', 'Delete this entry') ); ?>"> |
|
239 | + <div class="btn act-delete fa" tabindex="<?= $this->get('tabindex'); ?>" |
|
240 | + title="<?= $enc->attr($this->translate('admin', 'Delete this entry')); ?>"> |
|
241 | 241 | </div> |
242 | 242 | </td> |
243 | 243 | </tr> |
@@ -247,79 +247,79 @@ discard block |
||
247 | 247 | </div> |
248 | 248 | </td> |
249 | 249 | <td class="actions"> |
250 | - <a class="btn fa act-close" href="#" tabindex="<?= $this->get( 'tabindex' ); ?>" |
|
251 | - title="<?= $enc->attr( $this->translate( 'admin', 'Close') ); ?>" |
|
252 | - aria-label="<?= $enc->attr( $this->translate( 'admin', 'Close' ) ); ?>"> |
|
250 | + <a class="btn fa act-close" href="#" tabindex="<?= $this->get('tabindex'); ?>" |
|
251 | + title="<?= $enc->attr($this->translate('admin', 'Close')); ?>" |
|
252 | + aria-label="<?= $enc->attr($this->translate('admin', 'Close')); ?>"> |
|
253 | 253 | </a> |
254 | 254 | </td> |
255 | 255 | </tr> |
256 | 256 | |
257 | - <?php foreach( $this->get( 'productData/supplier.lists.id', [] ) as $idx => $listId ) : ?> |
|
258 | - <?php $siteId = $this->get( 'productData/supplier.lists.siteid/' . $idx ); ?> |
|
259 | - <?php $refId = $this->get( 'productData/supplier.lists.refid/' . $idx ); ?> |
|
257 | + <?php foreach ($this->get('productData/supplier.lists.id', []) as $idx => $listId) : ?> |
|
258 | + <?php $siteId = $this->get('productData/supplier.lists.siteid/' . $idx); ?> |
|
259 | + <?php $refId = $this->get('productData/supplier.lists.refid/' . $idx); ?> |
|
260 | 260 | |
261 | - <tr class="list-item <?= $this->site()->readonly( $siteId ); ?>"> |
|
262 | - <?php if( in_array( 'supplier.lists.position', $fields ) ) : ?> |
|
261 | + <tr class="list-item <?= $this->site()->readonly($siteId); ?>"> |
|
262 | + <?php if (in_array('supplier.lists.position', $fields)) : ?> |
|
263 | 263 | <td class="supplier-lists-position"> |
264 | - <input class="form-control item-position" type="number" step="1" tabindex="<?= $this->get( 'tabindex' ); ?>" |
|
265 | - name="<?= $enc->attr( $this->formparam( array( 'product', 'supplier.lists.position', '' ) ) ); ?>" |
|
266 | - value="<?= $enc->attr( $this->get( 'productData/supplier.lists.position/' . $idx ) ); ?>" |
|
267 | - <?= $this->site()->readonly( $siteId ); ?> disabled="disabled" /> |
|
264 | + <input class="form-control item-position" type="number" step="1" tabindex="<?= $this->get('tabindex'); ?>" |
|
265 | + name="<?= $enc->attr($this->formparam(array('product', 'supplier.lists.position', ''))); ?>" |
|
266 | + value="<?= $enc->attr($this->get('productData/supplier.lists.position/' . $idx)); ?>" |
|
267 | + <?= $this->site()->readonly($siteId); ?> disabled="disabled" /> |
|
268 | 268 | </td> |
269 | 269 | <?php endif; ?> |
270 | - <?php if( in_array( 'supplier.lists.status', $fields ) ) : ?> |
|
270 | + <?php if (in_array('supplier.lists.status', $fields)) : ?> |
|
271 | 271 | <td class="supplier-lists-status"> |
272 | - <select class="form-control custom-select item-status" required="required" tabindex="<?= $this->get( 'tabindex' ); ?>" |
|
273 | - name="<?= $enc->attr( $this->formparam( array( 'product', 'supplier.lists.status', '' ) ) ); ?>" |
|
274 | - <?= $this->site()->readonly( $siteId ); ?> disabled="disabled" > |
|
272 | + <select class="form-control custom-select item-status" required="required" tabindex="<?= $this->get('tabindex'); ?>" |
|
273 | + name="<?= $enc->attr($this->formparam(array('product', 'supplier.lists.status', ''))); ?>" |
|
274 | + <?= $this->site()->readonly($siteId); ?> disabled="disabled" > |
|
275 | 275 | <option value=""> |
276 | - <?= $enc->html( $this->translate( 'admin', 'Please select' ) ); ?> |
|
276 | + <?= $enc->html($this->translate('admin', 'Please select')); ?> |
|
277 | 277 | </option> |
278 | - <option value="1" <?= $selected( $this->get( 'productData/supplier.lists.status/' . $idx, 1 ), 1 ); ?> > |
|
279 | - <?= $enc->html( $this->translate( 'mshop/code', 'status:1' ) ); ?> |
|
278 | + <option value="1" <?= $selected($this->get('productData/supplier.lists.status/' . $idx, 1), 1); ?> > |
|
279 | + <?= $enc->html($this->translate('mshop/code', 'status:1')); ?> |
|
280 | 280 | </option> |
281 | - <option value="0" <?= $selected( $this->get( 'productData/supplier.lists.status/' . $idx, 1 ), 0 ); ?> > |
|
282 | - <?= $enc->html( $this->translate( 'mshop/code', 'status:0' ) ); ?> |
|
281 | + <option value="0" <?= $selected($this->get('productData/supplier.lists.status/' . $idx, 1), 0); ?> > |
|
282 | + <?= $enc->html($this->translate('mshop/code', 'status:0')); ?> |
|
283 | 283 | </option> |
284 | - <option value="-1" <?= $selected( $this->get( 'productData/supplier.lists.status/' . $idx, 1 ), -1 ); ?> > |
|
285 | - <?= $enc->html( $this->translate( 'mshop/code', 'status:-1' ) ); ?> |
|
284 | + <option value="-1" <?= $selected($this->get('productData/supplier.lists.status/' . $idx, 1), -1); ?> > |
|
285 | + <?= $enc->html($this->translate('mshop/code', 'status:-1')); ?> |
|
286 | 286 | </option> |
287 | - <option value="-2" <?= $selected( $this->get( 'productData/supplier.lists.status/' . $idx, 1 ), -2 ); ?> > |
|
288 | - <?= $enc->html( $this->translate( 'mshop/code', 'status:-2' ) ); ?> |
|
287 | + <option value="-2" <?= $selected($this->get('productData/supplier.lists.status/' . $idx, 1), -2); ?> > |
|
288 | + <?= $enc->html($this->translate('mshop/code', 'status:-2')); ?> |
|
289 | 289 | </option> |
290 | 290 | </select> |
291 | 291 | </td> |
292 | 292 | <?php endif; ?> |
293 | - <?php if( in_array( 'supplier.lists.type', $fields ) ) : ?> |
|
293 | + <?php if (in_array('supplier.lists.type', $fields)) : ?> |
|
294 | 294 | <td class="supplier-lists-type"> |
295 | - <select class="form-control custom-select item-type" required="required" tabindex="<?= $this->get( 'tabindex' ); ?>" |
|
296 | - name="<?= $enc->attr( $this->formparam( array( 'product', 'supplier.lists.type', '' ) ) ); ?>" |
|
297 | - <?= $this->site()->readonly( $siteId ); ?> disabled="disabled" > |
|
295 | + <select class="form-control custom-select item-type" required="required" tabindex="<?= $this->get('tabindex'); ?>" |
|
296 | + name="<?= $enc->attr($this->formparam(array('product', 'supplier.lists.type', ''))); ?>" |
|
297 | + <?= $this->site()->readonly($siteId); ?> disabled="disabled" > |
|
298 | 298 | <option value=""> |
299 | - <?= $enc->html( $this->translate( 'admin', 'Please select' ) ); ?> |
|
299 | + <?= $enc->html($this->translate('admin', 'Please select')); ?> |
|
300 | 300 | </option> |
301 | 301 | |
302 | - <?php foreach( $this->get( 'productListTypes', [] ) as $id => $type ) : ?> |
|
303 | - <option value="<?= $enc->attr( $id ); ?>" <?= $selected( $this->get( 'productData/supplier.lists.type/' . $idx ), $id ); ?> > |
|
304 | - <?= $enc->html( $type ); ?> |
|
302 | + <?php foreach ($this->get('productListTypes', []) as $id => $type) : ?> |
|
303 | + <option value="<?= $enc->attr($id); ?>" <?= $selected($this->get('productData/supplier.lists.type/' . $idx), $id); ?> > |
|
304 | + <?= $enc->html($type); ?> |
|
305 | 305 | </option> |
306 | 306 | <?php endforeach; ?> |
307 | 307 | </select> |
308 | 308 | </td> |
309 | 309 | <?php endif; ?> |
310 | - <?php if( in_array( 'supplier.lists.config', $fields ) ) : ?> |
|
310 | + <?php if (in_array('supplier.lists.config', $fields)) : ?> |
|
311 | 311 | <td class="supplier-lists-config item-config"> |
312 | 312 | <div class="config-type config-type-map"> |
313 | - <input type="text" class="config-value form-control" tabindex="<?= $this->get( 'tabindex' ); ?>" |
|
314 | - name="<?= $enc->attr( $this->formparam( array( 'product', 'supplier.lists.config', '' ) ) ); ?>" |
|
315 | - value="<?= $enc->attr( json_encode( $this->get( 'productData/supplier.lists.config/' . $idx ) ) ); ?>" |
|
316 | - <?= $this->site()->readonly( $siteId ); ?> disabled="disabled" /> |
|
313 | + <input type="text" class="config-value form-control" tabindex="<?= $this->get('tabindex'); ?>" |
|
314 | + name="<?= $enc->attr($this->formparam(array('product', 'supplier.lists.config', ''))); ?>" |
|
315 | + value="<?= $enc->attr(json_encode($this->get('productData/supplier.lists.config/' . $idx))); ?>" |
|
316 | + <?= $this->site()->readonly($siteId); ?> disabled="disabled" /> |
|
317 | 317 | |
318 | 318 | <table class="table table-striped config-map-table"> |
319 | 319 | <tr class="config-map-row prototype-map"> |
320 | 320 | <td class="config-map-actions"> |
321 | 321 | <div class="btn act-delete fa" tabindex="1" |
322 | - title="<?= $enc->attr( $this->translate( 'admin', 'Delete this entry') ); ?>"> |
|
322 | + title="<?= $enc->attr($this->translate('admin', 'Delete this entry')); ?>"> |
|
323 | 323 | </div> |
324 | 324 | </td> |
325 | 325 | <td class="config-map-row-key"> |
@@ -332,12 +332,12 @@ discard block |
||
332 | 332 | <tr class="config-map-actions"> |
333 | 333 | <td class="config-map-action-add"> |
334 | 334 | <div class="btn act-add fa" tabindex="1" |
335 | - title="<?= $enc->attr( $this->translate( 'admin', 'Insert new entry') ); ?>"> |
|
335 | + title="<?= $enc->attr($this->translate('admin', 'Insert new entry')); ?>"> |
|
336 | 336 | </div> |
337 | 337 | </td> |
338 | 338 | <td class="config-map-action-update" colspan="2"> |
339 | 339 | <div class="btn btn-primary act-update" tabindex="1"> |
340 | - <?= $enc->attr( $this->translate( 'admin', 'OK') ); ?> |
|
340 | + <?= $enc->attr($this->translate('admin', 'OK')); ?> |
|
341 | 341 | </div> |
342 | 342 | </td> |
343 | 343 | </tr> |
@@ -345,55 +345,55 @@ discard block |
||
345 | 345 | </div> |
346 | 346 | </td> |
347 | 347 | <?php endif; ?> |
348 | - <?php if( in_array( 'supplier.lists.datestart', $fields ) ) : ?> |
|
348 | + <?php if (in_array('supplier.lists.datestart', $fields)) : ?> |
|
349 | 349 | <td class="supplier-lists-datestart"> |
350 | - <input class="form-control item-datestart" type="datetime-local" tabindex="<?= $this->get( 'tabindex' ); ?>" |
|
351 | - name="<?= $enc->attr( $this->formparam( array( 'product', 'supplier.lists.datestart', '' ) ) ); ?>" |
|
352 | - value="<?= $enc->attr( str_replace( ' ', 'T', $this->get( 'productData/supplier.lists.datestart/' . $idx ) ) ); ?>" |
|
353 | - <?= $this->site()->readonly( $siteId ); ?> disabled="disabled" /> |
|
350 | + <input class="form-control item-datestart" type="datetime-local" tabindex="<?= $this->get('tabindex'); ?>" |
|
351 | + name="<?= $enc->attr($this->formparam(array('product', 'supplier.lists.datestart', ''))); ?>" |
|
352 | + value="<?= $enc->attr(str_replace(' ', 'T', $this->get('productData/supplier.lists.datestart/' . $idx))); ?>" |
|
353 | + <?= $this->site()->readonly($siteId); ?> disabled="disabled" /> |
|
354 | 354 | </td> |
355 | 355 | <?php endif; ?> |
356 | - <?php if( in_array( 'supplier.lists.dateend', $fields ) ) : ?> |
|
356 | + <?php if (in_array('supplier.lists.dateend', $fields)) : ?> |
|
357 | 357 | <td class="supplier-lists-dateend"> |
358 | - <input class="form-control item-dateend" type="datetime-local" tabindex="<?= $this->get( 'tabindex' ); ?>" |
|
359 | - name="<?= $enc->attr( $this->formparam( array( 'product', 'supplier.lists.dateend', '' ) ) ); ?>" |
|
360 | - value="<?= $enc->attr( str_replace( ' ', 'T', $this->get( 'productData/supplier.lists.dateend/' . $idx ) ) ); ?>" |
|
361 | - <?= $this->site()->readonly( $siteId ); ?> disabled="disabled" /> |
|
358 | + <input class="form-control item-dateend" type="datetime-local" tabindex="<?= $this->get('tabindex'); ?>" |
|
359 | + name="<?= $enc->attr($this->formparam(array('product', 'supplier.lists.dateend', ''))); ?>" |
|
360 | + value="<?= $enc->attr(str_replace(' ', 'T', $this->get('productData/supplier.lists.dateend/' . $idx))); ?>" |
|
361 | + <?= $this->site()->readonly($siteId); ?> disabled="disabled" /> |
|
362 | 362 | </td> |
363 | 363 | <?php endif; ?> |
364 | 364 | |
365 | - <?php $refItem = ( isset( $refItems[$refId] ) ? $refItems[$refId] : null ); ?> |
|
365 | + <?php $refItem = (isset($refItems[$refId]) ? $refItems[$refId] : null); ?> |
|
366 | 366 | |
367 | - <?php if( in_array( 'supplier.lists.refid', $fields ) ) : ?> |
|
367 | + <?php if (in_array('supplier.lists.refid', $fields)) : ?> |
|
368 | 368 | <td class="supplier-lists-refid"> |
369 | 369 | <input class="form-control item-refid" type="hidden" |
370 | - name="<?= $enc->attr( $this->formparam( array( 'product', 'supplier.lists.refid', '' ) ) ); ?>" |
|
371 | - value="<?= $enc->attr( $refId ); ?>" disabled="disabled" /> |
|
372 | - <?php if( $refItem ) : ?> |
|
373 | - <a class="btn act-view fa item-refid" tabindex="<?= $this->get( 'tabindex' ); ?>" target="_blank" |
|
374 | - href="<?= $enc->attr( $this->url( $getTarget, $getCntl, $getAction, ['resource' => 'product', 'id' => $refId] + $params, [], $getConfig ) ); ?>" |
|
375 | - title="<?= $enc->attr( $this->translate( 'admin', 'Show entry') ); ?>" |
|
376 | - aria-label="<?= $enc->attr( $this->translate( 'admin', 'Show' ) ); ?>"> |
|
377 | - <?= $enc->html( $refId ); ?> - <?= $enc->html( $refItem->getLabel() . ' (' . $refItem->getCode() . ')' ); ?> |
|
370 | + name="<?= $enc->attr($this->formparam(array('product', 'supplier.lists.refid', ''))); ?>" |
|
371 | + value="<?= $enc->attr($refId); ?>" disabled="disabled" /> |
|
372 | + <?php if ($refItem) : ?> |
|
373 | + <a class="btn act-view fa item-refid" tabindex="<?= $this->get('tabindex'); ?>" target="_blank" |
|
374 | + href="<?= $enc->attr($this->url($getTarget, $getCntl, $getAction, ['resource' => 'product', 'id' => $refId] + $params, [], $getConfig)); ?>" |
|
375 | + title="<?= $enc->attr($this->translate('admin', 'Show entry')); ?>" |
|
376 | + aria-label="<?= $enc->attr($this->translate('admin', 'Show')); ?>"> |
|
377 | + <?= $enc->html($refId); ?> - <?= $enc->html($refItem->getLabel() . ' (' . $refItem->getCode() . ')'); ?> |
|
378 | 378 | </a> |
379 | 379 | <?php else : ?> |
380 | - <?= $enc->html( $refId ); ?> (<?= $enc->html( $this->translate( 'admin', 'not available any more' ) ); ?>) |
|
380 | + <?= $enc->html($refId); ?> (<?= $enc->html($this->translate('admin', 'not available any more')); ?>) |
|
381 | 381 | <?php endif; ?> |
382 | 382 | </td> |
383 | 383 | <?php endif; ?> |
384 | 384 | |
385 | 385 | <td class="actions"> |
386 | - <input type="hidden" value="<?= $enc->attr( $listId ); ?>" disabled="disabled" |
|
387 | - name="<?= $enc->attr( $this->formparam( array( 'product', 'supplier.lists.id', '' ) ) ); ?>" /> |
|
386 | + <input type="hidden" value="<?= $enc->attr($listId); ?>" disabled="disabled" |
|
387 | + name="<?= $enc->attr($this->formparam(array('product', 'supplier.lists.id', ''))); ?>" /> |
|
388 | 388 | |
389 | - <?php if( !$this->site()->readonly( $siteId ) ) : ?> |
|
390 | - <a class="btn act-edit fa" tabindex="<?= $this->get( 'tabindex' ); ?>" href="#" |
|
391 | - title="<?= $enc->attr( $this->translate( 'admin', 'Edit this entry') ); ?>" |
|
392 | - aria-label="<?= $enc->attr( $this->translate( 'admin', 'Edit' ) ); ?>"></a> |
|
393 | - <a class="btn act-delete fa" tabindex="<?= $this->get( 'tabindex' ); ?>" |
|
394 | - href="<?= $enc->attr( $this->url( $delTarget, $delCntl, $delAction, ['resource' => 'supplier/lists', 'id' => $listId] + $params, [], $delConfig ) ); ?>" |
|
395 | - title="<?= $enc->attr( $this->translate( 'admin', 'Delete this entry') ); ?>" |
|
396 | - aria-label="<?= $enc->attr( $this->translate( 'admin', 'Delete' ) ); ?>"></a> |
|
389 | + <?php if (!$this->site()->readonly($siteId)) : ?> |
|
390 | + <a class="btn act-edit fa" tabindex="<?= $this->get('tabindex'); ?>" href="#" |
|
391 | + title="<?= $enc->attr($this->translate('admin', 'Edit this entry')); ?>" |
|
392 | + aria-label="<?= $enc->attr($this->translate('admin', 'Edit')); ?>"></a> |
|
393 | + <a class="btn act-delete fa" tabindex="<?= $this->get('tabindex'); ?>" |
|
394 | + href="<?= $enc->attr($this->url($delTarget, $delCntl, $delAction, ['resource' => 'supplier/lists', 'id' => $listId] + $params, [], $delConfig)); ?>" |
|
395 | + title="<?= $enc->attr($this->translate('admin', 'Delete this entry')); ?>" |
|
396 | + aria-label="<?= $enc->attr($this->translate('admin', 'Delete')); ?>"></a> |
|
397 | 397 | <?php endif; ?> |
398 | 398 | </td> |
399 | 399 | </tr> |
@@ -402,17 +402,17 @@ discard block |
||
402 | 402 | </tbody> |
403 | 403 | </table> |
404 | 404 | |
405 | - <?php if( $this->get( 'productData', [] ) === [] ) : ?> |
|
406 | - <div class="noitems"><?= $enc->html( sprintf( $this->translate( 'admin', 'No items found' ) ) ); ?></div> |
|
405 | + <?php if ($this->get('productData', []) === []) : ?> |
|
406 | + <div class="noitems"><?= $enc->html(sprintf($this->translate('admin', 'No items found'))); ?></div> |
|
407 | 407 | <?php endif; ?> |
408 | 408 | |
409 | 409 | <?= $this->partial( |
410 | - $this->config( 'admin/jqadm/partial/pagination', 'common/partials/pagination-standard' ), |
|
411 | - ['pageParams' => $params, 'pos' => 'bottom', 'total' => $this->get( 'productTotal' ), |
|
410 | + $this->config('admin/jqadm/partial/pagination', 'common/partials/pagination-standard'), |
|
411 | + ['pageParams' => $params, 'pos' => 'bottom', 'total' => $this->get('productTotal'), |
|
412 | 412 | 'group' => 'sp', 'action' => 'get', 'fragment' => 'product', |
413 | - 'page' =>$this->session( 'aimeos/admin/jqadm/supplierproduct/page', [] )] |
|
413 | + 'page' =>$this->session('aimeos/admin/jqadm/supplierproduct/page', [])] |
|
414 | 414 | ); |
415 | 415 | ?> |
416 | 416 | |
417 | 417 | </div> |
418 | -<?= $this->get( 'productBody' ); ?> |
|
418 | +<?= $this->get('productBody'); ?> |
@@ -17,42 +17,42 @@ |
||
17 | 17 | protected function setUp() |
18 | 18 | { |
19 | 19 | $this->context = \TestHelperJqadm::getContext(); |
20 | - $this->context->setView( \TestHelperJqadm::getView() ); |
|
20 | + $this->context->setView(\TestHelperJqadm::getView()); |
|
21 | 21 | } |
22 | 22 | |
23 | 23 | |
24 | 24 | public function testCreateClient() |
25 | 25 | { |
26 | - $client = \Aimeos\Admin\JQAdm\Type\Media\Property\Factory::createClient( $this->context ); |
|
27 | - $this->assertInstanceOf( '\\Aimeos\\Admin\\JQAdm\\Iface', $client ); |
|
26 | + $client = \Aimeos\Admin\JQAdm\Type\Media\Property\Factory::createClient($this->context); |
|
27 | + $this->assertInstanceOf('\\Aimeos\\Admin\\JQAdm\\Iface', $client); |
|
28 | 28 | } |
29 | 29 | |
30 | 30 | |
31 | 31 | public function testCreateClientName() |
32 | 32 | { |
33 | - $client = \Aimeos\Admin\JQAdm\Type\Media\Property\Factory::createClient( $this->context, 'Standard' ); |
|
34 | - $this->assertInstanceOf( '\\Aimeos\\Admin\\JQAdm\\Iface', $client ); |
|
33 | + $client = \Aimeos\Admin\JQAdm\Type\Media\Property\Factory::createClient($this->context, 'Standard'); |
|
34 | + $this->assertInstanceOf('\\Aimeos\\Admin\\JQAdm\\Iface', $client); |
|
35 | 35 | } |
36 | 36 | |
37 | 37 | |
38 | 38 | public function testCreateClientNameEmpty() |
39 | 39 | { |
40 | - $this->setExpectedException( '\\Aimeos\\Admin\\JQAdm\\Exception' ); |
|
41 | - \Aimeos\Admin\JQAdm\Type\Media\Property\Factory::createClient( $this->context, '' ); |
|
40 | + $this->setExpectedException('\\Aimeos\\Admin\\JQAdm\\Exception'); |
|
41 | + \Aimeos\Admin\JQAdm\Type\Media\Property\Factory::createClient($this->context, ''); |
|
42 | 42 | } |
43 | 43 | |
44 | 44 | |
45 | 45 | public function testCreateClientNameInvalid() |
46 | 46 | { |
47 | - $this->setExpectedException( '\\Aimeos\\Admin\\JQAdm\\Exception' ); |
|
48 | - \Aimeos\Admin\JQAdm\Type\Media\Property\Factory::createClient( $this->context, '%type/media/property' ); |
|
47 | + $this->setExpectedException('\\Aimeos\\Admin\\JQAdm\\Exception'); |
|
48 | + \Aimeos\Admin\JQAdm\Type\Media\Property\Factory::createClient($this->context, '%type/media/property'); |
|
49 | 49 | } |
50 | 50 | |
51 | 51 | |
52 | 52 | public function testCreateClientNameNotFound() |
53 | 53 | { |
54 | - $this->setExpectedException( '\\Aimeos\\Admin\\JQAdm\\Exception' ); |
|
55 | - \Aimeos\Admin\JQAdm\Type\Media\Property\Factory::createClient( $this->context, 'test' ); |
|
54 | + $this->setExpectedException('\\Aimeos\\Admin\\JQAdm\\Exception'); |
|
55 | + \Aimeos\Admin\JQAdm\Type\Media\Property\Factory::createClient($this->context, 'test'); |
|
56 | 56 | } |
57 | 57 | |
58 | 58 | } |
@@ -29,7 +29,7 @@ discard block |
||
29 | 29 | * @return \Aimeos\Admin\JQAdm\Iface Filter part implementing \Aimeos\Admin\JQAdm\Iface |
30 | 30 | * @throws \Aimeos\Admin\JQAdm\Exception If requested client implementation couldn't be found or initialisation fails |
31 | 31 | */ |
32 | - public static function createClient( \Aimeos\MShop\Context\Item\Iface $context, $name = null ) |
|
32 | + public static function createClient(\Aimeos\MShop\Context\Item\Iface $context, $name = null) |
|
33 | 33 | { |
34 | 34 | /** admin/jqadm/type/media/property/name |
35 | 35 | * Class name of the used account favorite client implementation |
@@ -64,22 +64,22 @@ discard block |
||
64 | 64 | * @since 2017.10 |
65 | 65 | * @category Developer |
66 | 66 | */ |
67 | - if( $name === null ) { |
|
68 | - $name = $context->getConfig()->get( 'admin/jqadm/type/media/property/name', 'Standard' ); |
|
67 | + if ($name === null) { |
|
68 | + $name = $context->getConfig()->get('admin/jqadm/type/media/property/name', 'Standard'); |
|
69 | 69 | } |
70 | 70 | |
71 | - if( ctype_alnum( $name ) === false ) |
|
71 | + if (ctype_alnum($name) === false) |
|
72 | 72 | { |
73 | - $classname = is_string( $name ) ? '\\Aimeos\\Admin\\JQAdm\\Type\\Media\\Property\\' . $name : '<not a string>'; |
|
74 | - throw new \Aimeos\Admin\JQAdm\Exception( sprintf( 'Invalid characters in class name "%1$s"', $classname ) ); |
|
73 | + $classname = is_string($name) ? '\\Aimeos\\Admin\\JQAdm\\Type\\Media\\Property\\' . $name : '<not a string>'; |
|
74 | + throw new \Aimeos\Admin\JQAdm\Exception(sprintf('Invalid characters in class name "%1$s"', $classname)); |
|
75 | 75 | } |
76 | 76 | |
77 | 77 | $iface = '\\Aimeos\\Admin\\JQAdm\\Iface'; |
78 | 78 | $classname = '\\Aimeos\\Admin\\JQAdm\\Type\\Media\\Property\\' . $name; |
79 | 79 | |
80 | - $client = self::createClientBase( $context, $classname, $iface ); |
|
80 | + $client = self::createClientBase($context, $classname, $iface); |
|
81 | 81 | |
82 | - return self::addClientDecorators( $context, $client, 'type/media/property' ); |
|
82 | + return self::addClientDecorators($context, $client, 'type/media/property'); |
|
83 | 83 | } |
84 | 84 | |
85 | 85 | } |
86 | 86 | \ No newline at end of file |
@@ -29,7 +29,7 @@ discard block |
||
29 | 29 | * @return \Aimeos\Admin\JQAdm\Iface Filter part implementing \Aimeos\Admin\JQAdm\Iface |
30 | 30 | * @throws \Aimeos\Admin\JQAdm\Exception If requested client implementation couldn't be found or initialisation fails |
31 | 31 | */ |
32 | - public static function createClient( \Aimeos\MShop\Context\Item\Iface $context, $name = null ) |
|
32 | + public static function createClient(\Aimeos\MShop\Context\Item\Iface $context, $name = null) |
|
33 | 33 | { |
34 | 34 | /** admin/jqadm/log/name |
35 | 35 | * Class name of the used account favorite client implementation |
@@ -64,22 +64,22 @@ discard block |
||
64 | 64 | * @since 2018.04 |
65 | 65 | * @category Developer |
66 | 66 | */ |
67 | - if( $name === null ) { |
|
68 | - $name = $context->getConfig()->get( 'admin/jqadm/log/name', 'Standard' ); |
|
67 | + if ($name === null) { |
|
68 | + $name = $context->getConfig()->get('admin/jqadm/log/name', 'Standard'); |
|
69 | 69 | } |
70 | 70 | |
71 | - if( ctype_alnum( $name ) === false ) |
|
71 | + if (ctype_alnum($name) === false) |
|
72 | 72 | { |
73 | - $classname = is_string( $name ) ? '\\Aimeos\\Admin\\JQAdm\\Log\\' . $name : '<not a string>'; |
|
74 | - throw new \Aimeos\Admin\JQAdm\Exception( sprintf( 'Invalid characters in class name "%1$s"', $classname ) ); |
|
73 | + $classname = is_string($name) ? '\\Aimeos\\Admin\\JQAdm\\Log\\' . $name : '<not a string>'; |
|
74 | + throw new \Aimeos\Admin\JQAdm\Exception(sprintf('Invalid characters in class name "%1$s"', $classname)); |
|
75 | 75 | } |
76 | 76 | |
77 | 77 | $iface = '\\Aimeos\\Admin\\JQAdm\\Iface'; |
78 | 78 | $classname = '\\Aimeos\\Admin\\JQAdm\\Log\\' . $name; |
79 | 79 | |
80 | - $client = self::createClientBase( $context, $classname, $iface ); |
|
80 | + $client = self::createClientBase($context, $classname, $iface); |
|
81 | 81 | |
82 | - return self::addClientDecorators( $context, $client, 'log' ); |
|
82 | + return self::addClientDecorators($context, $client, 'log'); |
|
83 | 83 | } |
84 | 84 | |
85 | 85 | } |
86 | 86 | \ No newline at end of file |