Adds log search on actions (Closes #1568).
[platal.git] / templates / admin / logger-view.tpl
CommitLineData
0337d704 1{**************************************************************************}
2{* *}
5e1513f6 3{* Copyright (C) 2003-2011 Polytechnique.org *}
0337d704 4{* http://opensource.polytechnique.org/ *}
5{* *}
6{* This program is free software; you can redistribute it and/or modify *}
7{* it under the terms of the GNU General Public License as published by *}
8{* the Free Software Foundation; either version 2 of the License, or *}
9{* (at your option) any later version. *}
10{* *}
11{* This program is distributed in the hope that it will be useful, *}
12{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
13{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
14{* GNU General Public License for more details. *}
15{* *}
16{* You should have received a copy of the GNU General Public License *}
17{* along with this program; if not, write to the Free Software *}
18{* Foundation, Inc., *}
19{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
20{* *}
21{**************************************************************************}
22
c4271d38 23<h1>Parcours des logs du site</h1>
0337d704 24
c8ab90e7 25{if t($events)}
0337d704 26
27<table class="bicol">
28<tr>
a7de4ef7 29 <th colspan="2">Propriétés de la session</th>
0337d704 30</tr>
31<tr class="impair">
099b92fc 32 <td class="titre">utilisateur</td>
1f7c3690 33 <td>{$session.username} {if $session.suer}(suid by {$session.suer}){/if}
441e9e98 34 [<a href="{$platal->ns}admin/logger/user/{$session.username}">user's log</a>]</td>
0337d704 35</tr>
e76421d8 36{if $session.forward_ip}
0337d704 37<tr class="pair">
a7de4ef7 38 <td class="titre">Hôte</td>
9797734d 39 <td><em>{$session.forward_host}</em> <tt>IP: {$session.forward_ip|uint_to_ip}</tt></td>
e76421d8 40</tr>
41<tr class="pair">
42 <td class="titre">Proxy</td>
9797734d 43 <td><em>{$session.host}</em> <tt>IP: {$session.ip|uint_to_ip}</tt></td>
e76421d8 44</tr>
45{else}
46<tr class="pair">
a7de4ef7 47 <td class="titre">{if $session.flags}Proxy{else}Hôte{/if}</td>
9797734d 48 <td><em>{$session.host}</em> <tt>IP: {$session.ip|uint_to_ip}</tt></td>
0337d704 49</tr>
e76421d8 50{/if}
0337d704 51<tr class="impair">
099b92fc 52 <td class="titre">Navigateur</td>
0337d704 53 <td>{$session.browser}</td>
54</tr>
55</table>
56
57<br />
58
59<table class="bicol">
60<tr>
099b92fc 61 <th>date</th>
62 <th>action</th>
a7de4ef7 63 <th>donnée</th>
0337d704 64</tr>
65{foreach from=$events item=myevent}
66<tr class="{cycle values="impair,pair"}">
67 <td style="font-size:90%;">{$myevent.stamp|date_format:"%x %X"}</td>
68 <td><strong>{$myevent.text}</strong></td>
69 <td>{$myevent.data}</td>
70</tr>
71{/foreach}
72</table>
73
74{else}
75
648020d2 76<form method="post" action="{$platal->ns}admin/logger">
0337d704 77<table class="bicol">
78<tr>
c2ef7ba6 79 <td><strong>Date</strong></td>
0337d704 80 <td>
a7de4ef7 81 Année
0337d704 82 <select name="year" onchange="this.form.submit()">
83 {html_options options=$years selected=$year}
84 </select>
099b92fc 85 &nbsp;Mois
0337d704 86 <select name="month" onchange="this.form.submit()">
87 {html_options options=$months selected=$month}
88 </select>
099b92fc 89 &nbsp;Jour
0337d704 90 <select name="day" onchange="this.form.submit()">
91 {html_options options=$days selected=$day}
92 </select>
93 </td>
afe6e01c
SJ
94</tr>
95<tr>
96 <td><strong>Action</strong></td>
97 <td>
98 <select name="action" onchange="this.form.submit()">
99 {html_options options=$actions selected=$action}
100 </select>
101 </td>
0337d704 102</tr>
103<tr>
099b92fc 104 <td><strong>Utilisateur</strong></td>
0337d704 105 <td>
106 <input type="text" name="loguser" value="{$loguser}" />
099b92fc 107 <input type="submit" />
0337d704 108 </td>
109</tr>
110</table>
111
112</form>
113
114<br />
115
116<table class="bicol" style="font-size: 90%">
117 <tr>
a7de4ef7 118 <th>début</th>
099b92fc 119 <th>utilisateur</th>
a7de4ef7 120 <th>résumé</th>
099b92fc 121 <th>actions</th>
0337d704 122 </tr>
123{foreach from=$sessions item=mysess}
124 <tr class="{cycle values="impair,pair"}">
125 <td>{$mysess.start|date_format:"%x %X"}</td>
c2ef7ba6 126 <td><strong>{$mysess.username}</strong></td>
0337d704 127 <td>
128 {foreach from=$mysess.events item=myevent}{$myevent}<br />{/foreach}
129 </td>
130 <td class="action">
441e9e98 131 <a href="admin/logger/session/{$mysess.id}">session</a>
9bef113f 132 {if !$loguser || ($loguser neq $mysess.username) || $year || $month || $day}
441e9e98 133 <a href="admin/logger/user/{$mysess.username}">user's log</a>
9bef113f 134 {/if}
0337d704 135 </td>
136 </tr>
137 {/foreach}
c8ab90e7 138{if t($msg_nofilters)}
0337d704 139<tr>
140 <td>{$msg_nofilters}</td>
141</tr>
142{/if}
143</table>
144{/if}
145
146
a7de4ef7 147{* vim:set et sw=2 sts=2 sws=2 enc=utf-8: *}