tiki-ranking.tpl 1.78 KB
Newer Older
1
{title}{tr}Rankings{/tr}{/title}
2
<div class="form-group">
3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
	<form action="{$rpage}" method="post" class="form-inline" role="form">
		<div class="form-group">
			<select name="which" class="form-control">
				{section name=ix loop=$allrankings}
					<option value="{$allrankings[ix].value|escape}" {if $which eq $allrankings[ix].value}selected="selected"{/if}>{$allrankings[ix].name}</option>
				{/section}
			</select>
		</div>
		<div class="form-group">
			<select name="limit" class="form-control">
				<option value="10" {if $limit eq 10}selected="selected"{/if}>{tr}Top 10{/tr}</option>
				<option value="20" {if $limit eq 20}selected="selected"{/if}>{tr}Top 20{/tr}</option>
				<option value="50" {if $limit eq 50}selected="selected"{/if}>{tr}Top 50{/tr}</option>
				<option value="100" {if $limit eq 100}selected="selected"{/if}>{tr}Top 100{/tr}</option>
			</select>
		</div>
19

20 21 22
		{if $categIdstr}<input type="hidden" name="categId" value="{$categIdstr}">{/if}
		<input type="submit" class="btn btn-default" name="selrank" value="{tr}View{/tr}">
	</form>
23
</div>
24

25
{section name=ix loop=$rankings}
26
	<div class="table-responsive">
27
		<table class="table">
28
			<tr>
29 30 31
				<th>{tr}Rank{/tr}</th>
				<th>{$rankings[ix].title}</th>
				<th>{$rankings[ix].y}</th>
32
			</tr>
33 34 35 36 37 38 39 40 41 42 43 44 45 46 47
			{section name=xi loop=$rankings[ix].data}
				<tr>
					<td class="id">{$smarty.section.xi.index_next}</td>
					<td class="text">
						<a class="link" href="{$rankings[ix].data[xi].href}">{if $rankings[ix].data[xi].name eq ""}-{else}{$rankings[ix].data[xi].name|escape}{/if}</a>
					</td>
					<td class="date">
						{if $rankings[ix].type eq 'nb'}{$rankings[ix].data[xi].hits}{else}{$rankings[ix].data[xi].hits|tiki_long_datetime}{/if}
					</td>
				</tr>
			{sectionelse}
				{norecords _colspan=3}
			{/section}
		</table>
	</div>
48
{/section}