Subversion Repositories SmartDukaan

Rev

Rev 15848 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 15848 Rev 16234
Line 20... Line 20...
20
			        </div>
20
			        </div>
21
			    </form>
21
			    </form>
22
			</div>
22
			</div>
23
			<h2><?php echo __('Dealer Prices'); ?></h2>
23
			<h2><?php echo __('Dealer Prices'); ?></h2>
24
			<table class="table table-striped">
24
			<table class="table table-striped">
25
			<tr>
25
			<tr>					
26
					<!-- <th><?php //echo __('skuBu'); ?></th> -->
-
 
27
					<th><?php echo __('Bundle Id'); ?></th>
26
					<th><?php echo __('Bundle Id'); ?></th>
28
					<th><?php echo __('Brand'); ?></th>
27
					<th><?php echo __('Brand'); ?></th>
29
					<th><?php echo __('Name'); ?></th>
28
					<th><?php echo __('Name'); ?></th>
30
				 	<th><?php echo __('dp'); ?></th> 
29
				 	<th><?php echo __('dp'); ?></th> 
-
 
30
				 	<th><?php echo __('showDp'); ?></th>
31
					<th class="actions"><?php echo __('Actions'); ?></th>
31
					<th class="actions"><?php echo __('Actions'); ?></th>
32
			</tr>			
32
			</tr>			
33
			<?php foreach ($dealerprices as $dp): ?>
33
			<?php foreach ($dealerprices as $dp): ?>
34
			<?php 
34
			<?php 
35
			if(!is_array($dp)){
35
			if(!is_array($dp)){
36
				$dp = json_decode($dp,1);
36
				$dp = json_decode($dp,1);
37
			}?>
37
			}?>
38
			<tr>
38
			<tr>				
39
				<!-- <td><?php //echo h($dp['sku']); ?>&nbsp;</td> -->
-
 
40
				<td><?php echo h($dp['skuBundleId']); ?>&nbsp;</td>
39
				<td><?php echo h($dp['skuBundleId']); ?>&nbsp;</td>
41
				<td><?php echo h($dp['brand']); ?>&nbsp;</td>				
40
				<td><?php echo h($dp['brand']); ?>&nbsp;</td>				
42
				<td id="source_product_name" data-oid="<?php echo $dp['_id']['$oid'];?>" ><?php echo h($dp['source_product_name']); ?></td>
41
				<td id="source_product_name" data-oid="<?php echo $dp['_id']['$oid'];?>" ><?php echo h($dp['source_product_name']); ?></td>
43
				<td class="edit" id="dp" data-oid="<?php echo $dp['_id']['$oid'];?>" ><?php echo h($dp['dp']); ?></td>
42
				<td class="edit" id="dp" data-oid="<?php echo $dp['_id']['$oid'];?>" ><?php echo h($dp['dp']); ?></td>
-
 
43
				<td class="editable" id="showDp" data-oid="<?php echo $dp['_id']['$oid'];?>"><?php echo intval($dp['showDp'])==1?'Yes':'No'; ?></td>
44
				<td class="actions">
44
				<td class="actions">
45
					<?php //echo $this->Html->link(__('Edit'), array('action' => 'edit', $dp['_id']['$oid'])); ?>
45
					<?php //echo $this->Html->link(__('Edit'), array('action' => 'edit', $dp['_id']['$oid'])); ?>
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'])); ?>
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'])); ?>
47
				</td>
47
				</td>
48
			</tr>
48
			</tr>
Line 56... Line 56...
56
	    <li><a href="?page=<?php echo $page-1;?>">Previous</a></li>
56
	    <li><a href="?page=<?php echo $page-1;?>">Previous</a></li>
57
		<?php endif;?>
57
		<?php endif;?>
58
	    <li><a href="?page=<?php echo $page+1;?>">Next</a></li>
58
	    <li><a href="?page=<?php echo $page+1;?>">Next</a></li>
59
	  </ul>
59
	  </ul>
60
	</nav>
60
	</nav>
61
</div>	
-
 
62
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>
-
 
76
63
77