Subversion Repositories SmartDukaan

Rev

Rev 15848 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
14099 anikendra 1
<div class="container">
2
	<div class="row">
3
		<div class="col-lg-3">
4
			<?php echo $this->Element('adminactions');?>
5
		</div>
6
		<div class="col-lg-9">
14517 anikendra 7
			<div class="searchbar">
8
				<form class="navbar-form" role="search" method="GET" name="search" action="searchdp">
9
					<div class="input-group col-xs-6 text-left">
14584 anikendra 10
						<!-- Search By Sku :<input type="hidden" name="type" value="sku" /> -->
11
						Search By Sku :
12
						<input type="radio" name="type" value="sku" selected="selected"/>Sku
13
						<input type="radio" name="type" value="skuBundleId"/>Sku Bundle Id
14517 anikendra 14
					</div>
15
			        <div class="input-group col-xs-6 text-right" id="remote">
16
			            <input autocomplete="off" type="text" class="form-control" placeholder="Search for items" name="search" id="srch-term">
17
			            <div class="input-group-btn w25px">
18
			                <button class="btn btn-default" type="submit"><i class="glyphicon glyphicon-search"></i></button>
19
			            </div>
20
			        </div>
21
			    </form>
22
			</div>
14099 anikendra 23
			<h2><?php echo __('Dealer Prices'); ?></h2>
24
			<table class="table table-striped">
16234 anikendra 25
			<tr>					
14584 anikendra 26
					<th><?php echo __('Bundle Id'); ?></th>
14099 anikendra 27
					<th><?php echo __('Brand'); ?></th>
28
					<th><?php echo __('Name'); ?></th>
29
				 	<th><?php echo __('dp'); ?></th> 
16234 anikendra 30
				 	<th><?php echo __('showDp'); ?></th>
14099 anikendra 31
					<th class="actions"><?php echo __('Actions'); ?></th>
32
			</tr>			
33
			<?php foreach ($dealerprices as $dp): ?>
14517 anikendra 34
			<?php 
35
			if(!is_array($dp)){
36
				$dp = json_decode($dp,1);
37
			}?>
16234 anikendra 38
			<tr>				
14584 anikendra 39
				<td><?php echo h($dp['skuBundleId']); ?>&nbsp;</td>
14099 anikendra 40
				<td><?php echo h($dp['brand']); ?>&nbsp;</td>				
41
				<td id="source_product_name" data-oid="<?php echo $dp['_id']['$oid'];?>" ><?php echo h($dp['source_product_name']); ?></td>
42
				<td class="edit" id="dp" data-oid="<?php echo $dp['_id']['$oid'];?>" ><?php echo h($dp['dp']); ?></td>
16234 anikendra 43
				<td class="editable" id="showDp" data-oid="<?php echo $dp['_id']['$oid'];?>"><?php echo intval($dp['showDp'])==1?'Yes':'No'; ?></td>
14099 anikendra 44
				<td class="actions">
45
					<?php //echo $this->Html->link(__('Edit'), array('action' => 'edit', $dp['_id']['$oid'])); ?>
14517 anikendra 46
					<?php echo $this->Form->postLink(__('Delete'), array('action' => 'deletedp', $dp['_id']['$oid']), null, __('Are you sure you want to delete # %s?', $dp['_id']['$oid'])); ?>
14099 anikendra 47
				</td>
48
			</tr>
49
		<?php endforeach; ?>
50
			</table>			
51
		</div>
52
	</div>
53
	<nav>
54
	  <ul class="pager">
55
	  	<?php if($page>1):?>
56
	    <li><a href="?page=<?php echo $page-1;?>">Previous</a></li>
57
		<?php endif;?>
58
	    <li><a href="?page=<?php echo $page+1;?>">Next</a></li>
59
	  </ul>
60
	</nav>
16234 anikendra 61
</div>	
62
<script type="text/javascript">
63
// controller = 'SkuDealerPrices';
64
$(document).ready(function() {    
65
	$('.editable').editable(base_url+'admin/'+controller+'/update', {
66
		data   : "{0:'No',1:'Yes'}",
67
		type   : 'select',
68
		submit : 'OK',
69
		tooltip   : 'Click to edit...',
70
		submitdata : function(value, settings) {
71
		   	return {oid: $(this).data('oid')};
72
		}
73
	});
74
});
75
</script>