1{* $Id$ *}
2
3{title help="Banners" admpage=ads}{tr}Banners{/tr}{/title}
4
5{remarksbox type="tip" title="{tr}Tip{/tr}"}{tr}To use a banner in a <a class="alert-link" href="tiki-admin_modules.php">module</a> or a template, use {literal}{banner zone=ABC}{/literal}, where ABC is the name of the zone.{/tr}{/remarksbox}
6
7{if $tiki_p_admin_banners eq 'y'}
8	<div class="t_navbar mb-4">
9		{button href="tiki-edit_banner.php" class="btn btn-link" _type="link" _icon_name="sticky-note-o" _text="{tr}Create banner{/tr}"}
10	</div>
11{/if}
12
13{if $listpages or ($find ne '')}
14	{include file='find.tpl'}
15{/if}
16
17<div class="{if $js}table-responsive{/if}"> {*the table-responsive class cuts off dropdown menus *}
18	<table class="table table-striped table-hover">
19		<tr>
20			<th>{self_link _sort_arg='sort_mode' _sort_field='bannerId'}{tr}Id{/tr}{/self_link}</th>
21			<th>{self_link _sort_arg='sort_mode' _sort_field='client'}{tr}Client{/tr}{/self_link}</th>
22			<th>{self_link _sort_arg='sort_mode' _sort_field='url'}{tr}URL{/tr}{/self_link}</th>
23			<th>{self_link _sort_arg='sort_mode' _sort_field='zone'}{tr}Zone{/tr}{/self_link}</th>
24			<th>{self_link _sort_arg='sort_mode' _sort_field='created'}{tr}Created{/tr}{/self_link}</th>
25			<th>{self_link _sort_arg='sort_mode' _sort_field='which'}{tr}Method{/tr}{/self_link}</th>
26			<th>{self_link _sort_arg='sort_mode' _sort_field='useDate'}{tr}Use Dates?{/tr}{/self_link}</th>
27			<th>{self_link _sort_arg='sort_mode' _sort_field='maxImpressions'}{tr}Max Impressions{/tr}{/self_link}</th>
28			<th>{self_link _sort_arg='sort_mode' _sort_field='impressions'}{tr}Impressions{/tr}{/self_link}</th>
29			<th>{self_link _sort_arg='sort_mode' _sort_field='maxClicks'}{tr}Max Clicks{/tr}{/self_link}</th>
30			<th>{self_link _sort_arg='sort_mode' _sort_field='clicks'}{tr}Clicks{/tr}{/self_link}</th>
31			<th></th>
32		</tr>
33
34		{section name=changes loop=$listpages}
35		<tr>
36			<td class="id">{if $tiki_p_admin_banners eq 'y'}<a class="link" href="tiki-edit_banner.php?bannerId={$listpages[changes].bannerId}">{/if}{$listpages[changes].bannerId}{if $tiki_p_admin_banners eq 'y'}</a>{/if}</td>
37			<td class="username">{$listpages[changes].client|username}</td>
38			<td class="text">{$listpages[changes].url}</td>
39			<td class="text">{$listpages[changes].zone|escape}</td>
40			<td class="date">{$listpages[changes].created|tiki_short_date}</td>
41			<td class="text">{$listpages[changes].which}</td>
42			<td class="text">{$listpages[changes].useDates}</td>
43			<td class="integer"><span class="badge badge-secondary">{$listpages[changes].maxImpressions}</span></td>
44			<td class="integer"><span class="badge badge-secondary">{$listpages[changes].impressions}</span></td>
45			<td class="integer"><span class="badge badge-secondary">{$listpages[changes].maxClicks}</span></td>
46			<td class="integer"><span class="badge badge-secondary">{$listpages[changes].clicks}</span></td>
47			<td class="action">
48				{actions}
49					{strip}
50						<action>
51							<a href="tiki-view_banner.php?bannerId={$listpages[changes].bannerId}">
52								{icon name='chart' _menu_text='y' _menu_icon='y' alt="{tr}Stats{/tr}"}
53							</a>
54						</action>
55						{if $tiki_p_admin_banners eq 'y'}
56							<action>
57								<a href="tiki-edit_banner.php?bannerId={$listpages[changes].bannerId}">
58									{icon name='edit' _menu_text='y' _menu_icon='y' alt="{tr}Edit{/tr}"}
59								</a>
60							</action>
61							<action>
62								<a href="tiki-list_banners.php?offset={$offset}&amp;sort_mode={$sort_mode}&amp;remove={$listpages[changes].bannerId}">
63									{icon name='remove' _menu_text='y' _menu_icon='y' alt="{tr}Remove{/tr}"}
64								</a>
65							</action>
66						{/if}
67					{/strip}
68				{/actions}
69			</td>
70		</tr>
71		{sectionelse}
72			{norecords _colspan=12}
73		{/section}
74	</table>
75</div>
76
77{pagination_links cant=$cant_pages step=$prefs.maxRecords offset=$offset}{/pagination_links}
78