]> code.citadel.org Git - citadel.git/blobdiff - webcit-ng/static/js/view_forum.js
Pass through the data to tell the client if it has room aide privileges and/or permis...
[citadel.git] / webcit-ng / static / js / view_forum.js
index 6840460461419eebc86f25396ff531bacc4fb9eb..cfe9ac61925a60e55f90e54e31f9b9a7f8144e98 100644 (file)
@@ -200,14 +200,18 @@ function forum_render_one(msg, existing_div) {
                + "<a href=\"javascript:open_reply_box('"+mdiv+"',true,'"+msg.wefw+"','"+msg.msgn+"');\">"
                + "<i class=\"fa fa-comment\"></i> " 
                + _("ReplyQuoted")
-               + "</a></span>"
+               + "</a></span>";
        
-               + "<span class=\"ctdl-msg-button\"><a href=\"#\">"              // Delete , show only with permission FIXME
-               + "<i class=\"fa fa-trash\"></i> " 
-               + _("Delete")
-               + "</a></span>"
+               if (can_delete_messages) {
+                       outmsg +=
+                       "<span class=\"ctdl-msg-button\"><a href=\"#\">"        // Delete (shown only with permission)
+                       + "<i class=\"fa fa-trash\"></i> " 
+                       + _("Delete")
+                       + "</a></span>";
+               }
        
-               + "</span>";                                                    // end buttons on right side
+               outmsg +=
+                 "</span>";                                                    // end buttons on right side
                if (msg.subj) {
                        outmsg +=
                        "<br><span class=\"ctdl-msgsubject\">" + msg.subj + "</span>";