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