-
Notifications
You must be signed in to change notification settings - Fork 36
/
admin_index.ctp
executable file
·114 lines (112 loc) · 3.38 KB
/
admin_index.ctp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
<?php
/**
* Comment Template.
*
* @todo -c Implement .this needs to be sorted out.
*
* Copyright (c) 2009 Carl Sutton ( dogmatic69 )
*
* Licensed under The MIT License
* Redistributions of files must retain the above copyright notice.
*
* @filesource
* @copyright Copyright (c) 2009 Carl Sutton ( dogmatic69 )
* @link http://infinitas-cms.org
* @package sort
* @subpackage sort.comments
* @license http://www.opensource.org/licenses/mit-license.php The MIT License
* @since 0.5a
*/
echo $this->Form->create(null, array('action' => 'mass'));
echo $this->Infinitas->adminIndexHead($filterOptions, array(
'add',
'view',
'edit',
'copy',
'toggle',
'send',
'delete'
));
?>
<table class="listing">
<?php
echo $this->Infinitas->adminTableHeader(array(
$this->Form->checkbox('all') => array(
'class' => 'first'
),
$this->Paginator->sort('slug', __d('newsletter', 'Alias')),
$this->Paginator->sort('subject'),
$this->Paginator->sort('NewsletterCampaign.name', __d('newsletter', 'Campaign')) => array(
'class' => 'larger'
),
$this->Paginator->sort('from') => array(
'class' => 'large'
),
$this->Paginator->sort('reply_to') => array(
'class' => 'large'
),
__d('newsletter', 'Status') => array(
'class' => 'medium'
)
));
foreach ($newsletters as $newsletter) {
?>
<tr>
<td><?php echo $this->Infinitas->massActionCheckBox($newsletter); ?> </td>
<td>
<?php
echo $this->Html->link($newsletter['Newsletter']['slug'], array(
'action' => 'edit',
$newsletter['Newsletter']['id']
));
?>
</td>
<td><?php echo $newsletter['Newsletter']['subject']; ?> </td>
<td>
<?php
echo $this->Html->link(
$newsletter['NewsletterCampaign']['name'],
array(
'controller' => 'newsletter_campaigns',
'action' => 'edit',
$newsletter['Newsletter']['newsletter_campaign_id']
)
);
?>
</td>
<td><?php echo $this->Text->autoLinkEmails($newsletter['Newsletter']['from']); ?> </td>
<td><?php echo $this->Text->autoLinkEmails($newsletter['Newsletter']['reply_to']); ?> </td>
<td>
<?php
if ($newsletter['Newsletter']['active'] && !$newsletter['Newsletter']['sent']) {
echo $this->Infinitas->status($newsletter['Newsletter']['sent'], array(
'title_no' => __d('newsletter', 'Sending in progress')
));
}
if ($newsletter['Newsletter']['sent']) {
echo $this->Html->link(
$this->Design->icon('bar-chart'),
array(
'action' => 'report',
$newsletter['Newsletter']['id']
),
array(
'title' => __d('newsletter', 'Sending complete. See the report.'),
'alt' => __d('newsletter', 'Done', true ),
'escape' => false
)
);
}
echo $this->Infinitas->status($newsletter['Newsletter']['active'], array(
'title_no' => __d('newsletter', 'This newsletter is not sending')
));
?>
</td>
</tr>
<?php
}
?>
</table>
<?php
echo $this->Form->end();
echo $this->element('pagination/admin/navigation');