]> ruin.nu Git - ndwebbie.git/blobdiff - root/src/forum/board.tt2
Converted forum to catalyst.
[ndwebbie.git] / root / src / forum / board.tt2
diff --git a/root/src/forum/board.tt2 b/root/src/forum/board.tt2
new file mode 100644 (file)
index 0000000..f158e65
--- /dev/null
@@ -0,0 +1,56 @@
+[% META title = 'Forum board' %]
+
+<h2>[% board.category %] - [% board.board %]</h2>
+
+[% IF UID > 0 %]<p><a href="[% c.uri_for('markBoardAsRead',board.fbid,time) %]">Mark threads as read</a></p>[% END %]
+
+<form action="[% c.uri_for('moveThreads',board.fbid) %]" method="post">
+<table class="boards">
+<tr>
+       <th>Unread</th>
+       <th>Total</th>
+       <th>Subject</th>
+       <th>Posted</th>
+       <th>Creator</th>
+       <th>Last post</th>
+</tr>
+[% FOR thread IN threads %]
+       <tr class="[% IF loop.count % 2 == 0 %]even[% ELSE %]odd[% END %]">
+               <td align="center">[% thread.unread %]</td>
+               <td align="center">[% thread.posts %]</td>
+               <td[% IF thread.sticky %] class="sticky"[% END %]><a href="[% c.uri_for('thread',thread.ftid)%]#NewPosts">&nbsp;[% thread.subject %]&nbsp;</a></td>
+               <td align="left">[% thread.posting_date %]</td>
+               <td align="center">[% thread.username %]</td>
+               <td align="left">[% thread.last_post %]</td>
+               [% IF board.moderate %]
+               <td><input type="checkbox" name="t:[% thread.ftid %]"></td>
+               [% END %]
+       </tr>
+[% END %]
+</table>
+
+[% IF board.moderate %]
+<p>Move checked threads to:
+<select name="board">
+[% FOR category IN categories %]
+       <optgroup label="[% category.category %]">
+       [% FOR targetboard IN category.boards %]
+               <option value="[% targetboard.fbid %]">[% targetboard.board %]</option>
+       [% END %]
+       </optgroup>
+[% END %]
+</select>
+<input type="submit" name="cmd" value="Move">
+</p>
+[% END %]
+</form>
+
+[% IF board.post %]
+<form action="[% c.uri_for('newThread',board.fbid) %]" method="post"><fieldset class="forum-post"> <legend>New Thread</legend>
+       <p>Subject: <input type="text" name="subject" value=""></p>
+       <textarea rows="25" cols="60" name="message"></textarea>
+       <br>
+       <input type="submit" name="cmd" value="Submit">
+       <input type="submit" name="cmd" value="Preview">
+</fieldset></form>
+[% END %]