Subversion Repositories SmartDukaan

Rev

Rev 14401 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
13646 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
			<?php echo $this->element('adminsearch');?>
13646 anikendra 8
			<h2><?php echo __('Exceptional Nlcs'); ?></h2>
9
			<table class="table table-striped">
10
			<tr>
11
					<th><?php echo ('sku'); ?></th>
14401 anikendra 12
					<th><?php echo ('maxNlc'); ?></th>
13
					<th><?php echo ('minNlc'); ?></th>
14
					<th><?php echo ('overrideNlc'); ?></th>
13646 anikendra 15
					<th class="actions"><?php echo __('Actions'); ?></th>
16
			</tr>
17
			<?php foreach ($exceptionalnlcs as $exceptionalnlc): ?>
14517 anikendra 18
			<?php 
19
				if(!is_array($exceptionalnlc)){
20
					$exceptionalnlc = json_decode($exceptionalnlc,1);
21
				}
22
			?>
13646 anikendra 23
			<tr>
24
				<td><?php echo h($exceptionalnlc['sku']); ?>&nbsp;</td>
14098 anikendra 25
				<td class="edit" id="maxNlc" data-oid="<?php echo $exceptionalnlc['_id']['$oid'];?>"><?php echo h($exceptionalnlc['maxNlc']); ?></td>
26
				<td class="edit" id="minNlc" data-oid="<?php echo $exceptionalnlc['_id']['$oid'];?>"><?php echo h($exceptionalnlc['minNlc']); ?></td>
14401 anikendra 27
				<td class="editable" id="overrideNlc" data-oid="<?php echo $exceptionalnlc['_id']['$oid'];?>"><?php echo $exceptionalnlc['overrideNlc']==1?'Yes':'No'; ?></td>
13646 anikendra 28
				<td class="actions">
14098 anikendra 29
					<?php //echo $this->Html->link(__('Edit'), array('action' => 'edit', $exceptionalnlc['_id']['$oid'])); ?>
13646 anikendra 30
					<?php echo $this->Form->postLink(__('Delete'), array('action' => 'delete', $exceptionalnlc['_id']['$oid']), null, __('Are you sure you want to delete # %s?', $exceptionalnlc['_id']['$oid'])); ?>
31
				</td>
32
			</tr>
33
		<?php endforeach; ?>
34
			</table>			
35
		</div>
36
	</div>
14098 anikendra 37
	<nav>
38
	  <ul class="pager">
39
	  	<?php if($page>1):?>
40
	    <li><a href="?page=<?php echo $page-1;?>">Previous</a></li>
41
		<?php endif;?>
42
	    <li><a href="?page=<?php echo $page+1;?>">Next</a></li>
43
	  </ul>
44
	</nav>
13646 anikendra 45
</div>
14401 anikendra 46
<script type="text/javascript">
47
 $(document).ready(function() {    
48
	$('.editable').editable(base_url+'admin/'+controller+'/update', {
49
		data   : "{0:'No',1:'Yes'}",
50
		type   : 'select',
51
		submit : 'OK',
52
		tooltip   : 'Click to edit...',
53
		submitdata : function(value, settings) {
54
		   	return {oid: $(this).data('oid')};
55
		}
56
	});
57
});
58
</script>