]> ruin.nu Git - ndwebbie.git/blob - root/src/forum/board.tt2
Converted forum to catalyst.
[ndwebbie.git] / root / src / forum / board.tt2
1 [% META title = 'Forum board' %]
2
3 <h2>[% board.category %] - [% board.board %]</h2>
4
5 [% IF UID > 0 %]<p><a href="[% c.uri_for('markBoardAsRead',board.fbid,time) %]">Mark threads as read</a></p>[% END %]
6
7 <form action="[% c.uri_for('moveThreads',board.fbid) %]" method="post">
8 <table class="boards">
9 <tr>
10         <th>Unread</th>
11         <th>Total</th>
12         <th>Subject</th>
13         <th>Posted</th>
14         <th>Creator</th>
15         <th>Last post</th>
16 </tr>
17 [% FOR thread IN threads %]
18         <tr class="[% IF loop.count % 2 == 0 %]even[% ELSE %]odd[% END %]">
19                 <td align="center">[% thread.unread %]</td>
20                 <td align="center">[% thread.posts %]</td>
21                 <td[% IF thread.sticky %] class="sticky"[% END %]><a href="[% c.uri_for('thread',thread.ftid)%]#NewPosts">&nbsp;[% thread.subject %]&nbsp;</a></td>
22                 <td align="left">[% thread.posting_date %]</td>
23                 <td align="center">[% thread.username %]</td>
24                 <td align="left">[% thread.last_post %]</td>
25                 [% IF board.moderate %]
26                 <td><input type="checkbox" name="t:[% thread.ftid %]"></td>
27                 [% END %]
28         </tr>
29 [% END %]
30 </table>
31
32 [% IF board.moderate %]
33 <p>Move checked threads to:
34 <select name="board">
35 [% FOR category IN categories %]
36         <optgroup label="[% category.category %]">
37         [% FOR targetboard IN category.boards %]
38                 <option value="[% targetboard.fbid %]">[% targetboard.board %]</option>
39         [% END %]
40         </optgroup>
41 [% END %]
42 </select>
43 <input type="submit" name="cmd" value="Move">
44 </p>
45 [% END %]
46 </form>
47
48 [% IF board.post %]
49 <form action="[% c.uri_for('newThread',board.fbid) %]" method="post"><fieldset class="forum-post"> <legend>New Thread</legend>
50         <p>Subject: <input type="text" name="subject" value=""></p>
51         <textarea rows="25" cols="60" name="message"></textarea>
52         <br>
53         <input type="submit" name="cmd" value="Submit">
54         <input type="submit" name="cmd" value="Preview">
55 </fieldset></form>
56 [% END %]