1 [% META title = 'Forum thread' %]
2 <h2>[% thread.subject %]</h2>
3 <h3>[% thread.category %] - <a href="[% c.uri_for('board',thread.fbid) %]">[% thread.board %]</a></h3>
4 [% IF thread.moderate %]
5 <a href="[% c.uri_for('setSticky',thread.ftid, (thread.sticky ? 0 : 1)) %]">Make this thread [% thread.sticky ? 'unsticky' : 'sticky' %]</a>
8 [% createNewPostHr = 1 %]
9 [% FOR post IN posts %]
10 [% IF createNewPostHr AND post.unread%]
11 [% createNewPostHr = 0 %]
13 <p><a name="NewPosts">New posts below:</a></p>
15 <fieldset class="forum-post">
16 <legend class="forum-post-header"><b>[% post.username %]</b> : [% post.time %] </legend>
17 <div class="forum-post-body">[% post.message %]</div>
22 <form action="[% c.uri_for('addPost',thread.ftid) %]#NewPosts" method="post"><fieldset class="forum-post"> <legend><a name="Reply">New Reply</a></legend>
23 <textarea rows="25" cols="60" name="message" id="replybox">[% previewMessage %]</textarea>
25 <input type="submit" name="cmd" value="Submit">
26 <input type="submit" name="cmd" value="Preview">
30 [% IF access.size > 0 %]
32 <p>The following ppl have access to this thread: [% FOR a IN access %]
33 [% IF a.uid == UID; hasaccess = 1; END %]
37 <p><a href="[% c.uri_for('removeownthreadaccess',thread.ftid) %]">Remove your access</a></p>
41 [% IF thread.moderate %]
43 <form action="[% c.uri_for('moveThreads',thread.fbid) %]" method="post">
44 <p>Move checked threads to:
45 <input type="hidden" name="t:[% thread.ftid %]" value="1">
47 [% FOR category IN categories %]
48 <optgroup label="[% category.category %]">
49 [% FOR targetboard IN category.boards %]
50 <option value="[% targetboard.fbid %]">[% targetboard.board %]</option>
55 <input type="submit" name="cmd" value="Move">
59 <form action="[% c.uri_for('postthreadaccess',thread.ftid) %]#NewPosts" method="post">
60 <fieldset class="forum-post"> <legend>Change thread access</legend>
62 <tr><th>Add</th><th>Remove</th></tr>
64 <td><select name="uid" multiple size="5">
66 <option value="[% u.uid %]">[% u.username %]</option>
69 <td><select name="access" multiple size="5">
70 <option value=""></option>
72 <option value="[% u.uid %]">[% u.username %]</option>
77 <input type="submit" name="cmd" value="Change access">
82 <script type="text/javascript">
83 $(document).ready(function(){
84 $(".forum-post-header").append(
85 $("<a>").attr("href","#Reply").addClass("quotelink").text("Quote"));
86 $(".quotelink").click(function(){
87 var text = $(this).parents("legend").siblings().text();
88 var username = $(this).parents("legend").text().split(" ",1);
89 var oldtext = $("#replybox").val();
90 $("#replybox").val(oldtext + "\n[quote=" + username + "]" + text + "[/quote]\n");