summaryrefslogtreecommitdiffstats
path: root/etherpad/src/themes/default/templates/pro/admin
diff options
context:
space:
mode:
authorAlexander Sulfrian <alexander@sulfrian.net>2010-06-08 09:01:43 +0200
committerAlexander Sulfrian <alexander@sulfrian.net>2010-06-08 09:01:43 +0200
commitd1fa08fdc9cb11dccee76d668ff85df30458c295 (patch)
tree1d19df6405103577d872902486792e8c23bce711 /etherpad/src/themes/default/templates/pro/admin
parentd7c5ad7d6263fd1baf9bfdbaa4c50b70ef2fbdb2 (diff)
parent70d1f9d6fcaefe611e778b8dbf3bafea8934aa08 (diff)
downloadetherpad-d1fa08fdc9cb11dccee76d668ff85df30458c295.tar.gz
etherpad-d1fa08fdc9cb11dccee76d668ff85df30458c295.tar.bz2
etherpad-d1fa08fdc9cb11dccee76d668ff85df30458c295.zip
Merge remote branch 'upstream/master'
Conflicts: etherpad/src/etherpad/control/pro/admin/pro_admin_control.js etherpad/src/etherpad/control/pro/pro_main_control.js etherpad/src/etherpad/control/pro_help_control.js etherpad/src/etherpad/globals.js etherpad/src/etherpad/legacy_urls.js etherpad/src/etherpad/pne/pne_utils.js etherpad/src/etherpad/pro/pro_utils.js etherpad/src/main.js etherpad/src/plugins/fileUpload/templates/fileUpload.ejs etherpad/src/plugins/testplugin/templates/page.ejs etherpad/src/static/css/pad2_ejs.css etherpad/src/static/css/pro-help.css etherpad/src/static/img/jun09/pad/protop.gif etherpad/src/static/js/store.js etherpad/src/themes/default/templates/framed/framedheader-pro.ejs etherpad/src/themes/default/templates/main/home.ejs etherpad/src/themes/default/templates/pro-help/main.ejs etherpad/src/themes/default/templates/pro-help/pro-help-template.ejs infrastructure/com.etherpad/licensing.scala trunk/etherpad/src/etherpad/collab/ace/contentcollector.js trunk/etherpad/src/etherpad/collab/ace/linestylefilter.js trunk/etherpad/src/static/css/home-opensource.css trunk/etherpad/src/static/js/ace.js trunk/etherpad/src/static/js/linestylefilter_client.js trunk/etherpad/src/templates/email/eepnet_license_info.ejs trunk/etherpad/src/templates/pad/pad_body2.ejs trunk/etherpad/src/templates/pad/pad_content.ejs trunk/etherpad/src/templates/pad/padfull_body.ejs trunk/etherpad/src/templates/pro/admin/pne-license-manager.ejs
Diffstat (limited to 'etherpad/src/themes/default/templates/pro/admin')
-rw-r--r--etherpad/src/themes/default/templates/pro/admin/account-manager.ejs59
-rw-r--r--etherpad/src/themes/default/templates/pro/admin/admin-template.ejs31
-rw-r--r--etherpad/src/themes/default/templates/pro/admin/delete-account.ejs35
-rw-r--r--etherpad/src/themes/default/templates/pro/admin/manage-account.ejs64
-rw-r--r--etherpad/src/themes/default/templates/pro/admin/new-account.ejs86
5 files changed, 275 insertions, 0 deletions
diff --git a/etherpad/src/themes/default/templates/pro/admin/account-manager.ejs b/etherpad/src/themes/default/templates/pro/admin/account-manager.ejs
new file mode 100644
index 0000000..f1b443f
--- /dev/null
+++ b/etherpad/src/themes/default/templates/pro/admin/account-manager.ejs
@@ -0,0 +1,59 @@
+<% /* 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. */ %>
+<% function fmtdate(d) {
+ if (!d) {
+ return "Never";
+ } else {
+ return d.toString().split(' ').slice(0,5).join(' ');
+ }
+} %>
+
+<h3 class="top">Accounts</h3>
+
+<div class="manage-accounts">
+
+ <%= messageDiv() %>
+ <%= warningDiv() %>
+
+ <p><a href="<%= request.path %>new">Create new account</a></p>
+
+ <% function renderAccountRow(u) {
+ var name = u.fullName;
+ return TR(TD(name),
+ TD(u.email),
+ TD(u.isAdmin ? 'Admin' : ''),
+ TD(fmtdate(u.lastLoginDate)),
+ TD(A({href: request.path + "account/"+u.id}, "Manage")))
+ }
+ %>
+
+ <table id="accountlist">
+ <tr>
+ <th width="99%">Name</th>
+ <th>Email</th>
+ <th>Role</th>
+ <th>Last Signed In</th>
+ <th>&nbsp;</th>
+ </tr>
+
+ <% accountList.forEach(function(u) { %>
+ <%= renderAccountRow(u) %>
+ <% }); %>
+
+ </table>
+
+ <p class="account-tally"><%= accountList.length %> account<%= accountList.length == 1 ? "" : "s" %>.</p>
+
+</div>
+
diff --git a/etherpad/src/themes/default/templates/pro/admin/admin-template.ejs b/etherpad/src/themes/default/templates/pro/admin/admin-template.ejs
new file mode 100644
index 0000000..a54964f
--- /dev/null
+++ b/etherpad/src/themes/default/templates/pro/admin/admin-template.ejs
@@ -0,0 +1,31 @@
+<% /* 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 Administration") %>
+<% helpers.includeCss("pro/pro-admin.css") %>
+
+<div class="fpcontent">
+ <table id="admin-layout-table">
+ <tr>
+ <td width="1%" id="admin-leftnav">
+ <%= renderAdminLeftNav() %>
+ </td>
+ <td width="99%" id="admin-right">
+ <%= getAdminContent() %>
+ </td>
+ </tr>
+ </table>
+
+</div>
+
+
+
diff --git a/etherpad/src/themes/default/templates/pro/admin/delete-account.ejs b/etherpad/src/themes/default/templates/pro/admin/delete-account.ejs
new file mode 100644
index 0000000..3de2122
--- /dev/null
+++ b/etherpad/src/themes/default/templates/pro/admin/delete-account.ejs
@@ -0,0 +1,35 @@
+<% /* 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. */ %><div id="delete-account-page">
+
+ <h3 class="top">Delete Account</h3>
+
+ <%= errorDiv() %>
+
+ <div class="confirm">Do you really want to delete this account?</div>
+
+ <div class="account-info"><%= account.fullName %> (<%= account.email %>)</div>
+
+ <form method="post" action="<%= request.path %>">
+ <input type="submit" name="delete" value="Delete" />
+ &nbsp;&nbsp;&nbsp;&nbsp;
+ <input type="submit" name="cancel" value="Cancel" />
+ </form>
+
+ <div class="note">When an account is deleted, some references to it may remain on the
+ site. For example, edits to pads by the deleted account will remain in the
+ pad's history. However, the deleted account will no longer be able to
+ sign in, and will not be counted toward your monthly quota.</div>
+
+</div>
+
diff --git a/etherpad/src/themes/default/templates/pro/admin/manage-account.ejs b/etherpad/src/themes/default/templates/pro/admin/manage-account.ejs
new file mode 100644
index 0000000..72529b4
--- /dev/null
+++ b/etherpad/src/themes/default/templates/pro/admin/manage-account.ejs
@@ -0,0 +1,64 @@
+<% /* 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. */ %>
+<h3 class="top">Manage Account</h3>
+
+<div class="manage-accounts">
+
+ <%= errorDiv() %>
+
+ <form method="post" action="<%= request.path %>">
+
+
+ <table id="manage-account">
+ <tr>
+ <th>Email:</th>
+ <td><input type="text" name="newEmail" id="newEmail" value="<%=
+ account.email %>" /></td>
+ </tr>
+
+ <tr>
+ <th>Full Name:</th>
+ <td><input type="text" name="newFullName" id="newFullName" value="<%=
+ account.fullName %>" /></td>
+ </tr>
+
+ <tr>
+ <th><label for="newIsAdmin">Administrator?</label></th>
+ <td>
+ <input type="checkbox" name="newIsAdmin" id="newIsAdmin"
+ <%= (account.isAdmin ? "checked='true'" : '') %>
+ />
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="2" style="text-align: right;">
+ <a href="/ep/admin/account-manager/delete-account/<%=
+ account.id %>">Delete Account</a>
+ </td>
+ </tr>
+
+ </table>
+
+ <div style="padding: 1em;">
+ <input class="submit" type="submit" name="btn" value="Save" />
+ <input class="submit" type="submit" name="cancel" value="Cancel" />
+ </div>
+
+ </form>
+
+</div>
+
+
+
diff --git a/etherpad/src/themes/default/templates/pro/admin/new-account.ejs b/etherpad/src/themes/default/templates/pro/admin/new-account.ejs
new file mode 100644
index 0000000..2f2cccf
--- /dev/null
+++ b/etherpad/src/themes/default/templates/pro/admin/new-account.ejs
@@ -0,0 +1,86 @@
+<% /* 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. */ %><% function formField(id, label, type) {
+ if (!type) { type = "text"; }
+ var val = (oldData[id] || "");
+
+ var d = DIV({className: "formfield"});
+
+ if (type == "checkbox") {
+ d.push(INPUT({type: type,
+ id: id,
+ name: id,
+ className: type+"input",
+ checked: (oldData[id] ? true : undefined)}),
+ LABEL({htmlFor: id, className: type+"label"}, label));
+ d.push(html('<div style="clear: both;"><!-- --></div>'));
+ } else if (type == "text") {
+ d.push(LABEL({className: type+"label", htmlFor: id}, label),
+ INPUT({className: type+"input",
+ type: type,
+ id: id,
+ name: id,
+ maxlength: 80,
+ value: val}));
+ } else if (type == "temppass") {
+ if (!val) {
+ val = stringutils.randomString(6).toUpperCase();
+ }
+ d.push(LABEL({className: type+"label", htmlFor: id}, label),
+ INPUT({className: type+"input",
+ type: "text",
+ id: id,
+ name: id,
+ maxlength: 80,
+ value: val
+ }));
+ }
+
+ return d;
+} %>
+
+<h3 class="top">Add new account</h3>
+
+<div class="manage-accounts newaccount">
+
+ <%= errorDiv() %>
+
+ <form method="post" action="<%= request.path %>">
+
+ <div class="new-account-form">
+
+ <div class="forminner">
+ <%= formField('email', 'Email:', 'text') %>
+ <%= formField('fullName', 'Full Name:', 'text') %>
+ <%= formField('tempPass', 'Temporary Password:', 'temppass') %>
+ <%= formField('makeAdmin', 'Make this account an administrator?', 'checkbox') %>
+ </div>
+
+ </div>
+ <br/><br/>
+ <div class="buttons-wrap">
+ <input class="submit" type="submit" name="btn" value="Create Account" />
+ <input class="submit" type="submit" name="cancel" value="Cancel" />
+ </div>
+
+ </form>
+
+ <p id="bottom-note">An email will be sent to this account with a link to sign in.
+ They will be prompted to change their password the first time they sign in.</p>
+ </p>
+
+</div>
+
+<script>document.getElementById('email').focus()</script>
+
+