]> ruin.nu Git - ndwebbie.git/blobdiff - root/src/forum/thread.tt2
Easier to quote posts
[ndwebbie.git] / root / src / forum / thread.tt2
index bd3a1be8d7aa66e1062351a6f60007ed12dd9974..e08b4755cbf4425282056ec0ce0124135528f2fe 100644 (file)
 <p><a name="NewPosts">New posts below:</a></p>
        [% END %]
 <fieldset class="forum-post">
-<legend class="unread:[% post.unread %]"><b>[% post.username %]</b> : [% post.time %]</legend>
+<legend class="forum-post-header"><b>[% post.username %]</b> : [% post.time %] </legend>
        [% post.message %]
 </fieldset>
 [% END %]
 
 [% IF thread.post %]
-<form action="[% c.uri_for('addPost',thread.ftid) %]#NewPosts" method="post"><fieldset class="forum-post"> <legend>New Reply</legend>
-       <textarea rows="25" cols="60" name="message">[% previewMessage %]</textarea>
+<form action="[% c.uri_for('addPost',thread.ftid) %]#NewPosts" method="post"><fieldset class="forum-post"> <legend><a name="Reply">New Reply</a></legend>
+       <textarea rows="25" cols="60" name="message" id="replybox">[% previewMessage %]</textarea>
        <br>
        <input type="submit" name="cmd" value="Submit">
        <input type="submit" name="cmd" value="Preview">
 [% END %]
 
 [% IF thread.moderate %]
+
+<form action="[% c.uri_for('moveThreads',thread.fbid) %]" method="post">
+<p>Move checked threads to:
+<input type="hidden" name="t:[% thread.ftid %]" value="1">
+<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>
+</form>
+
 <form action="[% c.uri_for('postthreadaccess',thread.ftid) %]#NewPosts" method="post">
 <fieldset class="forum-post"> <legend>Change thread access</legend>
 <table>
@@ -50,6 +67,7 @@
        [% END %]
                </select></td>
                <td><select name="access" multiple size="5">
+                       <option value=""></option>
        [% FOR u IN access %]
                        <option value="[% u.uid %]">[% u.username %]</option>
        [% END %]
 <input type="submit" name="cmd" value="Change access">
 </fieldset></form>
 [% END %]
+
+[% IF thread.post %]
+<script type="text/javascript">
+$(document).ready(function(){
+       $(".forum-post-header").append(
+               $("<a>").attr("href","#Reply").addClass("quotelink").text("Quote"));
+       $(".quotelink").click(function(){
+               var text = $(this).parents("legend").siblings().text();
+               var username = $(this).parents("legend").text().split(" ",1);
+               var oldtext = $("#replybox").val();
+               $("#replybox").val(oldtext + "\n[quote=" + username + "]" + text + "[/quote]\n");
+       });
+});
+</script>
+[% END %]