@@ -17,77 +17,77 @@ |
||
17 | 17 | |
18 | 18 | protected function setUp() |
19 | 19 | { |
20 | - $this->mock = $this->getMockBuilder( 'Aimeos\Admin\JQAdm\Product\Standard' ) |
|
21 | - ->setMethods( array( 'copy', 'create', 'delete', 'get', 'save', 'search', 'getSubClient' ) ) |
|
20 | + $this->mock = $this->getMockBuilder('Aimeos\Admin\JQAdm\Product\Standard') |
|
21 | + ->setMethods(array('copy', 'create', 'delete', 'get', 'save', 'search', 'getSubClient')) |
|
22 | 22 | ->disableOriginalConstructor() |
23 | 23 | ->getMock(); |
24 | 24 | |
25 | 25 | $context = \TestHelperJqadm::getContext(); |
26 | 26 | |
27 | - $this->object = new \Aimeos\Admin\JQAdm\Common\Decorator\Page( $this->mock, $context ); |
|
28 | - $this->object->setAimeos( \TestHelperJqadm::getAimeos() ); |
|
29 | - $this->object->setView( \TestHelperJqadm::getView() ); |
|
27 | + $this->object = new \Aimeos\Admin\JQAdm\Common\Decorator\Page($this->mock, $context); |
|
28 | + $this->object->setAimeos(\TestHelperJqadm::getAimeos()); |
|
29 | + $this->object->setView(\TestHelperJqadm::getView()); |
|
30 | 30 | } |
31 | 31 | |
32 | 32 | |
33 | 33 | protected function tearDown() |
34 | 34 | { |
35 | - unset( $this->object, $this->mock ); |
|
35 | + unset($this->object, $this->mock); |
|
36 | 36 | } |
37 | 37 | |
38 | 38 | |
39 | 39 | public function testCopy() |
40 | 40 | { |
41 | - $this->mock->expects( $this->once() )->method( 'copy' )->will( $this->returnValue( 'test' ) ); |
|
41 | + $this->mock->expects($this->once())->method('copy')->will($this->returnValue('test')); |
|
42 | 42 | |
43 | - $this->assertEquals( 'test', $this->object->copy() ); |
|
43 | + $this->assertEquals('test', $this->object->copy()); |
|
44 | 44 | } |
45 | 45 | |
46 | 46 | |
47 | 47 | public function testCreate() |
48 | 48 | { |
49 | - $this->mock->expects( $this->once() )->method( 'create' )->will( $this->returnValue( 'test' ) ); |
|
49 | + $this->mock->expects($this->once())->method('create')->will($this->returnValue('test')); |
|
50 | 50 | |
51 | - $this->assertEquals( 'test', $this->object->create() ); |
|
51 | + $this->assertEquals('test', $this->object->create()); |
|
52 | 52 | } |
53 | 53 | |
54 | 54 | |
55 | 55 | public function testDelete() |
56 | 56 | { |
57 | - $this->mock->expects( $this->once() )->method( 'delete' )->will( $this->returnValue( 'test' ) ); |
|
57 | + $this->mock->expects($this->once())->method('delete')->will($this->returnValue('test')); |
|
58 | 58 | |
59 | - $this->assertEquals( 'test', $this->object->delete() ); |
|
59 | + $this->assertEquals('test', $this->object->delete()); |
|
60 | 60 | } |
61 | 61 | |
62 | 62 | |
63 | 63 | public function testGet() |
64 | 64 | { |
65 | - $this->mock->expects( $this->once() )->method( 'get' )->will( $this->returnValue( 'test' ) ); |
|
65 | + $this->mock->expects($this->once())->method('get')->will($this->returnValue('test')); |
|
66 | 66 | |
67 | - $this->assertEquals( 'test', $this->object->get() ); |
|
67 | + $this->assertEquals('test', $this->object->get()); |
|
68 | 68 | } |
69 | 69 | |
70 | 70 | |
71 | 71 | public function testSave() |
72 | 72 | { |
73 | - $this->mock->expects( $this->once() )->method( 'save' )->will( $this->returnValue( 'test' ) ); |
|
73 | + $this->mock->expects($this->once())->method('save')->will($this->returnValue('test')); |
|
74 | 74 | |
75 | - $this->assertEquals( 'test', $this->object->save() ); |
|
75 | + $this->assertEquals('test', $this->object->save()); |
|
76 | 76 | } |
77 | 77 | |
78 | 78 | |
79 | 79 | public function testSearch() |
80 | 80 | { |
81 | - $this->mock->expects( $this->once() )->method( 'search' )->will( $this->returnValue( 'test' ) ); |
|
81 | + $this->mock->expects($this->once())->method('search')->will($this->returnValue('test')); |
|
82 | 82 | |
83 | - $this->assertEquals( 'test', $this->object->search() ); |
|
83 | + $this->assertEquals('test', $this->object->search()); |
|
84 | 84 | } |
85 | 85 | |
86 | 86 | |
87 | 87 | public function testGetSubClient() |
88 | 88 | { |
89 | - $this->mock->expects( $this->once() )->method( 'getSubClient' )->will( $this->returnValue( 'test' ) ); |
|
89 | + $this->mock->expects($this->once())->method('getSubClient')->will($this->returnValue('test')); |
|
90 | 90 | |
91 | - $this->assertEquals( 'test', $this->object->getSubClient( 'unknown' ) ); |
|
91 | + $this->assertEquals('test', $this->object->getSubClient('unknown')); |
|
92 | 92 | } |
93 | 93 | } |
@@ -17,7 +17,7 @@ |
||
17 | 17 | <div class="btn btn-card-header act-show fa"></div> |
18 | 18 | </div> |
19 | 19 | <span class="item-label header-label"> |
20 | - <?= $enc->html( $this->translate( 'admin', 'Sales of the last 30 days' ) ); ?> |
|
20 | + <?= $enc->html($this->translate('admin', 'Sales of the last 30 days')); ?> |
|
21 | 21 | </span> |
22 | 22 | </div> |
23 | 23 | <div id="order-salesday-data" class="card-block collapse show content loading" role="tabpanel" |
@@ -7,14 +7,14 @@ discard block |
||
7 | 7 | |
8 | 8 | $enc = $this->encoder(); |
9 | 9 | $trans = array( |
10 | - '-1' => $this->translate( 'mshop/code', 'pay:-1' ), |
|
11 | - '0' => $this->translate( 'mshop/code', 'pay:0' ), |
|
12 | - '1' => $this->translate( 'mshop/code', 'pay:1' ), |
|
13 | - '2' => $this->translate( 'mshop/code', 'pay:2' ), |
|
14 | - '3' => $this->translate( 'mshop/code', 'pay:3' ), |
|
15 | - '4' => $this->translate( 'mshop/code', 'pay:4' ), |
|
16 | - '5' => $this->translate( 'mshop/code', 'pay:5' ), |
|
17 | - '6' => $this->translate( 'mshop/code', 'pay:6' ), |
|
10 | + '-1' => $this->translate('mshop/code', 'pay:-1'), |
|
11 | + '0' => $this->translate('mshop/code', 'pay:0'), |
|
12 | + '1' => $this->translate('mshop/code', 'pay:1'), |
|
13 | + '2' => $this->translate('mshop/code', 'pay:2'), |
|
14 | + '3' => $this->translate('mshop/code', 'pay:3'), |
|
15 | + '4' => $this->translate('mshop/code', 'pay:4'), |
|
16 | + '5' => $this->translate('mshop/code', 'pay:5'), |
|
17 | + '6' => $this->translate('mshop/code', 'pay:6'), |
|
18 | 18 | ); |
19 | 19 | |
20 | 20 | ?> |
@@ -26,11 +26,11 @@ discard block |
||
26 | 26 | <div class="btn btn-card-header act-show fa"></div> |
27 | 27 | </div> |
28 | 28 | <span class="item-label header-label"> |
29 | - <?= $enc->html( $this->translate( 'admin', 'Orders by payment status' ) ); ?> |
|
29 | + <?= $enc->html($this->translate('admin', 'Orders by payment status')); ?> |
|
30 | 30 | </span> |
31 | 31 | </div> |
32 | 32 | <div id="order-countpaystatus-data" class="card-block collapse show content loading" role="tabpanel" |
33 | - aria-labelledby="order-countpaystatus-head" data-translation="<?= $enc->attr( json_encode( $trans ) ); ?>"> |
|
33 | + aria-labelledby="order-countpaystatus-head" data-translation="<?= $enc->attr(json_encode($trans)); ?>"> |
|
34 | 34 | </div> |
35 | 35 | </div> |
36 | -<?= $this->get( 'orderpaymentstatusBody' ); ?> |
|
36 | +<?= $this->get('orderpaymentstatusBody'); ?> |
@@ -17,11 +17,11 @@ |
||
17 | 17 | <div class="btn btn-card-header act-show fa"></div> |
18 | 18 | </div> |
19 | 19 | <span class="item-label header-label"> |
20 | - <?= $enc->html( $this->translate( 'admin', 'Delivery types' ) ); ?> |
|
20 | + <?= $enc->html($this->translate('admin', 'Delivery types')); ?> |
|
21 | 21 | </span> |
22 | 22 | </div> |
23 | 23 | <div id="order-servicedelivery-data" class="card-block collapse show content loading" role="tabpanel" |
24 | 24 | aria-labelledby="order-servicedelivery-head"> |
25 | 25 | </div> |
26 | 26 | </div> |
27 | -<?= $this->get( 'orderdeliverytypeBody' ); ?> |
|
27 | +<?= $this->get('orderdeliverytypeBody'); ?> |
@@ -17,11 +17,11 @@ |
||
17 | 17 | <div class="btn btn-card-header act-show fa"></div> |
18 | 18 | </div> |
19 | 19 | <span class="item-label header-label"> |
20 | - <?= $enc->html( $this->translate( 'admin', 'Sales by weekday' ) ); ?> |
|
20 | + <?= $enc->html($this->translate('admin', 'Sales by weekday')); ?> |
|
21 | 21 | </span> |
22 | 22 | </div> |
23 | 23 | <div id="order-salesweekday-data" class="card-block collapse show content loading" role="tabpanel" |
24 | 24 | aria-labelledby="order-salesweekday-head"> |
25 | 25 | </div> |
26 | 26 | </div> |
27 | -<?= $this->get( 'orderweekdayBody' ); ?> |
|
27 | +<?= $this->get('orderweekdayBody'); ?> |
@@ -17,11 +17,11 @@ |
||
17 | 17 | <div class="btn btn-card-header act-show fa"></div> |
18 | 18 | </div> |
19 | 19 | <span class="item-label header-label"> |
20 | - <?= $enc->html( $this->translate( 'admin', 'Payment types' ) ); ?> |
|
20 | + <?= $enc->html($this->translate('admin', 'Payment types')); ?> |
|
21 | 21 | </span> |
22 | 22 | </div> |
23 | 23 | <div id="order-servicepayment-data" class="card-block collapse show content loading" role="tabpanel" |
24 | 24 | aria-labelledby="order-servicepayment-head"> |
25 | 25 | </div> |
26 | 26 | </div> |
27 | -<?= $this->get( 'orderpaymenttypeBody' ); ?> |
|
27 | +<?= $this->get('orderpaymenttypeBody'); ?> |
@@ -17,7 +17,7 @@ |
||
17 | 17 | <div class="btn btn-card-header act-show fa"></div> |
18 | 18 | </div> |
19 | 19 | <span class="item-label header-label"> |
20 | - <?= $enc->html( $this->translate( 'admin', 'Sales per month' ) ); ?> |
|
20 | + <?= $enc->html($this->translate('admin', 'Sales per month')); ?> |
|
21 | 21 | </span> |
22 | 22 | </div> |
23 | 23 | <div id="order-salesmonth-data" class="card-block collapse show content loading" role="tabpanel" |
@@ -7,21 +7,21 @@ discard block |
||
7 | 7 | |
8 | 8 | $enc = $this->encoder(); |
9 | 9 | $params = $this->param(); |
10 | -$items = $this->get( 'jobItems', [] ); |
|
10 | +$items = $this->get('jobItems', []); |
|
11 | 11 | |
12 | -$getTarget = $this->config( 'admin/jqadm/url/get/target' ); |
|
13 | -$getCntl = $this->config( 'admin/jqadm/url/get/controller', 'Jqadm' ); |
|
14 | -$getAction = $this->config( 'admin/jqadm/url/get/action', 'get' ); |
|
15 | -$getConfig = $this->config( 'admin/jqadm/url/get/config', [] ); |
|
12 | +$getTarget = $this->config('admin/jqadm/url/get/target'); |
|
13 | +$getCntl = $this->config('admin/jqadm/url/get/controller', 'Jqadm'); |
|
14 | +$getAction = $this->config('admin/jqadm/url/get/action', 'get'); |
|
15 | +$getConfig = $this->config('admin/jqadm/url/get/config', []); |
|
16 | 16 | |
17 | -$delTarget = $this->config( 'admin/jqadm/url/delete/target' ); |
|
18 | -$delCntl = $this->config( 'admin/jqadm/url/delete/controller', 'Jqadm' ); |
|
19 | -$delAction = $this->config( 'admin/jqadm/url/delete/action', 'delete' ); |
|
20 | -$delConfig = $this->config( 'admin/jqadm/url/delete/config', [] ); |
|
17 | +$delTarget = $this->config('admin/jqadm/url/delete/target'); |
|
18 | +$delCntl = $this->config('admin/jqadm/url/delete/controller', 'Jqadm'); |
|
19 | +$delAction = $this->config('admin/jqadm/url/delete/action', 'delete'); |
|
20 | +$delConfig = $this->config('admin/jqadm/url/delete/config', []); |
|
21 | 21 | |
22 | 22 | |
23 | 23 | ?> |
24 | -<?php if( !empty( $items ) ) : ?> |
|
24 | +<?php if (!empty($items)) : ?> |
|
25 | 25 | <div class="dashboard-job row"> |
26 | 26 | <div class="job-list card col-lg-12"> |
27 | 27 | <div id="job-list-head" class="card-header header" role="tab" |
@@ -31,28 +31,28 @@ discard block |
||
31 | 31 | <div class="btn btn-card-header act-show fa"></div> |
32 | 32 | </div> |
33 | 33 | <span class="item-label header-label"> |
34 | - <?= $enc->html( $this->translate( 'admin', 'Import/Export jobs' ) ); ?> |
|
34 | + <?= $enc->html($this->translate('admin', 'Import/Export jobs')); ?> |
|
35 | 35 | </span> |
36 | 36 | </div> |
37 | 37 | <div id="job-list-data" class="card-block content collapse show" role="tabpanel" aria-labelledby="job-list-head"> |
38 | 38 | <div class="table-responsive"> |
39 | 39 | <table class="list-items table table-hover"> |
40 | 40 | <tbody> |
41 | - <?php foreach( $items as $id => $item ) : ?> |
|
41 | + <?php foreach ($items as $id => $item) : ?> |
|
42 | 42 | <tr> |
43 | - <td class="job-label"><?= $enc->html( $item->getLabel() ); ?></td> |
|
44 | - <td class="job-mtime"><?= $enc->html( $item->getTimeModified() ); ?></td> |
|
43 | + <td class="job-label"><?= $enc->html($item->getLabel()); ?></td> |
|
44 | + <td class="job-mtime"><?= $enc->html($item->getTimeModified()); ?></td> |
|
45 | 45 | <td class="actions"> |
46 | - <?php if( !$this->site()->readonly( $item->getSiteId() ) ) : ?> |
|
46 | + <?php if (!$this->site()->readonly($item->getSiteId())) : ?> |
|
47 | 47 | <a class="btn act-delete fa" tabindex="1" |
48 | - href="<?= $enc->attr( $this->url( $delTarget, $delCntl, $delAction, ['resource' => 'dashboard', 'id' => $id] + $params, [], $delConfig ) ); ?>" |
|
49 | - title="<?= $enc->attr( $this->translate( 'admin', 'Delete this entry') ); ?>" |
|
50 | - aria-label="<?= $enc->attr( $this->translate( 'admin', 'Delete' ) ); ?>"></a> |
|
48 | + href="<?= $enc->attr($this->url($delTarget, $delCntl, $delAction, ['resource' => 'dashboard', 'id' => $id] + $params, [], $delConfig)); ?>" |
|
49 | + title="<?= $enc->attr($this->translate('admin', 'Delete this entry')); ?>" |
|
50 | + aria-label="<?= $enc->attr($this->translate('admin', 'Delete')); ?>"></a> |
|
51 | 51 | <?php endif; ?> |
52 | 52 | <a class="btn act-download fa" tabindex="1" |
53 | - href="<?= $enc->attr( $this->url( $getTarget, $getCntl, $getAction, ['resource' => 'dashboard', 'id' => $id] + $params, [], $getConfig ) ); ?>" |
|
54 | - title="<?= $enc->attr( $this->translate( 'admin', 'Download this file') ); ?>" |
|
55 | - aria-label="<?= $enc->attr( $this->translate( 'admin', 'Download' ) ); ?>"></a> |
|
53 | + href="<?= $enc->attr($this->url($getTarget, $getCntl, $getAction, ['resource' => 'dashboard', 'id' => $id] + $params, [], $getConfig)); ?>" |
|
54 | + title="<?= $enc->attr($this->translate('admin', 'Download this file')); ?>" |
|
55 | + aria-label="<?= $enc->attr($this->translate('admin', 'Download')); ?>"></a> |
|
56 | 56 | </td> |
57 | 57 | </tr> |
58 | 58 | <?php endforeach; ?> |
@@ -17,11 +17,11 @@ |
||
17 | 17 | <div class="btn btn-card-header act-show fa"></div> |
18 | 18 | </div> |
19 | 19 | <span class="item-label header-label"> |
20 | - <?= $enc->html( $this->translate( 'admin', 'Orders by hour' ) ); ?> |
|
20 | + <?= $enc->html($this->translate('admin', 'Orders by hour')); ?> |
|
21 | 21 | </span> |
22 | 22 | </div> |
23 | 23 | <div id="order-counthour-data" class="card-block collapse show content loading" role="tabpanel" |
24 | 24 | aria-labelledby="order-counthour-head"> |
25 | 25 | </div> |
26 | 26 | </div> |
27 | -<?= $this->get( 'orderhourBody' ); ?> |
|
27 | +<?= $this->get('orderhourBody'); ?> |