Subversion Repositories SmartDukaan

Rev

Details | Last modification | View Log | RSS feed

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