summaryrefslogtreecommitdiff
path: root/templates/list_xref.tpl
blob: 9ac5a3e4d8ff57e9c967e8a8494f97622ae434ca (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
	{assign var=xrefcnt value=$gContent->mInfo.$source|default:[]|@count}
	{assign var=xrefAllowEdit value=$allow_edit|default:true}
	{jstab title="$source_title ($xrefcnt)"}
	{legend legend=$source_title}
	<div class="form-group table-responsive">
		<table>
			<thead>
				<tr>
					<th>{tr}Type{/tr}</th>
					<th>{tr}Link{/tr}</th>
					<th>{tr}Key{/tr}</th>
					<th>{tr}Value{/tr}</th>
					{if $source ne 'history'}
						<th>{tr}Started{/tr}</th>
					{else}
						<th>{tr}Ended{/tr}</th>
					{/if}
					<th>{tr}Updated{/tr}</th>
					{if $xrefAllowEdit}<th>{tr}Edit{/tr}</th>{/if}
				</tr>
			</thead>
			<tbody>
				{section name=xref loop=$gContent->mInfo.$source}
					<tr class="{cycle values="even,odd"}">
						{include file="bitpackage:liberty/view_xref_`$gContent->mInfo.$source[xref].template`_record.tpl"}
					</tr>
				{sectionelse}
					<tr class="norecords">
						<td colspan="7">{tr}No {$source_title} records found{/tr}</td>
					</tr>
				{/section}
			</tbody>
		</table>
	</div>
	{if $allow_add && $gContent->isValid() && $gContent->hasUpdatePermission() && $source ne 'history'}
		<div>
			{smartlink ititle="Add record" ipackage="liberty" ifile="add_xref.php" booticon="icon-note-add" content_id=$gContent->mInfo.content_id group=$group}
		</div>
	{/if}
	{/legend}
	{/jstab}