Subversion Repositories SmartDukaan

Rev

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

Rev Author Line No. Line
16773 manas 1
<div class="appTransactions index">
16811 manas 2
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.0/jquery.min.js"></script>
3
	<h2><?php echo __('App Transactions Retailer Wise'); ?></h2>
4
		<form class="navbar-form" role="search" method="GET" name="search" action="<?php echo $base_url;?>admin/appTransactions/retailer">
5
        		<div><select id="mySelect">
6
					  <option value="today">Today</option>
7
					  <option value="yesterday">Yesterday</option>
8
					  <option value="range">Date Range</option>
9
					</select></div>
10
 
11
				<div style="margin_top:10dp" 
12
				class="input-group col-xs-6 text-left" id="date_range" >
13
    				Date From<input type="date" name="date_from" value="Date"/>
14
    				Date To<input type="date" name="date_to" value="Date"/>
15
 
16
                    <div class="input-group-btn w25px">
17
                        <button class="btn btn-default" type="submit"><i class="glyphicon glyphicon-search"></i></button>
18
 
19
                </div>
20
        		</div>
21
 
22
 
23
            </form>
24
 
25
 
16773 manas 26
	<table cellpadding="0" cellspacing="0" class="table table-striped">
27
	<tr>
16811 manas 28
			<th><?php echo $this->Paginator->sort('retailer_id'); ?></th>
16773 manas 29
			<th><?php echo $this->Paginator->sort('count'); ?></th>
30
			<th><?php echo $this->Paginator->sort('approved'); ?></th>
31
			<th><?php echo $this->Paginator->sort('conversion_percentage'); ?></th> 
32
 
33
	</tr>
34
 
35
	<?php foreach ($appTransactions as $appTransaction): ?>
36
	<tr>
16811 manas 37
		<td><?php echo h($appTransaction['AppTransaction']['retailer_id']); ?>&nbsp;</td>
16773 manas 38
		<td><?php echo h($appTransaction[0]['count']); ?>&nbsp;</td>
16811 manas 39
		<td><?php if(!isset($appTransaction['AppTransaction']['approved'])){echo h('0');}else{echo h($appTransaction['AppTransaction']['approved']);}; ?>&nbsp;</td>
40
		<td><?php if(!isset($appTransaction['AppTransaction']['conversion_percentage'])){echo h('0');}else{echo h($appTransaction['AppTransaction']['conversion_percentage']);}; ?>&nbsp;</td>
16773 manas 41
	</tr>
42
<?php endforeach; ?>
43
	</table>
44
	<p>
45
	<?php
46
	echo $this->Paginator->counter(array(
47
	'format' => __('Page {:page} of {:pages}, showing {:current} records out of {:count} total, starting on record {:start}, ending on {:end}')
48
	));
49
	?>	</p>
50
	<div class="paging">
51
	<?php
52
		echo $this->Paginator->prev('< ' . __('previous '), array(), null, array('class' => 'prev disabled'));
53
		echo $this->Paginator->numbers(array('separator' => ' '));
54
		echo $this->Paginator->next(__(' next') . ' >', array(), null, array('class' => 'next disabled'));
55
	?>
56
	</div>
16811 manas 57
	<script type="text/javascript">
58
		$('#mySelect').on('change', function() {
59
			  var value = $(this).val();
60
			  if(value=='yesterday'){
61
			  	 $('#date_range').hide();
62
			  	 document.location = '/admin/appTransactions/retailer?date=yesterday';
63
			  }
64
			  if(value=='today'){
65
			  	 $('#date_range').hide();
66
			  	 document.location = '/admin/appTransactions/retailer';
67
			  }
68
			  if(value=='range'){
69
			  	 $('#date_range').show(); 
70
			  }
71
 
72
		});
73
	</script>
74
	<script type="text/javascript">
75
	$(document).ready(function() {
76
    if($("#mySelect").val() == "today"){
77
        $("#date_range").hide();
78
    	}
79
	});
80
	</script>
16773 manas 81
</div>