% /* Copyright 2009 Google Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS-IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License. */ %>
<% helpers.setHtmlTitle("EtherPad: "+pageTitle); %>
<% helpers.setBodyId("padbody") %>
<% helpers.addBodyClass(bodyClass) %>
<% helpers.includeCss("pad2_ejs.css") %>
<% helpers.includeJs("undo-xpopup.js") %>
<% helpers.includeCometJs() %>
<% helpers.includeJQuery(); %>
<% helpers.includeJs("json2.js") %>
<% helpers.includeJs("colorutils.js") %>
<% helpers.includeJs("ace.js") %>
<% helpers.includeJs("collab_client.js") %>
<% helpers.includeJs("draggable.js") %>
<% helpers.includeJs("pad_utils.js") %>
<% helpers.includeJs("pad_cookie.js") %>
<% helpers.includeJs("pad_editor.js") %>
<% helpers.includeJs("pad_userlist.js") %>
<% helpers.includeJs("pad_editbar.js") %>
<% helpers.includeJs("pad_chat.js") %>
<% helpers.includeJs("pad_docbar.js") %>
<% helpers.includeJs("pad_impexp.js") %>
<% helpers.includeJs("pad_savedrevs.js") %>
<% helpers.includeJs("pad_connectionstatus.js") %>
<% helpers.includeJs("pad_modals.js") %>
<% helpers.includeJs("pad2.js") %>
<% helpers.suppressGA() %>
<% helpers.setRobotsPolicy({index: false, follow: false}) %>
<%
var padUrlAttrValue = request.url.split("?", 1)[0].replace(/\"/g, '"'); //"
%>
<%
function exportLink(type, n, label, requiresOffice, url, title) {
url = url || '/ep/pad/export/'+localPadId+'/latest?format='+type;
var classes = ["exportlink", "exporthref"+type, "n"+n];
if (requiresOffice && !hasOffice) {
classes.push("disabledexport");
}
else {
classes.push("requiresoffice");
}
var pieces = ['', label);
/* if (title) {
pieces.push('?');
}*/
pieces.push('');
return pieces.join('');
}
%>
<% /* floated left */ %>
<% /* New Pad */ %>
<% /* floated right */ %>
<% /* Toggle Width */ %>
<% /* non-floated */ %>
<%= exportLink('html', 1, 'HTML', false) %>
<%= exportLink('txt', 2, 'Plain text', false) %>
<%= exportLink('link', 3, 'Bookmark file', false, '/ep/pad/linkfile?padId='+localPadId, 'This will save a file that, when opened, takes you to this pad.') %>