Subversion Repositories SmartDukaan

Rev

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

Rev Author Line No. Line
14956 manas 1
<head>
2
<style>
3
table, th, td {
4
    border: 1px solid black;
5
}
6
</style>
7
</head>
14955 manas 8
<div class="notificationCampaigns index">
9
 
10
	<h2><?php echo __('Notification Campaigns'); ?></h2>
11
 
14990 manas 12
	<table cellpadding="0" cellspacing="0" border="1" class="table table-striped" >
14955 manas 13
	<tr>
14956 manas 14
			<th style="text-align:center"><?php echo $this->Paginator->sort('id'); ?></th>
15
			<th style="text-align:center"><?php echo $this->Paginator->sort('name'); ?></th>
16
			<th style="text-align:center"><?php echo $this->Paginator->sort('title'); ?></th>
17
			<th style="text-align:center"><?php echo $this->Paginator->sort('created'); ?></th>
14967 manas 18
			<th style="text-align:center"><?php echo $this->Paginator->sort('expiresat'); ?></th>
14956 manas 19
			<th style="text-align:center">Total</th>
15575 manas 20
			<th style="text-align:center">Failed</th>
15004 manas 21
			<th style="text-align:center">Success</th>
14956 manas 22
			<th style="text-align:center">Recieved</th>
15575 manas 23
			<th style="text-align:center">Expired</th>
24
			<th style="text-align:center">Gap</th>
14956 manas 25
			<th style="text-align:center">Opened</th>
26
			<th style="text-align:center">Referrer</th>
15575 manas 27
			<th style="text-align:center">Login</th>		
14956 manas 28
			<th style="text-align:center" class="actions"><?php echo __('Actions'); ?></th>
14955 manas 29
 
30
	</tr>
31
 
32
	<?php foreach ($notificationCampaigns as $notificationCampaign): ?>
15004 manas 33
	<?php 
34
	if(isset($notificationCampaignsCount[$notificationCampaign['NotificationCampaign']['id']]['sent']) && !empty($notificationCampaignsCount[$notificationCampaign['NotificationCampaign']['id']]['sent'])){
35
		$successSent=$notificationCampaignsCount[$notificationCampaign['NotificationCampaign']['id']]['sent'];
36
	}else{
37
		$successSent=0;
38
	}
39
	if(isset($notificationCampaignsCount[$notificationCampaign['NotificationCampaign']['id']]['0']) && !empty($notificationCampaignsCount[$notificationCampaign['NotificationCampaign']['id']]['0'])){
40
		$successFailed=$notificationCampaignsCount[$notificationCampaign['NotificationCampaign']['id']]['0'];
41
	}else{
42
		$successFailed=0;
43
	}
44
	?>	
14955 manas 45
	<tr>
15004 manas 46
 
14955 manas 47
		<td align="center" width="4%"><?php echo h($notificationCampaign['NotificationCampaign']['id']); ?>&nbsp;</td>
48
		<td align="center"><?php echo h($notificationCampaign['NotificationCampaign']['name']); ?>&nbsp;</td>
49
		<td align="center"><?php echo h($notificationCampaign['NotificationCampaign']['title']); ?>&nbsp;</td>
14967 manas 50
		<!-- <td align="center"><?php echo h($notificationCampaign['NotificationCampaign']['message']); ?>&nbsp;</td> -->
14955 manas 51
		<td align="center"><?php echo h($notificationCampaign['NotificationCampaign']['created']); ?>&nbsp;</td>
14967 manas 52
		<td align="center"><?php echo h($notificationCampaign['NotificationCampaign']['expiresat']); ?>&nbsp;</td>
15004 manas 53
		<td> <?php echo h($successSent+ $successFailed) ?></td>
15575 manas 54
 
55
		<td align="center"><?php if(isset($notificationCampaignsCount[$notificationCampaign['NotificationCampaign']['id']]['0']) && !empty($notificationCampaignsCount[$notificationCampaign['NotificationCampaign']['id']]['0'])){	echo $this->Html->link(__(h($notificationCampaignsCount[$notificationCampaign['NotificationCampaign']['id']]['0'])), array('action' => 'show', $notificationCampaign['NotificationCampaign']['id'], 'sent',0));} else {echo h('0');}?>&nbsp;</td>
56
 
14955 manas 57
		<td align="center"><?php if(isset($notificationCampaignsCount[$notificationCampaign['NotificationCampaign']['id']]['sent']) && !empty($notificationCampaignsCount[$notificationCampaign['NotificationCampaign']['id']]['sent'])){echo
58
		$this->Html->link(__(h($notificationCampaignsCount[$notificationCampaign['NotificationCampaign']['id']]['sent'])), array('action' => 'show', $notificationCampaign['NotificationCampaign']['id'], 'sent',1)); } else {echo h('0');}?>&nbsp;</td>
59
 
60
		<td align="center"><?php if(isset($notificationCampaignsCount[$notificationCampaign['NotificationCampaign']['id']]['recieved']) && !empty($notificationCampaignsCount[$notificationCampaign['NotificationCampaign']['id']]['recieved'])){echo
61
		$this->Html->link(__(h($notificationCampaignsCount[$notificationCampaign['NotificationCampaign']['id']]['recieved'])), array('action' => 'show', $notificationCampaign['NotificationCampaign']['id'], 'recieved',1)); } else {echo h('0');}?>&nbsp;</td>
62
 
15575 manas 63
 		<td align="center"><?php if(isset($notificationCampaignsCount[$notificationCampaign['NotificationCampaign']['id']]['expired']) && !empty($notificationCampaignsCount[$notificationCampaign['NotificationCampaign']['id']]['expired'])){echo $this->Html->link(__(h($notificationCampaignsCount[$notificationCampaign['NotificationCampaign']['id']]['expired'])), array('action' => 'show', $notificationCampaign['NotificationCampaign']['id'], 'expired',1)); } else {echo h('0');}?>&nbsp;</td>
64
 
65
 		<?php if(isset($notificationCampaignsCount[$notificationCampaign['NotificationCampaign']['id']]['recieved']) && !empty($notificationCampaignsCount[$notificationCampaign['NotificationCampaign']['id']]['recieved']))
66
{$recieved = $notificationCampaignsCount[$notificationCampaign['NotificationCampaign']['id']]['recieved']; } else {$recieved =0;}?>
67
<?php if(isset($notificationCampaignsCount[$notificationCampaign['NotificationCampaign']['id']]['expired']) && !empty($notificationCampaignsCount[$notificationCampaign['NotificationCampaign']['id']]['expired'])){$expired = $notificationCampaignsCount[$notificationCampaign['NotificationCampaign']['id']]['expired']; } else {$expired=0;}?>
14956 manas 68
 
15575 manas 69
<td align="center"><?php echo($recieved-$expired);?></td>
70
 
14955 manas 71
		<td align="center"><?php if(isset($notificationCampaignsCount[$notificationCampaign['NotificationCampaign']['id']]['opened']) && !empty($notificationCampaignsCount[$notificationCampaign['NotificationCampaign']['id']]['opened'])){echo $this->Html->link(__(h($notificationCampaignsCount[$notificationCampaign['NotificationCampaign']['id']]['opened'])), array('action' => 'show', $notificationCampaign['NotificationCampaign']['id'], 'opened',1));  } else {echo h('0');}?>&nbsp;</td>
72
		<td align="center"><?php if(isset($notificationCampaignsCount[$notificationCampaign['NotificationCampaign']['id']]['referrer']) && !empty($notificationCampaignsCount[$notificationCampaign['NotificationCampaign']['id']]['referrer'])){echo $this->Html->link(__(h($notificationCampaignsCount[$notificationCampaign['NotificationCampaign']['id']]['referrer'])), array('action' => 'show', $notificationCampaign['NotificationCampaign']['id'], 'referrer',1));  } else {echo h('0');}?>&nbsp;</td>
73
		<td align="center"><?php if(isset($notificationCampaignsCount[$notificationCampaign['NotificationCampaign']['id']]['login']) && !empty($notificationCampaignsCount[$notificationCampaign['NotificationCampaign']['id']]['login'])){echo $this->Html->link(__(h($notificationCampaignsCount[$notificationCampaign['NotificationCampaign']['id']]['login'])), array('action' => 'show', $notificationCampaign['NotificationCampaign']['id'], 'login',1)); } else {echo h('0');}?>&nbsp;</td>
15004 manas 74
 
14967 manas 75
 		<td align="center" width="15%" class="actions">
15004 manas 76
 
14955 manas 77
			<?php echo $this->Html->link(__('View'), array('action' => 'view', $notificationCampaign['NotificationCampaign']['id'])); ?>
78
			&nbsp;
79
	 		<?php echo $this->Html->link(__('Edit'), array('action' => 'edit', $notificationCampaign['NotificationCampaign']['id'])); ?>
80
			<!--<?php echo $this->Form->postLink(__('Delete'), array('action' => 'delete', $notificationCampaign['NotificationCampaign']['id']), null, __('Are you sure you want to delete # %s?', $notificationCampaign['NotificationCampaign']['id'])); ?> -->
81
		</td>
82
	</tr>
83
<?php endforeach; ?>
84
	</table>
85
	<p>
86
	<?php
87
	echo $this->Paginator->counter(array(
88
	'format' => __('Page {:page} of {:pages}, showing {:current} records out of {:count} total, starting on record {:start}, ending on {:end}')
89
	));
90
	?>	</p>
91
	<div class="paging">
92
	<?php
93
		echo $this->Paginator->prev('< ' . __('previous'), array(), null, array('class' => 'prev disabled'));
94
		echo $this->Paginator->numbers(array('separator' => '  '));
95
		echo $this->Paginator->next(__('next') . ' >', array(), null, array('class' => 'next disabled'));
96
	?>
97
	</div>
15575 manas 98
</div>