root/veekun/trunk/templates/shoutbox.tt

Revision 406, 1.5 kB (checked in by eevee, 10 months ago)

Database refactoring. Renamed columns and tables to be more consistent and more readable. (#58)

Line 
1[% PROCESS common.tt %]
2
3[% IF shouts_rs.is_empty %]
4<p>There are no shoutbox entries.</p>
5[%     RETURN %]
6[% END %]
7
8<p class="total center">[% shout_total %] shoutbox comments total</p>
9[% pagelist(skip, c.site_opts.page_sizes.shoutbox, shout_total, '/shoutbox', {}) %]
10
11[% can_nuke = c.can_i('shoutbox_nuke') %]
12[% can_ip = c.can_i('ip') %]
13<table class="shoutlist" cellspacing="0">
14<tr class="heading">
15    <th class="time">Date/Time</th>
16    <th class="ip">IP</th>
17    <th class="user">User</th>
18    <th class="content">Shout</th>
19[% IF can_nuke %]
20    <th class="actions">Actions</th>
21[% END %]
22</tr>
23[% color = 1 %]
24[% WHILE (s = shouts_rs.next) %]
25<tr class="color[% color %]">
26    <td class="time" title="[% time - s.time | timespan %] ago">[% s.time | date %]</td>
27    <td class="ip">[% can_ip ? inet_ntoa(s.ip) : tripcode(s.ip) %]</td>
28    <td class="user">
29[%     IF s.user_id %]
30        <a href="/users/[% s.user_id %]" title="[% s.user.name %]">[% s.name %]</a>[% '*' UNLESS s.name == s.user.name %]
31[%     ELSE %]
32        [% s.name %]
33[%     END %]
34    </td>
35    <td class="content">
36[%         s.content | html | html_line_break | indent(8) %]
37    </td>
38[%     IF can_nuke %]
39    <td class="actions">
40        <form class="chibiform" method="POST" action="/shoutbox/[% s.id %]/nuke" onsubmit="return confirm('Really nuke this post?\nThis cannot be undone.');"><input type="image" src="/images/icons/nuke.png" alt="Nuke"/></form>
41    </td>
42[%     END %]
43</tr>
44[% color = 3 - color %]
45[% END %]
46</table>
Note: See TracBrowser for help on using the browser.