]> ruin.nu Git - ndwebbie.git/blobdiff - root/src/forum/thread.tt2
Possible to mark threads unread from a specific post
[ndwebbie.git] / root / src / forum / thread.tt2
index 4ea7eb74dcdff002bcc1ea4e408483242aa73ef8..19c3589a81e7f52395706f60c1bc8ae857ffae67 100644 (file)
@@ -5,6 +5,10 @@
 <a href="[% c.uri_for('setSticky',thread.ftid, (thread.sticky ? 0 : 1)) %]">Make this thread [% thread.sticky ? 'unsticky' : 'sticky' %]</a>
 [% END %]
 
+[% IF c.user.id %]
+<a href="[% c.uri_for('markThreadAsUnread',thread.ftid) %]">Mark thread as unread</a>
+[% END %]
+
 [% createNewPostHr = 1 %]
 [% FOR post IN posts %]
        [% IF createNewPostHr AND post.unread%]
 <p><a name="NewPosts">New posts below:</a></p>
        [% END %]
 <fieldset class="forum-post">
-<legend class="forum-post-header"><b>[% post.username %]</b> : [% post.time %] </legend>
+<legend class="forum-post-header"><b>[% post.username %]</b> : [% post.time %]
+       <a href="[% c.uri_for('markPostAsUnread',post.fpid) %]">Unread from here</a></legend>
 <div class="forum-post-body">[% post.message %]</div>
 </fieldset>
 [% END %]
 
+[% IF c.user.id %]
+<a href="[% c.uri_for('markThreadAsUnread',thread.ftid) %]">Mark thread as unread</a>
+[% END %]
+
 [% IF thread.post %]
 <form action="[% c.uri_for('addPost',thread.ftid) %]#NewPosts" method="post"><fieldset class="forum-post"> <legend><a name="Reply">New Reply</a></legend>
        <textarea class="bbcode" rows="25" cols="60" name="message" id="replybox">[% previewMessage %]</textarea>
 [% END %]
 
 [% IF thread.post %]
-[%- site.stylesheets = ['markitup/skins/simple/style.css','markitup/sets/bbcode/style.css' ] %]
-<script type="text/javascript" src="/static/markitup/jquery.markitup.pack.js"></script>
-<script type="text/javascript" src="/static/markitup/sets/bbcode/set.js"></script>
-
 <script type="text/javascript">
 $(document).ready(function(){
+       $(".forum-post-header").append(
+               $("<span>").text(" | "));
        $(".forum-post-header").append(
                $("<a>").attr("href","#Reply").addClass("quotelink").text("Quote"));
        $(".quotelink").click(function(){
@@ -93,8 +100,7 @@ $(document).ready(function(){
                var oldtext = $("#replybox").val();
                $("#replybox").val(oldtext + "\n[quote=" + username + "]" + text + "[/quote]\n");
        });
-       mySettings.markupSet.pop();
-    $('.bbcode').markItUp(mySettings);
 });
 </script>
+[% INCLUDE inc/markitup.tt2 %]
 [% END %]