Subversion Repositories SmartDukaan

Rev

Rev 16813 | Go to most recent revision | Details | Compare with Previous | 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>
16813 manas 4
	<h4><?php echo __('Total Clicks '.$totalClicks);?></h4>
5
	<h4><?php echo __('Total Approved '.$totalApproved);?></h4>
6
	<h4><?php echo __('Overall Conversion Percentage '.ceil(($totalApproved/$totalClicks)*100)) . '%';?></h4>
16811 manas 7
		<form class="navbar-form" role="search" method="GET" name="search" action="<?php echo $base_url;?>admin/appTransactions/appwise">
8
        		<div><select id="mySelect">
9
					  <option value="today">Today</option>
10
					  <option value="yesterday">Yesterday</option>
11
					  <option value="range">Date Range</option>
12
					</select></div>
13
				<div class="input-group col-xs-6 text-left" id="date_range" >
14
    				Date From<input type="date" name="date_from" value="Date"/>
15
    				Date To<input type="date" name="date_to" value="Date"/>
16
    				<div class="input-group col-xs-6 text-right" id="remote">
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
        		</div>
22
 
23
 
24
            </form>
25
 
26
 
27
	<table cellpadding="0" cellspacing="0" class="table table-striped">
28
	<tr>
29
			<th><?php echo $this->Paginator->sort('app_id'); ?></th>
30
			<th><?php echo $this->Paginator->sort('app_name'); ?></th>
16813 manas 31
			<th><?php echo $this->Paginator->sort('clicks'); ?></th>
16811 manas 32
			<th><?php echo $this->Paginator->sort('approved'); ?></th>
33
			<th><?php echo $this->Paginator->sort('conversion_percentage'); ?></th> 
34
 
35
	</tr>
36
 
37
	<?php foreach ($appTransactions as $appTransaction): ?>
38
	<tr>
39
		<td><?php echo h($appTransaction['AppTransaction']['app_id']); ?>&nbsp;</td>
40
		<td><?php echo h($appTransaction['AppTransaction']['app_name']); ?>&nbsp;</td>
41
		<td><?php echo h($appTransaction[0]['count']); ?>&nbsp;</td>
42
		<td><?php if(!isset($appTransaction['AppTransaction']['approved'])){echo h('0');}else{echo h($appTransaction['AppTransaction']['approved']);}; ?>&nbsp;</td>
43
		<td><?php if(!isset($appTransaction['AppTransaction']['conversion_percentage'])){echo h('0');}else{echo h($appTransaction['AppTransaction']['conversion_percentage']);}; ?>&nbsp;</td>
44
	</tr>
45
<?php endforeach; ?>
46
	</table>
47
	<script type="text/javascript">
48
		$('#mySelect').on('change', function() {
49
			  var value = $(this).val();
50
			  if(value=='yesterday'){
51
			  	 $('#date_range').hide();
52
			  	 document.location = '/admin/appTransactions/appwise?date=yesterday';
53
			  }
54
			  if(value=='today'){
55
			  	 $('#date_range').hide();
56
			  	 document.location = '/admin/appTransactions/appwise';
57
			  }
58
			  if(value=='range'){
59
			  	 $('#date_range').show(); 
60
			  }
61
 
62
		});
63
	</script>
64
	<script type="text/javascript">
65
	$(document).ready(function() {
66
    if($("#mySelect").val() == "today"){
67
        $("#date_range").hide();
68
    	}
69
	});
70
	</script>
71
</div>