Completed
Branch master (86f0a0)
by Aimeos
05:56
created
admin/jqadm/src/Admin/JQAdm/Common/Admin/Factory/Base.php 2 patches
Doc Comments   -1 removed lines patch added patch discarded remove patch
@@ -27,7 +27,6 @@
 block discarded – undo
27 27
 	 * @param \Aimeos\MShop\Context\Item\Iface $context Context object with required objects
28 28
 	 * @param array $templatePaths Associative list of the file system paths to the core or the extensions as key
29 29
 	 * 	and a list of relative paths inside the core or the extension as values
30
-	 * @param \Aimeos\Admin\JQAdm\Iface $client Admin object
31 30
 	 */
32 31
 	public function __construct( \Aimeos\MShop\Context\Item\Iface $context, array $templatePaths )
33 32
 	{
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -29,8 +29,8 @@
 block discarded – undo
29 29
 	 * 	and a list of relative paths inside the core or the extension as values
30 30
 	 * @param \Aimeos\Admin\JQAdm\Iface $client Admin object
31 31
 	 */
32
-	public function __construct( \Aimeos\MShop\Context\Item\Iface $context, array $templatePaths )
32
+	public function __construct(\Aimeos\MShop\Context\Item\Iface $context, array $templatePaths)
33 33
 	{
34
-		parent::__construct( $context, $templatePaths );
34
+		parent::__construct($context, $templatePaths);
35 35
 	}
36 36
 }
37 37
\ No newline at end of file
Please login to merge, or discard this patch.
admin/jqadm/config/admin.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -4,12 +4,12 @@
 block discarded – undo
4 4
 	'jqadm' => array(
5 5
 		'product' => array(
6 6
 			'decorators' => array(
7
-				'global' => array( 'Index', 'Cache', 'Page' ),
7
+				'global' => array('Index', 'Cache', 'Page'),
8 8
 			),
9 9
 		),
10 10
 		'product/category' => array(
11 11
 			'decorators' => array(
12
-				'local' => array( 'Cache' ),
12
+				'local' => array('Cache'),
13 13
 			),
14 14
 		),
15 15
 	),
Please login to merge, or discard this patch.
admin/jqadm/templates/common/page-default.php 1 patch
Spacing   +30 added lines, -30 removed lines patch added patch discarded remove patch
@@ -8,30 +8,30 @@  discard block
 block discarded – undo
8 8
 $enc = $this->encoder();
9 9
 
10 10
 $target = $this->request()->getTarget();
11
-$cntl = $this->config( 'admin/jqadm/url/search/controller', 'Jqadm' );
12
-$action = $this->config( 'admin/jqadm/url/search/action', 'search' );
13
-$config = $this->config( 'admin/jqadm/url/search/config', array() );
11
+$cntl = $this->config('admin/jqadm/url/search/controller', 'Jqadm');
12
+$action = $this->config('admin/jqadm/url/search/action', 'search');
13
+$config = $this->config('admin/jqadm/url/search/config', array());
14 14
 
15
-$jsonTarget = $this->config( 'admin/jsonadm/url/options/target' );
16
-$jsonCntl = $this->config( 'admin/jsonadm/url/options/controller', 'Jsonadm' );
17
-$jsonAction = $this->config( 'admin/jsonadm/url/options/action', 'options' );
18
-$jsonConfig = $this->config( 'admin/jsonadm/url/options/config', array() );
15
+$jsonTarget = $this->config('admin/jsonadm/url/options/target');
16
+$jsonCntl = $this->config('admin/jsonadm/url/options/controller', 'Jsonadm');
17
+$jsonAction = $this->config('admin/jsonadm/url/options/action', 'options');
18
+$jsonConfig = $this->config('admin/jsonadm/url/options/config', array());
19 19
 
20
-$extTarget = $this->config( 'admin/extjs/url/target' );
21
-$extCntl = $this->config( 'admin/extjs/url/controller', 'Extadm' );
22
-$extAction = $this->config( 'admin/extjs/url/action', 'index' );
23
-$extConfig = $this->config( 'admin/extjs/url/config', array() );
20
+$extTarget = $this->config('admin/extjs/url/target');
21
+$extCntl = $this->config('admin/extjs/url/controller', 'Extadm');
22
+$extAction = $this->config('admin/extjs/url/action', 'index');
23
+$extConfig = $this->config('admin/extjs/url/config', array());
24 24
 
25
-$sites = $this->get( 'pageSites', array() );
26
-$site = $this->param( 'site' );
25
+$sites = $this->get('pageSites', array());
26
+$site = $this->param('site');
27 27
 
28
-$extParams = array( 'site' => $site, 'lang' => $this->param( 'lang' ) );
28
+$extParams = array('site' => $site, 'lang' => $this->param('lang'));
29 29
 
30
-$params = $this->get( 'pageParams', array() );
31
-$params['id'] = $this->param( 'id', '' );
30
+$params = $this->get('pageParams', array());
31
+$params['id'] = $this->param('id', '');
32 32
 
33 33
 ?>
34
-<div class="aimeos" data-url="<?php echo $enc->attr( $this->url( $jsonTarget, $jsonCntl, $jsonAction, array( 'site' => $site, 'resource' => '', 'id' => '' ), array(), $jsonConfig ) ); ?>">
34
+<div class="aimeos" data-url="<?php echo $enc->attr($this->url($jsonTarget, $jsonCntl, $jsonAction, array('site' => $site, 'resource' => '', 'id' => ''), array(), $jsonConfig)); ?>">
35 35
 
36 36
 	<nav class="navbar navbar-full">
37 37
 		<a class="navbar-brand" href="https://aimeos.org/update/?type={type}&version={version}">
@@ -43,21 +43,21 @@  discard block
 block discarded – undo
43 43
 		<div class="collapse navbar-toggleable-xs" id="collapse-navbar">
44 44
 			<ul class="nav navbar-nav">
45 45
 				<li class="nav-item mode active">
46
-					<a class="nav-link" href="<?php echo $enc->attr( $this->url( $extTarget, $extCntl, $extAction, $extParams, array(), $extConfig ) ); ?>">
47
-						<?php echo $enc->html( $this->translate( 'admin', 'Expert mode' ) ); ?>
46
+					<a class="nav-link" href="<?php echo $enc->attr($this->url($extTarget, $extCntl, $extAction, $extParams, array(), $extConfig)); ?>">
47
+						<?php echo $enc->html($this->translate('admin', 'Expert mode')); ?>
48 48
 					</a>
49 49
 				</li>
50 50
 				<li class="nav-item language">
51 51
 
52 52
 					<div class="btn-group">
53 53
 						<button type="button" class="btn btn-secondary dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
54
-							<?php echo $enc->attr( $this->param( 'lang', $this->translate( 'admin', 'Language' ) ) ); ?>
54
+							<?php echo $enc->attr($this->param('lang', $this->translate('admin', 'Language'))); ?>
55 55
 						</button>
56 56
 						<div class="dropdown-menu">
57
-<?php foreach( $this->get( 'pageLanguages', array() ) as $langid ) : ?>
57
+<?php foreach ($this->get('pageLanguages', array()) as $langid) : ?>
58 58
 							<a class="dropdown-item"
59
-								href="<?php echo $enc->attr( $this->url( $target, $cntl, $action, array( 'lang' => $langid ) + $params, array(), $config ) ); ?>">
60
-								<?php echo $enc->html( $langid ); ?>
59
+								href="<?php echo $enc->attr($this->url($target, $cntl, $action, array('lang' => $langid) + $params, array(), $config)); ?>">
60
+								<?php echo $enc->html($langid); ?>
61 61
 							</a>
62 62
 <?php endforeach; ?>
63 63
 						</div>
@@ -68,13 +68,13 @@  discard block
 block discarded – undo
68 68
 
69 69
 					<div class="btn-group">
70 70
 						<button type="button" class="btn btn-secondary dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
71
-							<?php echo $enc->attr( $this->value( $sites, $site, $this->translate( 'admin', 'Site' ) ) ); ?>
71
+							<?php echo $enc->attr($this->value($sites, $site, $this->translate('admin', 'Site'))); ?>
72 72
 						</button>
73 73
 						<div class="dropdown-menu">
74
-<?php foreach( $sites as $code => $label ) : ?>
74
+<?php foreach ($sites as $code => $label) : ?>
75 75
 							<a class="dropdown-item"
76
-								href="<?php echo $enc->attr( $this->url( $target, $cntl, $action, array( 'site' => $code ) + $params, array(), $config ) ); ?>">
77
-								<?php echo $enc->html( $label ); ?>
76
+								href="<?php echo $enc->attr($this->url($target, $cntl, $action, array('site' => $code) + $params, array(), $config)); ?>">
77
+								<?php echo $enc->html($label); ?>
78 78
 							</a>
79 79
 <?php endforeach; ?>
80 80
 						</div>
@@ -88,12 +88,12 @@  discard block
 block discarded – undo
88 88
 
89 89
 	<div class="container">
90 90
 
91
-<?php echo $this->partial( $this->config( 'admin/jqadm/partial/error', 'common/partials/error-default.php' ), array( 'errors' => $this->get( 'errors', array() ) ) ); ?>
91
+<?php echo $this->partial($this->config('admin/jqadm/partial/error', 'common/partials/error-default.php'), array('errors' => $this->get('errors', array()))); ?>
92 92
 
93
-<?php echo $this->block()->get( 'jqadm_content' ); ?>
93
+<?php echo $this->block()->get('jqadm_content'); ?>
94 94
 
95 95
 	</div>
96 96
 
97
-<?php echo $this->partial( $this->config( 'admin/jqadm/partial/confirm', 'common/partials/confirm-default.php' ) ); ?>
97
+<?php echo $this->partial($this->config('admin/jqadm/partial/confirm', 'common/partials/confirm-default.php')); ?>
98 98
 
99 99
 </div>
100 100
\ No newline at end of file
Please login to merge, or discard this patch.
admin/jqadm/templates/common/partials/error-default.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -6,16 +6,16 @@
 block discarded – undo
6 6
  */
7 7
 
8 8
 $enc = $this->encoder();
9
-$errors = $this->get( 'errors', array() );
9
+$errors = $this->get('errors', array());
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="<?php echo $enc->attr( $key ); ?>">
14
+<?php	foreach ($errors as $key => $error) : ?>
15
+	<li class="error-item" data-key="<?php echo $enc->attr($key); ?>">
16 16
 		<span class="fa fa-exclamation-circle" aria-hidden="true"></span>
17
-		<span class="sr-only"><?php echo $enc->html( $this->translate( 'admin', 'Error' ) ); ?></span>
18
-		<?php echo $enc->html( $error ); ?>
17
+		<span class="sr-only"><?php echo $enc->html($this->translate('admin', 'Error')); ?></span>
18
+		<?php echo $enc->html($error); ?>
19 19
 	</li>
20 20
 <?php	endforeach; ?>
21 21
 </ul>
Please login to merge, or discard this patch.
admin/jqadm/templates/common/partials/confirm-default.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -12,15 +12,15 @@
 block discarded – undo
12 12
 	<div class="modal-dialog">
13 13
 		<div class="modal-content">
14 14
 			<div class="modal-header">
15
-				<button type="button" class="close" data-dismiss="modal" aria-label="<?php echo $enc->attr( $this->translate( 'admin', 'Close' ) ); ?>"><span aria-hidden="true">&times;</span></button>
16
-				<h4 class="modal-title"><?php echo $enc->html( $this->translate( 'admin', 'Delete items?' ) ); ?></h4>
15
+				<button type="button" class="close" data-dismiss="modal" aria-label="<?php echo $enc->attr($this->translate('admin', 'Close')); ?>"><span aria-hidden="true">&times;</span></button>
16
+				<h4 class="modal-title"><?php echo $enc->html($this->translate('admin', 'Delete items?')); ?></h4>
17 17
 			</div>
18 18
 			<div class="modal-body">
19
-				<p><?php echo $enc->html( $this->translate( 'admin', 'You are going to delete one or more items. Would you like to proceed?' ) ); ?></p>
19
+				<p><?php echo $enc->html($this->translate('admin', 'You are going to delete one or more items. Would you like to proceed?')); ?></p>
20 20
 			</div>
21 21
 			<div class="modal-footer">
22
-				<button type="button" class="btn btn-danger" data-dismiss="modal"><?php echo $enc->html( $this->translate( 'admin', 'Delete' ) ); ?></button>
23
-				<button type="button" class="btn btn-secondary" data-dismiss="modal"><?php echo $enc->html( $this->translate( 'admin', 'Close' ) ); ?></button>
22
+				<button type="button" class="btn btn-danger" data-dismiss="modal"><?php echo $enc->html($this->translate('admin', 'Delete')); ?></button>
23
+				<button type="button" class="btn btn-secondary" data-dismiss="modal"><?php echo $enc->html($this->translate('admin', 'Close')); ?></button>
24 24
 			</div>
25 25
 		</div>
26 26
 	</div>
Please login to merge, or discard this patch.
admin/jqadm/templates/common/partials/filter-default.php 2 patches
Spacing   +34 added lines, -34 removed lines patch added patch discarded remove patch
@@ -7,72 +7,72 @@
 block discarded – undo
7 7
 
8 8
 $enc = $this->encoder();
9 9
 
10
-$operators = $this->get( 'operators', array() );
11
-$operators = ( isset( $operators['compare'] ) ? $operators['compare'] : array() );
10
+$operators = $this->get('operators', array());
11
+$operators = (isset($operators['compare']) ? $operators['compare'] : array());
12 12
 
13 13
 $operatorMap = array(
14
-	'=~' => array( 'string' ),
15
-	'~=' => array( 'string' ),
16
-	'>' => array( 'date', 'datetime', 'integer', 'float' ),
17
-	'>=' => array( 'date', 'datetime', 'integer', 'float' ),
18
-	'<' => array( 'date', 'datetime', 'integer', 'float' ),
19
-	'<=' => array( 'date', 'datetime', 'integer', 'float' ),
20
-	'==' => array( 'boolean', 'date', 'datetime', 'integer', 'float', 'string' ),
21
-	'!=' => array( 'boolean', 'date', 'datetime', 'integer', 'float', 'string' ),
14
+	'=~' => array('string'),
15
+	'~=' => array('string'),
16
+	'>' => array('date', 'datetime', 'integer', 'float'),
17
+	'>=' => array('date', 'datetime', 'integer', 'float'),
18
+	'<' => array('date', 'datetime', 'integer', 'float'),
19
+	'<=' => array('date', 'datetime', 'integer', 'float'),
20
+	'==' => array('boolean', 'date', 'datetime', 'integer', 'float', 'string'),
21
+	'!=' => array('boolean', 'date', 'datetime', 'integer', 'float', 'string'),
22 22
 );
23 23
 
24
-$filter = $this->param( 'filter' );
24
+$filter = $this->param('filter');
25 25
 
26
-if( !isset( $filter['key'][0] ) ) {
27
-	$filter['key'][0] = $this->get( 'default', '' );
26
+if (!isset($filter['key'][0])) {
27
+	$filter['key'][0] = $this->get('default', '');
28 28
 }
29 29
 
30
-$cnt = count( (array) $filter['key'] );
30
+$cnt = count((array) $filter['key']);
31 31
 
32 32
 ?>
33 33
 <table class="filter-items search-item">
34
-<?php for( $pos = 0; $pos < $cnt; $pos++ ) : ?>
34
+<?php for ($pos = 0; $pos < $cnt; $pos++) : ?>
35 35
 	<tr class="input-group filter-item">
36 36
 		<td>
37
-<?php	if( $pos < $cnt - 1 ) : ?>
38
-			<div class="fa fa-minus" aria-label="<?php echo $enc->attr( $this->translate( 'admin', 'Remove filter' ) ); ?>"></div>
37
+<?php	if ($pos < $cnt - 1) : ?>
38
+			<div class="fa fa-minus" aria-label="<?php echo $enc->attr($this->translate('admin', 'Remove filter')); ?>"></div>
39 39
 <?php	else : ?>
40
-			<div class="fa fa-plus" aria-label="<?php echo $enc->attr( $this->translate( 'admin', 'Add filter' ) ); ?>"></div>
40
+			<div class="fa fa-plus" aria-label="<?php echo $enc->attr($this->translate('admin', 'Add filter')); ?>"></div>
41 41
 <?php	endif; ?>
42 42
 		</td>
43 43
 		<td>
44 44
 			<fieldset>
45
-				<select name="<?php echo $this->formparam( array( 'filter', 'key', '' ) ); ?>" class="filter-key form-control" data-selected="<?php echo $filter['key'][$pos]; ?>">
45
+				<select name="<?php echo $this->formparam(array('filter', 'key', '')); ?>" class="filter-key form-control" data-selected="<?php echo $filter['key'][$pos]; ?>">
46 46
 				</select><!--
47
-				--><select name="<?php echo $this->formparam( array( 'filter', 'op', '' ) ); ?>" class="filter-operator form-control c-select">
48
-<?php foreach( $operators as $code ) : ?>
49
-					<option value="<?php echo $enc->attr( $code ); ?>"
50
-						class="<?php echo ( isset( $operatorMap[$code] ) ? implode( ' ', $operatorMap[$code] ) : '' ); ?>"
51
-						<?php echo ( isset( $filter['op'][$pos] ) && $filter['op'][$pos] === $code ? 'selected' : '' ); ?>
52
-					><?php echo $enc->html( $this->translate( 'admin/ext', $code ) ); ?></option>
47
+				--><select name="<?php echo $this->formparam(array('filter', 'op', '')); ?>" class="filter-operator form-control c-select">
48
+<?php foreach ($operators as $code) : ?>
49
+					<option value="<?php echo $enc->attr($code); ?>"
50
+						class="<?php echo (isset($operatorMap[$code]) ? implode(' ', $operatorMap[$code]) : ''); ?>"
51
+						<?php echo (isset($filter['op'][$pos]) && $filter['op'][$pos] === $code ? 'selected' : ''); ?>
52
+					><?php echo $enc->html($this->translate('admin/ext', $code)); ?></option>
53 53
 <?php endforeach; ?>
54 54
 				</select><!--
55
-				--><input name="<?php echo $this->formparam( array( 'filter', 'val', '' ) ); ?>" class="filter-value form-control" type="text" value="<?php echo $enc->attr( ( isset( $filter['val'][$pos] ) ? $filter['val'][$pos] : '' ) ); ?>" />
55
+				--><input name="<?php echo $this->formparam(array('filter', 'val', '')); ?>" class="filter-value form-control" type="text" value="<?php echo $enc->attr((isset($filter['val'][$pos]) ? $filter['val'][$pos] : '')); ?>" />
56 56
 			</fieldset>
57 57
 		</td>
58 58
 	</tr>
59 59
 <?php endfor; ?>
60 60
 	<tr class="input-group prototype">
61 61
 		<td>
62
-			<div class="fa fa-plus" aria-label="<?php echo $enc->attr( $this->translate( 'admin', 'Add filter' ) ); ?>"></div>
62
+			<div class="fa fa-plus" aria-label="<?php echo $enc->attr($this->translate('admin', 'Add filter')); ?>"></div>
63 63
 		</td>
64 64
 		<td>
65 65
 			<fieldset>
66
-				<select name="<?php echo $this->formparam( array( 'filter', 'key', '' ) ); ?>" class="filter-key form-control" data-selected="<?php echo $this->get( 'default' ); ?>" disabled="disabled">
66
+				<select name="<?php echo $this->formparam(array('filter', 'key', '')); ?>" class="filter-key form-control" data-selected="<?php echo $this->get('default'); ?>" disabled="disabled">
67 67
 				</select><!--
68
-				--><select name="<?php echo $this->formparam( array( 'filter', 'op', '' ) ); ?>" class="filter-operator form-control c-select" disabled="disabled">
69
-<?php foreach( $operators as $code ) : ?>
70
-					<option value="<?php echo $enc->attr( $code ); ?>"
71
-						class="<?php echo ( isset( $operatorMap[$code] ) ? implode( ' ', $operatorMap[$code] ) : '' ); ?>"
72
-					><?php echo $enc->html( $this->translate( 'admin/ext', $code ) ); ?></option>
68
+				--><select name="<?php echo $this->formparam(array('filter', 'op', '')); ?>" class="filter-operator form-control c-select" disabled="disabled">
69
+<?php foreach ($operators as $code) : ?>
70
+					<option value="<?php echo $enc->attr($code); ?>"
71
+						class="<?php echo (isset($operatorMap[$code]) ? implode(' ', $operatorMap[$code]) : ''); ?>"
72
+					><?php echo $enc->html($this->translate('admin/ext', $code)); ?></option>
73 73
 <?php endforeach; ?>
74 74
 				</select><!--
75
-				--><input name="<?php echo $this->formparam( array( 'filter', 'val', '' ) ); ?>" class="filter-value form-control" type="text" disabled="disabled" />
75
+				--><input name="<?php echo $this->formparam(array('filter', 'val', '')); ?>" class="filter-value form-control" type="text" disabled="disabled" />
76 76
 			</fieldset>
77 77
 		</td>
78 78
 	</tr>
Please login to merge, or discard this patch.
Braces   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -36,8 +36,11 @@
 block discarded – undo
36 36
 		<td>
37 37
 <?php	if( $pos < $cnt - 1 ) : ?>
38 38
 			<div class="fa fa-minus" aria-label="<?php echo $enc->attr( $this->translate( 'admin', 'Remove filter' ) ); ?>"></div>
39
-<?php	else : ?>
40
-			<div class="fa fa-plus" aria-label="<?php echo $enc->attr( $this->translate( 'admin', 'Add filter' ) ); ?>"></div>
39
+<?php	else {
40
+	: ?>
41
+			<div class="fa fa-plus" aria-label="<?php echo $enc->attr( $this->translate( 'admin', 'Add filter' ) );
42
+}
43
+?>"></div>
41 44
 <?php	endif; ?>
42 45
 		</td>
43 46
 		<td>
Please login to merge, or discard this patch.
admin/jqadm/templates/common/partials/pagination-default.php 1 patch
Spacing   +25 added lines, -25 removed lines patch added patch discarded remove patch
@@ -7,60 +7,60 @@
 block discarded – undo
7 7
 
8 8
 $enc = $this->encoder();
9 9
 
10
-$target = $this->config( 'admin/jqadm/url/search/target' );
11
-$controller = $this->config( 'admin/jqadm/url/search/controller', 'Jqadm' );
12
-$action = $this->config( 'admin/jqadm/url/search/action', 'search' );
13
-$config = $this->config( 'admin/jqadm/url/search/config', array() );
10
+$target = $this->config('admin/jqadm/url/search/target');
11
+$controller = $this->config('admin/jqadm/url/search/controller', 'Jqadm');
12
+$action = $this->config('admin/jqadm/url/search/action', 'search');
13
+$config = $this->config('admin/jqadm/url/search/config', array());
14 14
 
15
-$params = $this->get( 'pageParams', array() );
15
+$params = $this->get('pageParams', array());
16 16
 
17
-$total = $this->get( 'total', 0 );
18
-$offset = max( $this->param( 'page/offset', 0 ), 0 );
19
-$limit = max( $this->param( 'page/limit', 100 ), 1 );
17
+$total = $this->get('total', 0);
18
+$offset = max($this->param('page/offset', 0), 0);
19
+$limit = max($this->param('page/limit', 100), 1);
20 20
 
21
-$first = ( $offset > 0 ? 0 : null );
22
-$prev = ( $offset - $limit >= 0 ? $offset - $limit : null );
23
-$next = ( $offset + $limit < $total ? $offset + $limit : null );
24
-$last = ( ((int) ($total / $limit)) * $limit > $offset ? ((int) ($total / $limit)) * $limit : null );
21
+$first = ($offset > 0 ? 0 : null);
22
+$prev = ($offset - $limit >= 0 ? $offset - $limit : null);
23
+$next = ($offset + $limit < $total ? $offset + $limit : null);
24
+$last = (((int) ($total / $limit)) * $limit > $offset ? ((int) ($total / $limit)) * $limit : null);
25 25
 
26
-$pageCurrent = floor( $offset / $limit ) + 1;
27
-$pageTotal = ( $total != 0 ? ceil( $total / $limit ) : 1 );
26
+$pageCurrent = floor($offset / $limit) + 1;
27
+$pageTotal = ($total != 0 ? ceil($total / $limit) : 1);
28 28
 
29 29
 ?>
30 30
 <nav class="list-page">
31 31
 	<ul class="page-offset pagination">
32 32
 		<li class="page-item">
33
-			<a class="page-link" href="<?php $params['page']['offset'] = $first; echo $enc->attr( $this->url( $target, $controller, $action, $params, array(), $config ) ); ?>" aria-label="<?php echo $enc->attr( $this->translate( 'admin', 'First' ) ); ?>">
33
+			<a class="page-link" href="<?php $params['page']['offset'] = $first; echo $enc->attr($this->url($target, $controller, $action, $params, array(), $config)); ?>" aria-label="<?php echo $enc->attr($this->translate('admin', 'First')); ?>">
34 34
 				<span class="fa fa-fast-backward" aria-hidden="true"></span>
35 35
 			</a>
36 36
 		</li><!--
37 37
 		--><li class="page-item">
38
-			<a class="page-link" href="<?php $params['page']['offset'] = $prev; echo $enc->attr( $this->url( $target, $controller, $action, $params, array(), $config ) ); ?>" aria-label="<?php echo $enc->attr( $this->translate( 'admin', 'Previous' ) ); ?>">
38
+			<a class="page-link" href="<?php $params['page']['offset'] = $prev; echo $enc->attr($this->url($target, $controller, $action, $params, array(), $config)); ?>" aria-label="<?php echo $enc->attr($this->translate('admin', 'Previous')); ?>">
39 39
 				<span class="fa fa-step-backward" aria-hidden="true"></span>
40 40
 			</a>
41 41
 		</li><!--
42
-		--><li class="page-item disabled"><a class="page-link" href="#"><?php echo $enc->html( sprintf( $this->translate( 'admin', 'Page %1$d of %2$d' ), $pageCurrent, $pageTotal ) ); ?></a></li><!--
42
+		--><li class="page-item disabled"><a class="page-link" href="#"><?php echo $enc->html(sprintf($this->translate('admin', 'Page %1$d of %2$d'), $pageCurrent, $pageTotal)); ?></a></li><!--
43 43
 		--><li class="page-item">
44
-			<a class="page-link" href="<?php $params['page']['offset'] = $next; echo $enc->attr( $this->url( $target, $controller, $action, $params, array(), $config ) ); ?>" aria-label="<?php echo $enc->attr( $this->translate( 'admin', 'Next' ) ); ?>">
44
+			<a class="page-link" href="<?php $params['page']['offset'] = $next; echo $enc->attr($this->url($target, $controller, $action, $params, array(), $config)); ?>" aria-label="<?php echo $enc->attr($this->translate('admin', 'Next')); ?>">
45 45
 				<span class="fa fa-step-forward" aria-hidden="true"></span>
46 46
 			</a>
47 47
 		</li><!--
48 48
 		--><li class="page-item">
49
-			<a class="page-link" href="<?php $params['page']['offset'] = $last; echo $enc->attr( $this->url( $target, $controller, $action, $params, array(), $config ) ); ?>" aria-label="<?php echo $enc->attr( $this->translate( 'admin', 'Last' ) ); ?>">
49
+			<a class="page-link" href="<?php $params['page']['offset'] = $last; echo $enc->attr($this->url($target, $controller, $action, $params, array(), $config)); ?>" aria-label="<?php echo $enc->attr($this->translate('admin', 'Last')); ?>">
50 50
 				<span class="fa fa-fast-forward" aria-hidden="true"></span>
51 51
 			</a>
52 52
 		</li>
53 53
 	</ul>
54
-	<div class="page-limit btn-group <?php echo ( $this->get( 'pos', 'top' ) === 'bottom' ? 'dropup' : '' ); ?>" role="group">
54
+	<div class="page-limit btn-group <?php echo ($this->get('pos', 'top') === 'bottom' ? 'dropup' : ''); ?>" role="group">
55 55
 		<button type="button" class="btn btn-secondary dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
56 56
 			<?php echo $limit; ?> <span class="caret"></span>
57 57
 		</button>
58 58
 		<ul class="dropdown-menu">
59
-			<li class="dropdown-item"><a href="<?php $params['page']['limit'] = 25; echo $enc->attr( $this->url( $target, $controller, $action, $params, array(), $config ) ); ?>">25</a></li>
60
-			<li class="dropdown-item"><a href="<?php $params['page']['limit'] = 50; echo $enc->attr( $this->url( $target, $controller, $action, $params, array(), $config ) ); ?>">50</a></li>
61
-			<li class="dropdown-item"><a href="<?php $params['page']['limit'] = 100; echo $enc->attr( $this->url( $target, $controller, $action, $params, array(), $config ) ); ?>">100</a></li>
62
-			<li class="dropdown-item"><a href="<?php $params['page']['limit'] = 200; echo $enc->attr( $this->url( $target, $controller, $action, $params, array(), $config ) ); ?>">200</a></li>
63
-			<li class="dropdown-item"><a href="<?php $params['page']['limit'] = 500; echo $enc->attr( $this->url( $target, $controller, $action, $params, array(), $config ) ); ?>">500</a></li>
59
+			<li class="dropdown-item"><a href="<?php $params['page']['limit'] = 25; echo $enc->attr($this->url($target, $controller, $action, $params, array(), $config)); ?>">25</a></li>
60
+			<li class="dropdown-item"><a href="<?php $params['page']['limit'] = 50; echo $enc->attr($this->url($target, $controller, $action, $params, array(), $config)); ?>">50</a></li>
61
+			<li class="dropdown-item"><a href="<?php $params['page']['limit'] = 100; echo $enc->attr($this->url($target, $controller, $action, $params, array(), $config)); ?>">100</a></li>
62
+			<li class="dropdown-item"><a href="<?php $params['page']['limit'] = 200; echo $enc->attr($this->url($target, $controller, $action, $params, array(), $config)); ?>">200</a></li>
63
+			<li class="dropdown-item"><a href="<?php $params['page']['limit'] = 500; echo $enc->attr($this->url($target, $controller, $action, $params, array(), $config)); ?>">500</a></li>
64 64
 		</ul>
65 65
 	</div>
66 66
 </nav>
Please login to merge, or discard this patch.
admin/jqadm/templates/product/item-selection-default.php 1 patch
Spacing   +33 added lines, -33 removed lines patch added patch discarded remove patch
@@ -12,48 +12,48 @@  discard block
 block discarded – undo
12 12
 	<div id="product-item-selection-head" class="header card-header collapsed" role="tab"
13 13
 		data-toggle="collapse" data-parent="#accordion" data-target="#product-item-selection-data"
14 14
 		aria-expanded="true" aria-controls="product-item-selection-data">
15
-		<?php echo $enc->html( $this->translate( 'admin', 'Variants' ) ); ?>
15
+		<?php echo $enc->html($this->translate('admin', 'Variants')); ?>
16 16
 	</div>
17 17
 	<div id="product-item-selection-data" class="item-selection card-block panel-collapse collapse"
18 18
 		role="tabpanel" aria-labelledby="product-item-selection-head">
19 19
 		<div id="product-item-selection-group" role="tablist" aria-multiselectable="true">
20 20
 
21
-<?php foreach( (array) $this->get( 'selectionData', array() ) as $code => $map ) : ?>
21
+<?php foreach ((array) $this->get('selectionData', array()) as $code => $map) : ?>
22 22
 
23 23
 			<div class="group-item card">
24
-				<input class="item-listid" type="hidden" name="<?php echo $enc->attr( $this->formparam( array( 'selection', 'product.lists.id', '' ) ) ); ?>"
25
-					value="<?php echo $enc->attr( $this->value( $map, 'product.lists.id' ) ); ?>" />
26
-				<div id="product-item-selection-group-item-<?php echo $enc->attr( $code ); ?>" class="header card-header collapsed" role="tab"
27
-					data-toggle="collapse" data-target="#product-item-selection-group-data-<?php echo $enc->attr( $code ); ?>"
28
-					aria-expanded="true" aria-controls="product-item-selection-group-data-<?php echo $enc->attr( $code ); ?>">
24
+				<input class="item-listid" type="hidden" name="<?php echo $enc->attr($this->formparam(array('selection', 'product.lists.id', ''))); ?>"
25
+					value="<?php echo $enc->attr($this->value($map, 'product.lists.id')); ?>" />
26
+				<div id="product-item-selection-group-item-<?php echo $enc->attr($code); ?>" class="header card-header collapsed" role="tab"
27
+					data-toggle="collapse" data-target="#product-item-selection-group-data-<?php echo $enc->attr($code); ?>"
28
+					aria-expanded="true" aria-controls="product-item-selection-group-data-<?php echo $enc->attr($code); ?>">
29 29
 					<div class="btn btn-secondary fa fa-files-o"></div>
30 30
 					<div class="btn btn-danger fa fa-trash"></div>
31
-					<span class="item-code header-label"><?php echo $enc->html( $code ); ?></span>
31
+					<span class="item-code header-label"><?php echo $enc->html($code); ?></span>
32 32
 				</div>
33
-				<div id="product-item-selection-group-data-<?php echo $enc->attr( $code ); ?>" class="card-block panel-collapse collapse">
33
+				<div id="product-item-selection-group-data-<?php echo $enc->attr($code); ?>" class="card-block panel-collapse collapse">
34 34
 					<div class="col-lg-6">
35 35
 						<div class="form-group row">
36
-							<label class="col-sm-3 form-control-label"><?php echo $enc->html( $this->translate( 'admin', 'ID' ) ); ?></label>
36
+							<label class="col-sm-3 form-control-label"><?php echo $enc->html($this->translate('admin', 'ID')); ?></label>
37 37
 							<div class="col-sm-9">
38
-								<input class="item-id" type="hidden" name="<?php echo $enc->attr( $this->formparam( array( 'selection', 'product.id', '' ) ) ); ?>"
39
-									value="<?php echo $enc->attr( $this->value( $map, 'product.id' ) ); ?>" />
40
-								<p class="form-control-static group-item-id"><?php echo $enc->html( $this->value( $map, 'product.id' ) ); ?></p>
38
+								<input class="item-id" type="hidden" name="<?php echo $enc->attr($this->formparam(array('selection', 'product.id', ''))); ?>"
39
+									value="<?php echo $enc->attr($this->value($map, 'product.id')); ?>" />
40
+								<p class="form-control-static group-item-id"><?php echo $enc->html($this->value($map, 'product.id')); ?></p>
41 41
 							</div>
42 42
 						</div>
43 43
 						<div class="form-group row mandatory">
44
-							<label class="col-sm-3 form-control-label"><?php echo $enc->html( $this->translate( 'admin', 'Code' ) ); ?></label>
44
+							<label class="col-sm-3 form-control-label"><?php echo $enc->html($this->translate('admin', 'Code')); ?></label>
45 45
 							<div class="col-sm-9">
46
-								<input class="form-control item-code" type="text" name="<?php echo $enc->attr( $this->formparam( array( 'selection', 'product.code', '' ) ) ); ?>"
47
-									placeholder="<?php echo $enc->attr( $this->translate( 'admin', 'EAN, SKU or article number (required)' ) ); ?>"
48
-									value="<?php echo $enc->attr( $code ); ?>">
46
+								<input class="form-control item-code" type="text" name="<?php echo $enc->attr($this->formparam(array('selection', 'product.code', ''))); ?>"
47
+									placeholder="<?php echo $enc->attr($this->translate('admin', 'EAN, SKU or article number (required)')); ?>"
48
+									value="<?php echo $enc->attr($code); ?>">
49 49
 							</div>
50 50
 						</div>
51 51
 						<div class="form-group row mandatory">
52
-							<label class="col-sm-3 form-control-label"><?php echo $enc->html( $this->translate( 'admin', 'Label' ) ); ?></label>
52
+							<label class="col-sm-3 form-control-label"><?php echo $enc->html($this->translate('admin', 'Label')); ?></label>
53 53
 							<div class="col-sm-9">
54
-								<input class="form-control item-label" type="text" name="<?php echo $enc->attr( $this->formparam( array( 'selection', 'product.label', '' ) ) ); ?>"
55
-									placeholder="<?php echo $enc->attr( $this->translate( 'admin', 'Internal name (required)' ) ); ?>"
56
-									value="<?php echo $enc->attr( $this->value( $map, 'product.label' ) ); ?>">
54
+								<input class="form-control item-label" type="text" name="<?php echo $enc->attr($this->formparam(array('selection', 'product.label', ''))); ?>"
55
+									placeholder="<?php echo $enc->attr($this->translate('admin', 'Internal name (required)')); ?>"
56
+									value="<?php echo $enc->attr($this->value($map, 'product.label')); ?>">
57 57
 							</div>
58 58
 						</div>
59 59
 					</div>
@@ -61,20 +61,20 @@  discard block
 block discarded – undo
61 61
 						<table class="selection-item-attributes table table-default">
62 62
 							<thead>
63 63
 								<tr>
64
-									<th><?php echo $enc->html( $this->translate( 'admin', 'Variant attributes' ) ); ?></th>
64
+									<th><?php echo $enc->html($this->translate('admin', 'Variant attributes')); ?></th>
65 65
 									<th class="actions"><div class="btn btn-primary fa fa-plus"></div></th>
66 66
 								</tr>
67 67
 							</thead>
68 68
 							<tbody>
69
-<?php foreach( (array) $this->value( $map, 'attr', array() ) as $attrid => $list ) : ?>
69
+<?php foreach ((array) $this->value($map, 'attr', array()) as $attrid => $list) : ?>
70 70
 								<tr>
71 71
 									<td>
72
-										<input class="item-attr-ref" type="hidden" value="<?php echo $enc->attr( $code ); ?>"
73
-											name="<?php echo $enc->attr( $this->formparam( array( 'selection', 'attr', 'ref', '' ) ) ); ?>" />
74
-										<input class="item-attr-label" type="hidden" value="<?php echo $enc->attr( $this->value( $list, 'label' ) ); ?>"
75
-											name="<?php echo $enc->attr( $this->formparam( array( 'selection', 'attr', 'label', '' ) ) ); ?>" />
76
-										<select class="combobox item-attr-id" name="<?php echo $enc->attr( $this->formparam( array( 'selection', 'attr', 'id', '' ) ) ); ?>">
77
-											<option value="<?php echo $enc->attr( $attrid ); ?>" ><?php echo $enc->html( $this->value( $list, 'label' ) ); ?></option>
72
+										<input class="item-attr-ref" type="hidden" value="<?php echo $enc->attr($code); ?>"
73
+											name="<?php echo $enc->attr($this->formparam(array('selection', 'attr', 'ref', ''))); ?>" />
74
+										<input class="item-attr-label" type="hidden" value="<?php echo $enc->attr($this->value($list, 'label')); ?>"
75
+											name="<?php echo $enc->attr($this->formparam(array('selection', 'attr', 'label', ''))); ?>" />
76
+										<select class="combobox item-attr-id" name="<?php echo $enc->attr($this->formparam(array('selection', 'attr', 'id', ''))); ?>">
77
+											<option value="<?php echo $enc->attr($attrid); ?>" ><?php echo $enc->html($this->value($list, 'label')); ?></option>
78 78
 										</select>
79 79
 									</td>
80 80
 									<td class="actions"><div class="btn btn-danger fa fa-trash"></div></td>
@@ -82,9 +82,9 @@  discard block
 block discarded – undo
82 82
 <?php endforeach; ?>
83 83
 								<tr class="prototype">
84 84
 									<td>
85
-										<input class="item-attr-ref" type="hidden" name="<?php echo $enc->attr( $this->formparam( array( 'selection', 'attr', 'ref', '' ) ) ); ?>" value="" disabled="disabled" />
86
-										<input class="item-attr-label" type="hidden" name="<?php echo $enc->attr( $this->formparam( array( 'selection', 'attr', 'label', '' ) ) ); ?>" value="" disabled="disabled" />
87
-										<select class="combobox-prototype item-attr-id" name="<?php echo $enc->attr( $this->formparam( array( 'selection', 'attr', 'id', '' ) ) ); ?>" disabled="disabled"></select>
85
+										<input class="item-attr-ref" type="hidden" name="<?php echo $enc->attr($this->formparam(array('selection', 'attr', 'ref', ''))); ?>" value="" disabled="disabled" />
86
+										<input class="item-attr-label" type="hidden" name="<?php echo $enc->attr($this->formparam(array('selection', 'attr', 'label', ''))); ?>" value="" disabled="disabled" />
87
+										<select class="combobox-prototype item-attr-id" name="<?php echo $enc->attr($this->formparam(array('selection', 'attr', 'id', ''))); ?>" disabled="disabled"></select>
88 88
 									</td>
89 89
 									<td class="actions"><div class="btn btn-danger fa fa-trash"></div></td>
90 90
 								</tr>
@@ -97,6 +97,6 @@  discard block
 block discarded – undo
97 97
 <?php endforeach; ?>
98 98
 
99 99
 		</div>
100
-<?php echo $this->get( 'selectionBody' ); ?>
100
+<?php echo $this->get('selectionBody'); ?>
101 101
 	</div>
102 102
 </div>
Please login to merge, or discard this patch.
admin/jqadm/templates/product/item-physical-default.php 1 patch
Spacing   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -5,10 +5,10 @@  discard block
 block discarded – undo
5 5
  * @copyright Aimeos (aimeos.org), 2015
6 6
  */
7 7
 
8
-$items = $this->get( 'physicalItems', array() );
8
+$items = $this->get('physicalItems', array());
9 9
 
10
-$value = function( $type ) use ( $items ) {
11
-	return ( isset( $items[$type] ) ? $items[$type]->getValue() : '' );
10
+$value = function($type) use ($items) {
11
+	return (isset($items[$type]) ? $items[$type]->getValue() : '');
12 12
 };
13 13
 
14 14
 $enc = $this->encoder();
@@ -16,45 +16,45 @@  discard block
 block discarded – undo
16 16
 ?>
17 17
 <div class="product-item-physical card panel">
18 18
 	<div id="product-item-physical" class="header card-header collapsed" role="tab" data-toggle="collapse" data-parent="#accordion" data-target="#product-item-physical-data" aria-expanded="false" aria-controls="product-item-physical-data">
19
-		<?php echo $enc->html( $this->translate( 'admin', 'Physical values' ) ); ?>
19
+		<?php echo $enc->html($this->translate('admin', 'Physical values')); ?>
20 20
 	</div>
21 21
 	<div id="product-item-physical-data" class="item-physical card-block panel-collapse collapse" role="tabpanel" aria-labelledby="product-item-physical">
22 22
 		<div class="col-lg-6">
23 23
 			<div class="form-group row optional">
24
-				<label class="col-sm-3 form-control-label"><?php echo $enc->html( $this->translate( 'admin', 'Length' ) ); ?></label>
24
+				<label class="col-sm-3 form-control-label"><?php echo $enc->html($this->translate('admin', 'Length')); ?></label>
25 25
 				<div class="col-sm-9">
26
-					<input class="form-control item-package-length" type="text" name="<?php echo $enc->attr( $this->formparam( array( 'physical', 'package-length' ) ) ); ?>"
27
-						placeholder="<?php echo $enc->attr( $this->translate( 'admin', 'Product length, e.g. 30.0 (in yard, inch, etc.)' ) ); ?>"
28
-						value="<?php echo $enc->attr( $this->param( 'physical/package-length', $value( 'package-length' ) ) ); ?>" >
26
+					<input class="form-control item-package-length" type="text" name="<?php echo $enc->attr($this->formparam(array('physical', 'package-length'))); ?>"
27
+						placeholder="<?php echo $enc->attr($this->translate('admin', 'Product length, e.g. 30.0 (in yard, inch, etc.)')); ?>"
28
+						value="<?php echo $enc->attr($this->param('physical/package-length', $value('package-length'))); ?>" >
29 29
 				</div>
30 30
 			</div>
31 31
 			<div class="form-group row optional">
32
-				<label class="col-sm-3 form-control-label"><?php echo $enc->html( $this->translate( 'admin', 'Width' ) ); ?></label>
32
+				<label class="col-sm-3 form-control-label"><?php echo $enc->html($this->translate('admin', 'Width')); ?></label>
33 33
 				<div class="col-sm-9">
34
-					<input class="form-control item-package-width" type="text" name="<?php echo $enc->attr( $this->formparam( array( 'physical', 'package-width' ) ) ); ?>"
35
-						placeholder="<?php echo $enc->attr( $this->translate( 'admin', 'Product width, e.g. 17.5 (in yard, inch etc.)' ) ); ?>"
36
-						value="<?php echo $enc->attr( $this->param( 'physical/package-width', $value( 'package-width' ) ) ); ?>" >
34
+					<input class="form-control item-package-width" type="text" name="<?php echo $enc->attr($this->formparam(array('physical', 'package-width'))); ?>"
35
+						placeholder="<?php echo $enc->attr($this->translate('admin', 'Product width, e.g. 17.5 (in yard, inch etc.)')); ?>"
36
+						value="<?php echo $enc->attr($this->param('physical/package-width', $value('package-width'))); ?>" >
37 37
 				</div>
38 38
 			</div>
39 39
 			<div class="form-group row optional">
40
-				<label class="col-sm-3 form-control-label"><?php echo $enc->html( $this->translate( 'admin', 'Height' ) ); ?></label>
40
+				<label class="col-sm-3 form-control-label"><?php echo $enc->html($this->translate('admin', 'Height')); ?></label>
41 41
 				<div class="col-sm-9">
42
-					<input class="form-control item-package-height" type="text" name="<?php echo $enc->attr( $this->formparam( array( 'physical', 'package-height' ) ) ); ?>"
43
-						placeholder="<?php echo $enc->attr( $this->translate( 'admin', 'Product height, e.g. 20.0 (in yard, inch, etc.)' ) ); ?>"
44
-						value="<?php echo $enc->attr( $this->param( 'physical/package-height', $value( 'package-height' ) ) ); ?>" >
42
+					<input class="form-control item-package-height" type="text" name="<?php echo $enc->attr($this->formparam(array('physical', 'package-height'))); ?>"
43
+						placeholder="<?php echo $enc->attr($this->translate('admin', 'Product height, e.g. 20.0 (in yard, inch, etc.)')); ?>"
44
+						value="<?php echo $enc->attr($this->param('physical/package-height', $value('package-height'))); ?>" >
45 45
 				</div>
46 46
 			</div>
47 47
 		</div>
48 48
 		<div class="col-lg-6">
49 49
 			<div class="form-group row optional">
50
-				<label class="col-sm-3 form-control-label"><?php echo $enc->html( $this->translate( 'admin', 'Weight' ) ); ?></label>
50
+				<label class="col-sm-3 form-control-label"><?php echo $enc->html($this->translate('admin', 'Weight')); ?></label>
51 51
 				<div class="col-sm-9">
52
-					<input class="form-control item-package-weight" type="text" name="<?php echo $enc->attr( $this->formparam( array( 'physical', 'package-weight' ) ) ); ?>"
53
-						placeholder="<?php echo $enc->attr( $this->translate( 'admin', 'Product weight, e.g. 1.25 (in pound, ounce, etc.)' ) ); ?>"
54
-						value="<?php echo $enc->attr( $this->param( 'physical/package-weight', $value( 'package-weight' ) ) ); ?>" >
52
+					<input class="form-control item-package-weight" type="text" name="<?php echo $enc->attr($this->formparam(array('physical', 'package-weight'))); ?>"
53
+						placeholder="<?php echo $enc->attr($this->translate('admin', 'Product weight, e.g. 1.25 (in pound, ounce, etc.)')); ?>"
54
+						value="<?php echo $enc->attr($this->param('physical/package-weight', $value('package-weight'))); ?>" >
55 55
 				</div>
56 56
 			</div>
57 57
 		</div>
58
-<?php echo $this->get( 'physicalBody' ); ?>
58
+<?php echo $this->get('physicalBody'); ?>
59 59
 	</div>
60 60
 </div>
Please login to merge, or discard this patch.