}
return roomsForFloor;
}
+
+/*
+ * function to delete a comment from a blog post
+ */
+function DeleteBlogComment(msgnum) {
+ cmd = encodeURI("g_cmd=DELE " + msgnum);
+ new Ajax.Request("ajax_servcmd", {
+ parameters: cmd,
+ method: 'post',
+ onSuccess: function(transport) {
+ Effect.BlindUp('blog_comment_' + msgnum);
+ }
+ });
+}
-<div class="blog_comment">
+<div class="blog_comment" id="blog_comment_<?MAIL:SUMM:N>">
<div class="blog_comment_header">
<span>
<??("COND:MAIL:ANON",1)>
<??("X", 1)>
</span>
<span><?MAIL:SUMM:DATEFULL></span>
+<?!("COND:ROOM:EDITACCESS", 16)>
+ <a href="#" onclick="if (confirm('<?_("Delete this message?")>')) { DeleteBlogComment(<?MAIL:SUMM:N>); }"><span>[</span><?_("Delete")><span>]</span> </a>
+<??("X", 16)>
</div>
<div class="blog_comment_content">
<?MAIL:BODY>
<a href="javascript:GetLoggedInFirst(encodeURIComponent('display_enter?replying_mode=replyall?replying_to=<?MAIL:SUMM:N>?replyquote=<?MAIL:SUMM:N>'));"><span>[</span><?_("ReplyAll")><span>]</span></a>
<a href="javascript:GetLoggedInFirst(encodeURIComponent('display_enter?replying_mode=forward?replying_to=<?MAIL:SUMM:N>?fwdquote=<?MAIL:SUMM:N>'));"><span>[</span><?_("Forward")><span>]</span></a>
<??("X", 9)>
-<?!("COND:ROOM:EDITACCESS", 14)>
+<?!("COND:ROOM:EDITACCESS", 16)>
<a href="do_template?template=msg_confirm_move?msgid=<?MAIL:SUMM:N>"><span>[</span><?_("Move")><span>]</span></a>
<a href="delete_msg?msgid=<?MAIL:SUMM:N>" onclick="return confirm('<?_("Delete this message?")>');"><span>[</span><?_("Delete")><span>]</span> </a>
-<??("X", 14)>
+<??("X", 16)>
<a href="#" onclick="window.open('msgheaders/<?MAIL:SUMM:N>', 'headers<?MAIL:SUMM:N>', 'toolbar=no,location=no,directories=no,copyhistory=no,status=yes,scrollbars=yes,resizable=yes,width=600,height=400'); "><span>[</span><?_("Headers")><span>]</span></a>
<a href="#" onclick="window.open('printmsg/<?MAIL:SUMM:N>', 'print<?MAIL:SUMM:N>', 'toolbar=no,location=no,directories=no,copyhistory=no,status=yes,scrollbars=yes,resizable=yes,width=600,height=400'); "><span>[</span><?_("Print")><span>]</span></a>
</p>