Use smarty template inheritance
[squasher.git] / templates / logs.tpl
1 {extends file='layout.tpl'}
2
3
4 {block menu}
5 <div class="menu">
6         <div class="menuhead">logs</div>
7         <a {if $logtype eq "all"     }class="selected"{/if} href="?tools=logs&amp;logtype=all"     >all</a>
8         <a {if $logtype eq "delete"  }class="selected"{/if} href="?tools=logs&amp;logtype=delete"  >delete</a>
9         <a {if $logtype eq "download"}class="selected"{/if} href="?tools=logs&amp;logtype=download">download</a>
10         <a {if $logtype eq "login"   }class="selected"{/if} href="?tools=logs&amp;logtype=login"   >login</a>
11         <a {if $logtype eq "debug"   }class="selected"{/if} href="?tools=logs&amp;logtype=debug"   >squasher</a>
12 </div>
13 {/block}
14
15 {block content}
16 <table class="log">
17
18         <tr class="logentry_header">
19                 <td width='*' colspan="5">Today
20
21         {foreach item=entry from=$logs.today key=id}
22         <tr class="logentry_{$entry.action|escape}" align="left">
23                 <td width='160px'>&nbsp;{$entry.date|escape}
24                 <td width='40px' >&nbsp;{$entry.user_name|escape}
25                 <td width='120px' title="{$entry.users_from_ip|escape}">&nbsp;{$entry.ip|escape}
26                 <td width='80px' >&nbsp;{$entry.action|escape}
27                 <td width='*' title="{$entry.file|substr:10|escape}{if $entry.ip eq 'retry'}\n : This file did not pass validation. A request was mailed to the RO to restart the upload.{/if}{if $entry.ip eq 'cleanup'}\n : This file entry was missing all chunks. This entry was removed.{/if}">&nbsp;{$entry.file|substr:10:64|escape}
28         {foreachelse}
29         <tr class="logentry_empty">
30                 <td width='*' colspan="3"><hr>
31                 <td width='120px'>Log is empty
32                 <td width='*'><hr>
33         {/foreach}
34
35         <tr class="logentry_header">
36                 <td width='*' colspan="5">Yesterday
37
38         {foreach item=entry from=$logs.yesterday key=id}   <tr class="logentry_{$entry.action|escape}" align="left">
39                 <td width='160px'>&nbsp;{$entry.date|escape}
40                 <td width='40px' >&nbsp;{$entry.user_name|escape}
41                 <td width='120px' title="{$entry.users_from_ip|escape}">&nbsp;{$entry.ip|escape}
42                 <td width='80px'>&nbsp;{$entry.action|escape}
43                 <td width='*' title="{$entry.file|substr:10|escape}{if $entry.ip eq 'retry'}\n : This file did not pass validation. A request was mailed to the RO to restart the upload.{/if}{if $entry.ip eq 'cleanup'}\n : This file entry was missing all chunks. This entry was removed.{/if}">&nbsp;{$entry.file|substr:10:64|escape}
44         {foreachelse}
45         <tr class="logentry_empty">
46                 <td width='*' colspan="3"><hr>
47                 <td width='120px'>Log is empty
48                 <td width='*'><hr>
49         {/foreach}
50
51         <tr class="logentry_header">
52                 <td width='*' colspan="5">Last week
53
54         {foreach item=entry from=$logs.lastweek key=id}
55         <tr class="logentry_{$entry.action|escape}" align="left">
56                 <td width='160px'>&nbsp;{$entry.date|escape}
57                 <td width='40px' >&nbsp;{$entry.user_name|escape}
58                 <td width='120px' title="{$entry.users_from_ip|escape}">&nbsp;{$entry.ip|escape}
59                 <td width='80px'>&nbsp;{$entry.action|escape}
60                 <td width='*' title="{$entry.file|substr:10|escape}{if $entry.ip eq 'retry'}\n : This file did not pass validation. A request was mailed to the RO to restart the upload.{/if}{if $entry.ip eq 'cleanup'}\n : This file entry was missing all chunks. This entry was removed.{/if}">&nbsp;{$entry.file|substr:10:64|escape}
61         {foreachelse}
62         <tr class="logentry_empty">
63                 <td width='*' colspan="3"><hr>
64                 <td width='120px'>Log is empty
65                 <td width='*'><hr>
66         {/foreach}
67
68         <tr class="logentry_header">
69                 <td width='*' colspan="5">Older
70
71         {foreach item=entry from=$logs.older key=id}
72         <tr class="logentry_{$entry.action|escape}" align="left">
73                 <td width='160px'>&nbsp;{$entry.date|escape}
74                 <td width='40px' >&nbsp;{$entry.user_name|escape}
75                 <td width='120px' title="{$entry.users_from_ip|escape}">&nbsp;{$entry.ip|escape}
76                 <td width='80px'>&nbsp;{$entry.action|escape}
77                 <td width='*' title="{$entry.file|substr:10|escape}{if $entry.ip eq 'retry'}\n : This file did not pass validation. A request was mailed to the RO to restart the upload.{/if}{if $entry.ip eq 'cleanup'}\n : This file entry was missing all chunks. This entry was removed.{/if}">&nbsp;{$entry.file|substr:10:64|escape}
78         {foreachelse}
79         <tr class="logentry_empty">
80                 <td width='*' colspan="3"><hr>
81                 <td width='120px'>Log is empty
82                 <td width='*'><hr>
83         {/foreach}
84
85 </table>
86 {/block}
87
88 {* vim: set syntax=smarty ts=4 sw=4 sts=4 sr noet: *}