summaryrefslogtreecommitdiff
path: root/templates/list_newsletters.tpl
blob: f800571a4df0b001fd62c26581a1314f72240ac9 (plain)
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
{if !$newsletters || $gContent->isValid() || $smarty.request.new}
	{include file="bitpackage:newsletters/edit_newsletter.tpl"}
{else}
{strip}
<div class="floaticon">{bithelp}</div>

<div class="edit newsletters">
	<div class="header">
		<h1>{tr}Newsletter Settings{/tr}</h1>
	</div>

	<div class="body">

			{minifind}

			<table class="table data">
				<caption>{tr}Newsletters{/tr}</caption>
				<tr>
					<th>{smartlink ititle="Name" isort=name offset=$offset}</th>
					<th>{smartlink ititle="Description" isort=description offset=$offset}</th>
					<th>{smartlink ititle="Created" isort=last_sent offset=$offset}</th>
					<th>{smartlink ititle="Last Sent" isort=created offset=$offset}</th>
					<th>{smartlink ititle="Unsubscribed" isort=users offset=$offset}</th>
					<th>{tr}Action{/tr}</th>
				</tr>

				{foreach key=nlId from=$newsletters item=nl}
					<tr class="{cycle values='odd,even'}">
						<td><a href="{$smarty.const.NEWSLETTERS_PKG_URL}index.php?nl_id={$nlId}">{$nl.title|default:"Untitled Newsletter"|escape}</a></td>
						<td>{$nl.data}</td>
						<td>{$nl.created|bit_short_date}</td>
						<td>{$nl.last_sent|bit_short_date}</td>
						<td><a href="{$smarty.const.NEWSLETTERS_PKG_URL}admin/admin_newsletter_subscriptions.php?nl_id={$nl.nl_id}"> {$nl.unsub_count|default:0}</a></td>
						<td style="text-align:right;">
							<a href="{$smarty.const.NEWSLETTERS_PKG_URL}edition_edit.php?nl_id={$nl.nl_id}">{biticon ipackage="icons" iname="view-list-text" iexplain="New Edition"}</a>
							<a href="{$smarty.const.NEWSLETTERS_PKG_URL}newsletters.php?remove=1&amp;nl_id={$nl.nl_id}">{biticon ipackage="icons" iname="user-trash" iexplain=Remove}</a>
							<a href="{$smarty.const.NEWSLETTERS_PKG_URL}newsletters.php?&amp;nl_id={$nl.nl_id}">{biticon ipackage="icons" iname="edit" iexplain=Edit}</a>
						</td>
					</tr>
				{foreachelse}
					<tr class="norecords">
						<td colspan="7">{tr}No Records Found{/tr}</td>
					</tr>
				{/foreach}
			</table>

			{if $gBitUser->hasPermission('p_newsletters_create')}
				<a href="{$smarty.server.php_self}?new=1">Create new newsletter</a>
			{/if}

			{pagination}
	</div><!-- end .body -->
</div><!-- end .___ -->
{/strip}
{/if}