first reimport from platal
[platal.git] / templates / logger-view.tpl
1 {**************************************************************************}
2 {*                                                                        *}
3 {*  Copyright (C) 2003-2004 Polytechnique.org                             *}
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
23
24 <h1>
25   Parcours des logs du site
26 </h1>
27
28
29 {if $smarty.request.logsess}
30
31 <table class="bicol">
32 <tr>
33   <th colspan="2">{$msg_session_properties}</th>
34 </tr>
35 <tr class="impair">
36   <td class="titre">{$msg_user}</td>
37   <td>{$session.username} {if $session.suer}(suid by {$session.suer}){/if} [<a href="?logauth={$session.auth}&amp;loguser={$session.username}">user's log</a>]</td>
38 </tr>
39 <tr class="pair">
40   <td class="titre">{$msg_host}</td>
41   <td><em>{$session.host}</em> <tt>IP: {$session.ip}</tt></td>
42 </tr>
43 <tr class="impair">
44   <td class="titre">{$msg_browser}</td>
45   <td>{$session.browser}</td>
46 </tr>
47 </table>
48
49 <br />
50
51 <table class="bicol">
52 <tr>
53   <th>{$msg_date}</th>
54   <th>{$msg_action}</th>
55   <th>{$msg_data}</th>
56 </tr>
57 {foreach from=$events item=myevent}
58 <tr class="{cycle values="impair,pair"}">
59   <td style="font-size:90%;">{$myevent.stamp|date_format:"%x %X"}</td>
60   <td><strong>{$myevent.text}</strong></td>
61   <td>{$myevent.data}</td>
62 </tr>
63 {/foreach}
64 </table>
65
66 {else}
67
68 <form method="post" action="{$smarty.server.PHP_SELF}">
69 <table class="bicol">
70 <tr>
71   <th colspan="2">{$msg_filter_by}</th>
72 </tr>
73 <tr>
74   <td><strong>{$msg_date}</strong></td>
75   <td>
76     {$msg_year}
77     <select name="year" onchange="this.form.submit()">
78       {html_options options=$years selected=$year}
79     </select>
80     &nbsp;{$msg_month}
81     <select name="month" onchange="this.form.submit()">
82       {html_options options=$months selected=$month}
83     </select>
84     &nbsp;{$msg_day}
85     <select name="day" onchange="this.form.submit()">
86       {html_options options=$days selected=$day}
87     </select>
88   </td>
89 </tr>
90 <tr>
91   <td><strong>{$msg_user}</strong></td>
92   <td>
93     <input type="text" name="loguser" value="{$loguser}" />
94     {html_options name="logauth" options=$auths selected=$logauth}
95     <input type="submit" value="{$msg_submit}" />
96   </td>
97 </tr>
98 </table>
99
100 </form>
101
102 <br />
103
104 <table class="bicol" style="font-size: 90%">
105   <tr>
106     <th>{$msg_start}</th>
107     <th>{$msg_user}</th>
108     <th>{$msg_summary}</th>
109     <th>{$msg_actions}</th>
110   </tr>
111 {foreach from=$sessions item=mysess}
112   <tr class="{cycle values="impair,pair"}">
113     <td>{$mysess.start|date_format:"%x %X"}</td>
114     <td><strong>{$mysess.username}</strong> <span class="smaller">({$mysess.lauth})</span></td>
115     <td>
116       {foreach from=$mysess.events item=myevent}{$myevent}<br />{/foreach}
117     </td>
118     <td class="action">
119 {foreach from=$mysess.actions item=myaction}
120       {a lnk=$myaction}
121 {/foreach}
122     </td>
123   </tr>
124   {/foreach}
125 {if $msg_nofilters}
126 <tr>
127   <td>{$msg_nofilters}</td>
128 </tr>
129 {/if}
130 </table>
131 {/if}
132
133
134 {* vim:set et sw=2 sts=2 sws=2: *}