other bits required for read only
This commit is contained in:
parent
41d24a8c8f
commit
818408cf49
|
@ -33,13 +33,18 @@ exports.expressCreateServer = function (hook_name, args, cb) {
|
|||
//serve pad.html under /p
|
||||
args.app.get('/p/:pad', function(req, res, next)
|
||||
{
|
||||
// The below might break for pads being rewritten
|
||||
var isReadOnly = req.url.indexOf("/p/r.") === 0;
|
||||
|
||||
hooks.callAll("padInitToolbar", {
|
||||
toolbar: toolbar
|
||||
toolbar: toolbar,
|
||||
isReadOnly: isReadOnly
|
||||
});
|
||||
|
||||
res.send(eejs.require("ep_etherpad-lite/templates/pad.html", {
|
||||
req: req,
|
||||
toolbar: toolbar
|
||||
toolbar: toolbar,
|
||||
isReadOnly: isReadOnly
|
||||
}));
|
||||
});
|
||||
|
||||
|
|
|
@ -63,12 +63,12 @@
|
|||
|
||||
<ul class="menu_left" role="toolbar">
|
||||
<% e.begin_block("editbarMenuLeft"); %>
|
||||
<%- toolbar.menu(settings.toolbar.left) %>
|
||||
<%- toolbar.menu(settings.toolbar.left, isReadOnly) %>
|
||||
<% e.end_block(); %>
|
||||
</ul>
|
||||
<ul class="menu_right" role="toolbar">
|
||||
<% e.begin_block("editbarMenuRight"); %>
|
||||
<%- toolbar.menu(settings.toolbar.right) %>
|
||||
<%- toolbar.menu(settings.toolbar.right, isReadOnly) %>
|
||||
<% e.end_block(); %>
|
||||
</ul>
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue