| 13579 |
anikendra |
1 |
<div class="container">
|
|
|
2 |
<div class="row">
|
|
|
3 |
<div class="col-lg-3">
|
|
|
4 |
<?php echo $this->Element('categorydiscountactions');?>
|
|
|
5 |
</div>
|
|
|
6 |
<div class="col-lg-9">
|
|
|
7 |
<h2><?php echo __('Category Discounts'); ?></h2>
|
|
|
8 |
<table class="table table-striped">
|
|
|
9 |
<tr>
|
| 13633 |
anikendra |
10 |
<th><?php echo $this->Paginator->sort('category_id'); ?></th>
|
|
|
11 |
<th><?php echo $this->Paginator->sort('brand'); ?></th>
|
|
|
12 |
<th><?php echo $this->Paginator->sort('min_discount'); ?></th>
|
|
|
13 |
<th><?php echo $this->Paginator->sort('max_discount'); ?></th>
|
|
|
14 |
<th><?php echo $this->Paginator->sort('discountType'); ?></th>
|
|
|
15 |
<th class="actions"><?php echo __('Actions'); ?></th>
|
| 13579 |
anikendra |
16 |
</tr>
|
|
|
17 |
<?php foreach ($categoryDiscounts as $categoryDiscount): ?>
|
| 13633 |
anikendra |
18 |
<?php $categoryDiscount = json_decode($categoryDiscount,1);?>
|
| 13579 |
anikendra |
19 |
<tr>
|
| 13633 |
anikendra |
20 |
<td><?php echo $categories[$categoryDiscount['category_id']];?>
|
| 13579 |
anikendra |
21 |
<?php //echo $this->Html->link($categoryDiscount['Category']['name'], array('controller' => 'categories', 'action' => 'view', $categoryDiscount['Category']['id'])); ?>
|
|
|
22 |
</td>
|
| 13633 |
anikendra |
23 |
<td><?php echo h($categoryDiscount['brand']); ?> </td>
|
|
|
24 |
<td><?php echo h($categoryDiscount['min_discount']); ?> </td>
|
|
|
25 |
<td><?php echo h($categoryDiscount['max_discount']); ?> </td>
|
|
|
26 |
<td><?php echo h($categoryDiscount['discountType']); ?> </td>
|
| 13579 |
anikendra |
27 |
<td class="actions">
|
| 13633 |
anikendra |
28 |
<?php echo $this->Html->link(__('Edit'), array('action' => 'edit', $categoryDiscount['_id']['$oid'])); ?>
|
|
|
29 |
<?php echo $this->Form->postLink(__('Delete'), array('action' => 'delete', $categoryDiscount['_id']['$oid']), null, __('Are you sure you want to delete # %s?', $categoryDiscount['CategoryDiscount']['id'])); ?>
|
| 13579 |
anikendra |
30 |
</td>
|
|
|
31 |
</tr>
|
|
|
32 |
<?php endforeach; ?>
|
|
|
33 |
</table>
|
|
|
34 |
<p>
|
|
|
35 |
<?php
|
|
|
36 |
echo $this->Paginator->counter(array(
|
|
|
37 |
'format' => __('Page {:page} of {:pages}, showing {:current} records out of {:count} total, starting on record {:start}, ending on {:end}')
|
|
|
38 |
));
|
|
|
39 |
?> </p>
|
|
|
40 |
<div class="paging">
|
|
|
41 |
<?php
|
|
|
42 |
echo $this->Paginator->prev('< ' . __('previous'), array(), null, array('class' => 'prev disabled'));
|
|
|
43 |
echo $this->Paginator->numbers(array('separator' => ''));
|
|
|
44 |
echo $this->Paginator->next(__('next') . ' >', array(), null, array('class' => 'next disabled'));
|
|
|
45 |
?>
|
|
|
46 |
</div>
|
|
|
47 |
</div>
|
|
|
48 |
</div>
|
| 13633 |
anikendra |
49 |
</div>
|