Happy New Year!
[platal.git] / templates / admin / logger-view.tpl
1 {**************************************************************************}
2 {*                                                                        *}
3 {*  Copyright (C) 2003-2011 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 <h1>Parcours des logs du site</h1>
24
25 {if t($events)}
26
27 <table class="bicol">
28 <tr>
29   <th colspan="2">Propriétés de la session</th>
30 </tr>
31 <tr class="impair">
32   <td class="titre">utilisateur</td>
33   <td>{$session.username} {if $session.suer}(suid by {$session.suer}){/if}
34   [<a href="{$platal->ns}admin/logger/user/{$session.username}">user's log</a>]</td>
35 </tr>
36 {if $session.forward_ip}
37 <tr class="pair">
38   <td class="titre">Hôte</td>
39   <td><em>{$session.forward_host}</em> <tt>IP: {$session.forward_ip|uint_to_ip}</tt></td>
40 </tr>
41 <tr class="pair">
42   <td class="titre">Proxy</td>
43   <td><em>{$session.host}</em> <tt>IP: {$session.ip|uint_to_ip}</tt></td>
44 </tr>
45 {else}
46 <tr class="pair">
47   <td class="titre">{if $session.flags}Proxy{else}Hôte{/if}</td>
48   <td><em>{$session.host}</em> <tt>IP: {$session.ip|uint_to_ip}</tt></td>
49 </tr>
50 {/if}
51 <tr class="impair">
52   <td class="titre">Navigateur</td>
53   <td>{$session.browser}</td>
54 </tr>
55 </table>
56
57 <br />
58
59 <table class="bicol">
60 <tr>
61   <th>date</th>
62   <th>action</th>
63   <th>donnée</th>
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
76 <form method="post" action="{$platal->ns}admin/logger">
77 <table class="bicol">
78 <tr>
79   <td><strong>Date</strong></td>
80   <td>
81     Année
82     <select name="year" onchange="this.form.submit()">
83       {html_options options=$years selected=$year}
84     </select>
85     &nbsp;Mois
86     <select name="month" onchange="this.form.submit()">
87       {html_options options=$months selected=$month}
88     </select>
89     &nbsp;Jour
90     <select name="day" onchange="this.form.submit()">
91       {html_options options=$days selected=$day}
92     </select>
93   </td>
94 </tr>
95 <tr>
96   <td><strong>Utilisateur</strong></td>
97   <td>
98     <input type="text" name="loguser" value="{$loguser}" />
99     <input type="submit" />
100   </td>
101 </tr>
102 </table>
103
104 </form>
105
106 <br />
107
108 <table class="bicol" style="font-size: 90%">
109   <tr>
110     <th>début</th>
111     <th>utilisateur</th>
112     <th>résumé</th>
113     <th>actions</th>
114   </tr>
115 {foreach from=$sessions item=mysess}
116   <tr class="{cycle values="impair,pair"}">
117     <td>{$mysess.start|date_format:"%x %X"}</td>
118     <td><strong>{$mysess.username}</strong></td>
119     <td>
120       {foreach from=$mysess.events item=myevent}{$myevent}<br />{/foreach}
121     </td>
122     <td class="action">
123       <a href="admin/logger/session/{$mysess.id}">session</a>
124       {if !$loguser || ($loguser neq $mysess.username) || $year || $month || $day}
125       <a href="admin/logger/user/{$mysess.username}">user's log</a>
126       {/if}
127     </td>
128   </tr>
129   {/foreach}
130 {if t($msg_nofilters)}
131 <tr>
132   <td>{$msg_nofilters}</td>
133 </tr>
134 {/if}
135 </table>
136 {/if}
137
138
139 {* vim:set et sw=2 sts=2 sws=2 enc=utf-8: *}