summaryrefslogtreecommitdiff
path: root/templates/action_logs.tpl
blob: ccfd56739677bf2abb2c88883bebe594b4ca3993 (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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
{strip}
<div class="listing liberty">
	<div class="header">
		<h1>{tr}Action Logs{/tr}</h1>
	</div>

	<div class="body">
		{formfeedback hash=$feedback}
		{form}
			{legend legend="Liberty Action Logs"}
				{foreach from=$logSettings key=item item=output}
					<div class="form-group">
						{formlabel label=$output.label for=$item}
						{forminput}
							{if $output.type == 'input'}
								<input type='text' name="{$item}" id="{$item}" value="{$gBitSystem->getConfig($item)}" />
							{else}
								{html_checkboxes name="$item" values="y" checked=$gBitSystem->getConfig($item) labels=false id=$item}
							{/if}
							{formhelp note=$output.note page=$output.page}
						{/forminput}
					</div>
				{/foreach}

				<div class="form-group">
					{formlabel label="Delete Logs" for="log_prune"}
					{forminput}
						<select name="log_prune" id="log_prune">
							<option value=""        >{tr}Don't remove logs{/tr}</option>
							<option value="1"       >{tr}All{/tr}</option>
							<option value="86400"   >{tr}One Day{/tr}</option>
							<option value="604800"  >{tr}One Week{/tr}</option>
							<option value="2419200" >{tr}One Month{/tr}</option>
							<option value="14515200">{tr}Six Months{/tr}</option>
						</select>
						{formhelp note="Delete logs older than the given time span."}
					{/forminput}
				</div>

				<div class="form-group submit">
					<input type="submit" class="btn btn-default" name="apply_settings" value="{tr}Apply Settings{/tr}" />
				</div>
			{/legend}
		{/form}

		{* Need to add some filtering options here *}

		{minifind}

		<table class="table data">
			<caption>{tr}Action Logs{/tr} <span class="total">[ {$listInfo.total_records|default:0} ]</span></caption>
			<tr>
				<th></th>
				<th>{smartlink ititle="ID" isort=content_id page=$listInfo.page}</th>
				<th>{smartlink ititle="Title" isort=title page=$listInfo.page}</th>
				<th>{smartlink ititle="Log Entry" isort=action_log page=$listInfo.page}</th>
				<th>{smartlink ititle="Content Type" isort=content_name page=$listInfo.page}</th>
				<th>{smartlink ititle="Log time" isort=last_modified page=$listInfo.page idefault=1}</th>
				<th>{smartlink ititle="Modified by" isort=user_id page=$listInfo.page} [{smartlink ititle="IP" isort=ip page=$listInfo.page}]</th>
			</tr>
			{foreach from=$actionLogs item=log}
				<tr class="{cycle values="odd,even"}">
					<td>
						{if $log.error_message}
							{biticon ipackage=icons iname="dialog-error" iexplain="Error"}
						{else}
							{biticon ipackage=icons iname="dialog-information" iexplain="Information"}
						{/if}
					</td>
					<td>{if $log.content_id}<a href="{$smarty.const.BIT_ROOT_URL}index.php?content_id={$log.content_id}">{$log.content_id}{/if}</a></td>
					<td>{$log.title|escape}</td>
					<td>
						{$log.log_message|nl2br}
						{$log.error_message|nl2br}
					</td>
					<td>{tr}{$log.content_name}{/tr}</td>
					<td>{$log.last_modified|bit_short_datetime}</td>
					<td>{displayname hash=$log} [{$log.ip}]</td>
				</tr>
			{foreachelse}
				<tr class="norecords">
					<td colspan="8">{tr}No Records Found{/tr}</td>
				</tr>
			{/foreach}
		</table>

		{pagination}

	</div><!-- end .body -->
</div><!-- end .liberty -->
{/strip}