Subversion Repositories SmartDukaan

Rev

Rev 16813 | Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
16811 manas 1
<div class="appTransactions index">
2
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.0/jquery.min.js"></script>
3
	<h2><?php echo __('App Transactions App Wise'); ?></h2>
4
		<form class="navbar-form" role="search" method="GET" name="search" action="<?php echo $base_url;?>admin/appTransactions/appwise">
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
				<div class="input-group col-xs-6 text-left" id="date_range" >
11
    				Date From<input type="date" name="date_from" value="Date"/>
12
    				Date To<input type="date" name="date_to" value="Date"/>
13
    				<div class="input-group col-xs-6 text-right" id="remote">
14
                    <div class="input-group-btn w25px">
15
                        <button class="btn btn-default" type="submit"><i class="glyphicon glyphicon-search"></i></button>
16
                    </div>
17
                </div>
18
        		</div>
19
 
20
 
21
            </form>
22
 
23
 
24
	<table cellpadding="0" cellspacing="0" class="table table-striped">
25
	<tr>
26
			<th><?php echo $this->Paginator->sort('app_id'); ?></th>
27
			<th><?php echo $this->Paginator->sort('app_name'); ?></th>
28
			<th><?php echo $this->Paginator->sort('count'); ?></th>
29
			<th><?php echo $this->Paginator->sort('approved'); ?></th>
30
			<th><?php echo $this->Paginator->sort('conversion_percentage'); ?></th> 
31
 
32
	</tr>
33
 
34
	<?php foreach ($appTransactions as $appTransaction): ?>
35
	<tr>
36
		<td><?php echo h($appTransaction['AppTransaction']['app_id']); ?>&nbsp;</td>
37
		<td><?php echo h($appTransaction['AppTransaction']['app_name']); ?>&nbsp;</td>
38
		<td><?php echo h($appTransaction[0]['count']); ?>&nbsp;</td>
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>
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>
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/appwise?date=yesterday';
63
			  }
64
			  if(value=='today'){
65
			  	 $('#date_range').hide();
66
			  	 document.location = '/admin/appTransactions/appwise';
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>
81
</div>