summaryrefslogtreecommitdiff
path: root/templates/list_elves.tpl
blob: d35ffc469f7eaa37566c399969588fceae503857 (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
{strip}
<div class="listing stock">
	<header>
		<h1>{tr}Kit Elves{/tr}</h1>
	</header>

	<section class="body">
		<table class="table table-striped table-hover">
			<thead>
				<tr>
					<th>{tr}Name{/tr}</th>
					<th>{tr}Login{/tr}</th>
					<th class="text-right">{tr}Assemblies{/tr}</th>
					<th class="text-right">{tr}Movements{/tr}</th>
					<th>{tr}Stock{/tr}</th>
				</tr>
			</thead>
			<tbody>
				{foreach $elves as $elf}
				<tr>
					<td>
						<a href="{$smarty.const.CONTACT_PKG_URL}display_contact.php?content_id={$elf.content_id}">{$elf.display_name|escape}</a>
					</td>
					<td>{$elf.linked_user_login|escape}</td>
					<td class="text-right">
						{if $elf.assembly_count}
							<a href="{$smarty.const.STOCK_PKG_URL}list_assemblies.php?user_id={$elf.user_id}">{$elf.assembly_count}</a>
						{else}
							0
						{/if}
					</td>
					<td class="text-right">
						{if $elf.movement_count}
							<a href="{$smarty.const.STOCK_PKG_URL}list_movements.php?user_id={$elf.user_id}">{$elf.movement_count}</a>
						{else}
							0
						{/if}
					</td>
					<td>
						<a href="{$smarty.const.STOCK_PKG_URL}list_stock.php?user_id={$elf.user_id}">{tr}Stock levels{/tr}</a>
					</td>
				</tr>
				{foreachelse}
				<tr><td colspan="5" class="norecords">{tr}No kit elves found.{/tr}</td></tr>
				{/foreach}
			</tbody>
		</table>
	</section>
</div>
{/strip}