Subversion Repositories SmartDukaan

Rev

Rev 15848 | 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">
                        <div class="searchbar">
                                <form class="navbar-form" role="search" method="GET" name="search" action="searchdp">
                                        <div class="input-group col-xs-6 text-left">
                                                <!-- Search By Sku :<input type="hidden" name="type" value="sku" /> -->
                                                Search By Sku :
                                                <input type="radio" name="type" value="sku" selected="selected"/>Sku
                                                <input type="radio" name="type" value="skuBundleId"/>Sku Bundle Id
                                        </div>
                                <div class="input-group col-xs-6 text-right" id="remote">
                                    <input autocomplete="off" type="text" class="form-control" placeholder="Search for items" name="search" id="srch-term">
                                    <div class="input-group-btn w25px">
                                        <button class="btn btn-default" type="submit"><i class="glyphicon glyphicon-search"></i></button>
                                    </div>
                                </div>
                            </form>
                        </div>
                        <h2><?php echo __('Dealer Prices'); ?></h2>
                        <table class="table table-striped">
                        <tr>                                    
                                        <th><?php echo __('Bundle Id'); ?></th>
                                        <th><?php echo __('Brand'); ?></th>
                                        <th><?php echo __('Name'); ?></th>
                                        <th><?php echo __('dp'); ?></th> 
                                        <th><?php echo __('showDp'); ?></th>
                                        <th class="actions"><?php echo __('Actions'); ?></th>
                        </tr>                   
                        <?php foreach ($dealerprices as $dp): ?>
                        <?php 
                        if(!is_array($dp)){
                                $dp = json_decode($dp,1);
                        }?>
                        <tr>                            
                                <td><?php echo h($dp['skuBundleId']); ?>&nbsp;</td>
                                <td><?php echo h($dp['brand']); ?>&nbsp;</td>                           
                                <td id="source_product_name" data-oid="<?php echo $dp['_id']['$oid'];?>" ><?php echo h($dp['source_product_name']); ?></td>
                                <td class="edit" id="dp" data-oid="<?php echo $dp['_id']['$oid'];?>" ><?php echo h($dp['dp']); ?></td>
                                <td class="editable" id="showDp" data-oid="<?php echo $dp['_id']['$oid'];?>"><?php echo intval($dp['showDp'])==1?'Yes':'No'; ?></td>
                                <td class="actions">
                                        <?php //echo $this->Html->link(__('Edit'), array('action' => 'edit', $dp['_id']['$oid'])); ?>
                                        <?php echo $this->Form->postLink(__('Delete'), array('action' => 'deletedp', $dp['_id']['$oid']), null, __('Are you sure you want to delete # %s?', $dp['_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">
// controller = 'SkuDealerPrices';
$(document).ready(function() {    
        $('.editable').editable(base_url+'admin/'+controller+'/update', {
                data   : "{0:'No',1:'Yes'}",
                type   : 'select',
                submit : 'OK',
                tooltip   : 'Click to edit...',
                submitdata : function(value, settings) {
                        return {oid: $(this).data('oid')};
                }
        });
});
</script>