Add “mark as read” buttons to new post, reply, and Sone notifications.
[Sone.git] / src / main / resources / templates / notify / newReplyNotification.html
index d6d0670..2a194f2 100644 (file)
@@ -1,8 +1,15 @@
-<div class="short-text">
+<div class="short-text hidden">
        <%= Notification.NewReply.ShortText|l10n|html>
        <a class="link" onclick="showNotificationDetails('<%notification.id|html>'); return false;"><%= Notification.ClickHereToRead|l10n|html></a>
 </div>
-<div class="text hidden">
+<div class="text">
+       <form class="mark-as-read" action="markAsKnown.html" method="post">
+               <input type="hidden" name="formPassword" value="<% formPassword|html>" />
+               <input type="hidden" name="returnPage" value="<% request.uri|html>" />
+               <input type="hidden" name="type" value="reply" />
+               <input type="hidden" name="id" value="<%foreach replies reply><% reply.id|html><%notlast> <%/notlast><%/foreach>" />
+               <button type="submit" name="mark-read" value="true"><%= Notification.NewPost.Button.MarkRead|l10n|html></button>
+       </form>
        <%= Notification.NewReply.Text|l10n|html>
        <%foreach replies reply>
                <a href="viewPost.html?post=<% reply.post.id|html>"><% reply.sone.niceName|html></a><%notlast>,<%/notlast><%last>.<%/last>