Subversion Repositories SmartDukaan

Rev

Rev 14517 | Blame | Compare with Previous | Last modification | View Log | RSS feed

<div class="container">
        <div class="row">
                <div class="col-lg-3">
                        <?php echo $this->Element('adminactions');?>
                </div>
                <div class="col-lg-9">  <h2><?php echo __('Exceptional Sku Discounts'); ?></h2>
                        <?php echo $this->element('adminsearch');?>
                        <table class="table">
                        <tr>
                                        <th><?php echo ('skuBundleId'); ?></th>
                                        <th><?php echo ('name'); ?></th>
                                        <th><?php echo ('min_discount'); ?></th>
                                        <th><?php echo ('max_discount'); ?></th>
                                        <th><?php echo ('discountType'); ?></th>
                                        <th class="actions"><?php echo __('Actions'); ?></th>
                        </tr>
                        <?php foreach ($exceptionalskudiscounts as $exceptionalskudiscount): ?>
                        <?php if(!is_array($exceptionalskudiscount)){
                                $exceptionalskudiscount = json_decode($exceptionalskudiscount,1);
                        }?>
                        <tr>
                                <td><?php echo h($exceptionalskudiscount['skuBundleId']); ?>&nbsp;</td>
                                <td><?php echo h($exceptionalskudiscount['source_product_name']); ?>&nbsp;</td>
                                <td class="edit" id="min_discount" data-oid="<?php echo $exceptionalskudiscount['_id']['$oid'];?>"><?php echo h($exceptionalskudiscount['min_discount']); ?></td>
                                <td class="edit" id="max_discount" data-oid="<?php echo $exceptionalskudiscount['_id']['$oid'];?>"><?php echo h($exceptionalskudiscount['max_discount']); ?></td>
                                <td class="editable" id="discountType" data-oid="<?php echo $exceptionalskudiscount['_id']['$oid'];?>"><?php echo h($exceptionalskudiscount['discountType']); ?></td>
                                <td class="actions">
                                        <?php //echo $this->Html->link(__('Edit'), array('action' => 'edit', $exceptionalskudiscount['_id']['$oid'])); ?>
                                        <?php echo $this->Form->postLink(__('Delete'), array('action' => 'delete', $exceptionalskudiscount['_id']['$oid']), null, __('Are you sure you want to delete # %s?', $exceptionalskudiscount['_id']['$oid'])); ?>
                                </td>
                        </tr>
                <?php endforeach; ?>
                        </table>                        
                </div>
        </div>
        <nav>
          <ul class="pager">
                <?php if($page>1):?>
            <li><a href="?page=<?php echo $page-1;?>">Previous</a></li>
                <?php endif;?>
            <li><a href="?page=<?php echo $page+1;?>">Next</a></li>
          </ul>
        </nav>
</div>
<script type="text/javascript">
 $(document).ready(function() {    
        $('.editable').editable(base_url+'admin/'+controller+'/update', {
                data   : "{'DP':'DP','MRP':'MRP'}",
                type   : 'select',
                submit : 'OK',
                tooltip   : 'Click to edit...',
                indicator : 'Saving...',
                submitdata : function(value, settings) {
                        return {oid: $(this).data('oid')};
                }
        });
});
</script>