diff options
Diffstat (limited to 'trunk/etherpad/src/templates/pro/admin')
14 files changed, 710 insertions, 0 deletions
diff --git a/trunk/etherpad/src/templates/pro/admin/account-manager.ejs b/trunk/etherpad/src/templates/pro/admin/account-manager.ejs new file mode 100644 index 0000000..f1b443f --- /dev/null +++ b/trunk/etherpad/src/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> </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/trunk/etherpad/src/templates/pro/admin/admin-template.ejs b/trunk/etherpad/src/templates/pro/admin/admin-template.ejs new file mode 100644 index 0000000..a54964f --- /dev/null +++ b/trunk/etherpad/src/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/trunk/etherpad/src/templates/pro/admin/admin.ejs b/trunk/etherpad/src/templates/pro/admin/admin.ejs new file mode 100644 index 0000000..f8e1562 --- /dev/null +++ b/trunk/etherpad/src/templates/pro/admin/admin.ejs @@ -0,0 +1,15 @@ +<% /* 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. */ %> +Please select an option from the left. + diff --git a/trunk/etherpad/src/templates/pro/admin/billing-invoices.ejs b/trunk/etherpad/src/templates/pro/admin/billing-invoices.ejs new file mode 100644 index 0000000..a3a17d8 --- /dev/null +++ b/trunk/etherpad/src/templates/pro/admin/billing-invoices.ejs @@ -0,0 +1,45 @@ +<% /* 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.includeCss('store/ondemand-billing.css'); +%> + +<% +function displayInvoice(invoice) { %> + <tr> + <td><%= formatDate(invoice.time) %></td> + <td><%= invoice.id %></td> + <td><%= invoice.status == 'paid' ? "Paid" : (invoice.status == 'pending' ? "<strong>Pending</strong>" : (invoice.status == 'refunded' ? "<em>Refunded</em>" : invoice.status)) %></td> + <td><%= invoice.users %></td> + <td>US $<%= dollars(centsToDollars(invoice.amt)) %></td> + <td><a href="<%= request.path %>?id=<%= invoice.id %>">View</a></td> + </tr> +<% } %> + +<h3 class="top">Past Invoices</h3> + +<% if (invoices.length == 0) { %> + <p class="informational">No old invoices.</p> +<% } else { %> + <table class="invoicelist"> + <tr> + <th>Date</th> + <th>Invoice Number</th> + <th>Status</th> + <th>Number of users</th> + <th>Cost</th> + <th> </th> + </tr> + <% invoices.forEach(displayInvoice); %> + </table> +<% } %>
\ No newline at end of file diff --git a/trunk/etherpad/src/templates/pro/admin/delete-account.ejs b/trunk/etherpad/src/templates/pro/admin/delete-account.ejs new file mode 100644 index 0000000..3de2122 --- /dev/null +++ b/trunk/etherpad/src/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" /> + + <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/trunk/etherpad/src/templates/pro/admin/manage-account.ejs b/trunk/etherpad/src/templates/pro/admin/manage-account.ejs new file mode 100644 index 0000000..72529b4 --- /dev/null +++ b/trunk/etherpad/src/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/trunk/etherpad/src/templates/pro/admin/manage-billing.ejs b/trunk/etherpad/src/templates/pro/admin/manage-billing.ejs new file mode 100644 index 0000000..514d943 --- /dev/null +++ b/trunk/etherpad/src/templates/pro/admin/manage-billing.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. */ %> +<% + helpers.includeCss('store/ondemand-billing.css'); +%> + +<% function fmtdate(d) { + if (!d) { + return "Never"; + } else { + return d.toString().split(' ').slice(0,5).join(' '); + } +} + +function plural(amt) { + return (amt == 1 ? "" : "s"); +} + +%> + +<h3 class="top">Payment Information</h3> + +<p>EtherPad Professional will be discontinued on <%= helpers.rafterTerminationDate() %>. No further payments will be collected.</p> +<p><a href="http://pad.spline.inf.fu-berlin.de<%= helpers.rafterBlogUrl() %>">Read more</a>.</p> diff --git a/trunk/etherpad/src/templates/pro/admin/new-account.ejs b/trunk/etherpad/src/templates/pro/admin/new-account.ejs new file mode 100644 index 0000000..2f2cccf --- /dev/null +++ b/trunk/etherpad/src/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> + + diff --git a/trunk/etherpad/src/templates/pro/admin/pne-config.ejs b/trunk/etherpad/src/templates/pro/admin/pne-config.ejs new file mode 100644 index 0000000..56fe68d --- /dev/null +++ b/trunk/etherpad/src/templates/pro/admin/pne-config.ejs @@ -0,0 +1,33 @@ +<% /* 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">Private Server Configuration</h3> + +<p>Your private EtherPad server can be configured using either command-line arguments (of the +form --<i>argName</i>=<i>value</i>), or by adding the options to the file +<tt>data/etherpad.properties</tt>.</p> + +<p>Learn more about server options in the <a href="/ep/pne-server-manual/">PNE Server Manual</a>.</p> + +<h3>Current Config Values</h3> + +<table id="pne-config"> +<tr><th with="1%">Option Name</th><th width="99%">Current Value</th></tr> +<% propKeys.forEach(function(k) { %> +<tr><td class="key"><%= k %></td><td class="val"><%= appjetConfig[k] %></td></tr> +<% }) %> +</table> + + + + + diff --git a/trunk/etherpad/src/templates/pro/admin/pne-dashboard.ejs b/trunk/etherpad/src/templates/pro/admin/pne-dashboard.ejs new file mode 100644 index 0000000..6b9b456 --- /dev/null +++ b/trunk/etherpad/src/templates/pro/admin/pne-dashboard.ejs @@ -0,0 +1,40 @@ +<% /* 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 Private Server Dashboard") %> + +<h3 class="top">User Quota</h3> + +<p>Your maximum daily unique user quota is: <b><%= userQuota %></b></p> +<p>So far today, there have been <b><%= todayActiveUsers %></b> applied against this quota.</p> + +<h3>Uptime</h3> + +This server has been running for <b><%= renderUptime() %></b>. + +<h3>HTTP Response Codes</h3> + +<%= renderResponseCodes() %> + +<h3>Current Realtime Pad Connections</h3> + +<%= renderPadConnections() %> + +<h3>Realtime Transport Performance</h3> + +<%= renderTransportStats() %> + +<div style="font-size: 12px; text-align: right;"> + <a style="color: #ccc;" href="/ep/admin/pne-advanced">*</a> +</div> + + diff --git a/trunk/etherpad/src/templates/pro/admin/pne-license-manager.ejs b/trunk/etherpad/src/templates/pro/admin/pne-license-manager.ejs new file mode 100644 index 0000000..42594b8 --- /dev/null +++ b/trunk/etherpad/src/templates/pro/admin/pne-license-manager.ejs @@ -0,0 +1,132 @@ +<% /* 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 PNE License Manager"); %> +<% helpers.includeJQuery() %> +<% helpers.includeJs("etherpad.js") %> + +<div id="lm"> + + <% if (isExpired) { %> + + <div class="lm-error-msg"> + <p>Your evaluation license has expired!</p> + <p>Please contact <%= helpers.oemail("sales") %> or visit the <a + href="http://pad.spline.inf.fu-berlin.de/ep/about/pricing-eepnet">pricing page on pad.spline.inf.fu-berlin.de</a> + to purchase a license key.</p> + </div> + + <% } %> + + <% if (isTooOld) { %> + + <div class="lm-notice-msg"> + <p>The version of EtherPad you are running (<%= runningVersionString %>) is too old. + Please update to version <%= licenseVersionString %> or newer by <a + href="http://pad.spline.inf.fu-berlin.de/ep/store/eepnet-download">downloading the latest version on + pad.spline.inf.fu-berlin.de</a>.</p> + </div> + + <% } %> + + <% if (errorMessage) { %> + <div class="lm-error-msg"> + <p><%= errorMessage %></p> + </div> + <% } %> + + <% if (licenseInfo && !edit) { %> + + <h3 class="top">License Info:</h3> + + <div id="lm-status"> + <table> + <tr> + <td width="1%" align="right">Licensed To: </td> + <td width="99%"><b><%= licenseInfo.personName %></b></td> + </tr> + + <tr> + <td align="right">Organization: </td> + <td><b><%= licenseInfo.organizationName %></b></td> + </tr> + + <tr> + <td align="right">Software Edition: </td> + <td><b><%= licenseInfo.editionName %></b></td> + </tr> + + <tr> + <td align="right">Maximum Users: </td> + <td><b><%= licenseInfo.userQuota %></b></td> + </tr> +<!-- + <tr> + <td align="right">Licensed PNE Version: </td> + <td><b><%= licenseVersionString %>+</b></td> + </tr> +--> + <tr> + <td align="right">Expires: </td> + <td><b><%= licenseInfo.expiresDate ? licenseInfo.expiresDate.toString() : "never" %></b></td> + </tr> + </table> + + </div> + + <div id="lm-edit-button-wrap"> + <form action="<%= request.path %>edit" method="get"> + <input type="submit" name="btn" value="Edit License Info" /> + </form> + </div> + + <% } %> + + <% if (isExpired || !licenseInfo || edit) { %> + + <h3 class="top">Enter New License Info:</h3> + + <% if (isUnlicensed) { %> + <p>Before you can use this copy of EtherPad Private Network Edition, you must first + enter a valid license. Free trial licenses can be obtained <a + target="_blank" + href="https://pad.spline.inf.fu-berlin.de/ep/store/eepnet-eval-signup">obtained here</a>. + </p> + <% } %> + + <form action="<%= request.path %>" method="post"> + <div id="lm-edit"> + + <p><b>Name:</b></p> + <input style="width: 100%;" type="text" name="personName" + value="<%= toHTML(oldData.personName || "") %>" /> + + <p><b>Organization:</b></p> + <input style="width: 100%;" type="text" name="orgName" + value="<%= toHTML(oldData.orgName || "") %>" /> + + <p><b>License Key:</b></p> + <textarea style="width: 100%; height: 60px;" + name="licenseString"><%= toHTML(oldData.licenseString || "") %></textarea> + + </div> + + <div id="lm-edit-submit-wrap"> + <input type="submit" name="submit" value="Submit" /> + <input type="submit" name="cancel" value="Cancel" /> + </div> + </form> + + <% } %> + +</div><!-- /lm --> + diff --git a/trunk/etherpad/src/templates/pro/admin/pne-shell.ejs b/trunk/etherpad/src/templates/pro/admin/pne-shell.ejs new file mode 100644 index 0000000..f398b15 --- /dev/null +++ b/trunk/etherpad/src/templates/pro/admin/pne-shell.ejs @@ -0,0 +1,33 @@ +<% /* 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("Shell") %> + +<p style="margin-top: 0; color: red;">Warning! Be careful with this page.</p> + +<h3 class="top">Shell</h3> + +<p>Enter command:</p> + +<form action="<%= request.path %>" method="post"> + <textarea name="cmd" style="width: 100%; height: 140px;"><%= oldCmd %></textarea> + <input type="submit" value="Run" /> +</form> + +<% if (result) { %> + <h3>Result</h3> + <div style="font-family: monospace; border: 1px solid #66f; padding: 1em;"> + <%= result %> + </div> + <p style="color: #888; font-family: monospace; font-size: .7em;">Computed in <%= elapsedMs %>ms.</p> +<% } %> + diff --git a/trunk/etherpad/src/templates/pro/admin/pro-config.ejs b/trunk/etherpad/src/templates/pro/admin/pro-config.ejs new file mode 100644 index 0000000..32cb610 --- /dev/null +++ b/trunk/etherpad/src/templates/pro/admin/pro-config.ejs @@ -0,0 +1,55 @@ +<% /* 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">Application Configuration</h3> + +<%= messageDiv() %> + +<form action="<%= request.path %>" method="post"> + +<table id="t-pro-config"> + <tr> + <th width="50%" valign="top">Site Name (appears in + the header of all pages):</th> + <td width="50%" valign="top"> + <input type="text" name="siteName" value="<%= + config.siteName %>" id="siteName" /> + </td> + </tr> + + <tr> + <th valign="top">Always require all users on this domain to use secure + (HTTPS) connections?</th> + <td valign="top"> + <input type="checkbox" id="alwaysHttps" name="alwaysHttps" + <%= config.alwaysHttps ? 'checked="on"' : '' %> /> + </td> + </tr> + + <tr> + <th valign="top">Default pad text:</th> + <td valign="top"> + <textarea name="defaultPadText" id="defaultPadText"><%= + config.defaultPadText %></textarea> + </td> + </tr> + + <tr> + <td colspan="2" style="text-align: right;"> + <input type="submit" name="save" value="Apply" /> + </td> + </tr> +</table> + +</form> + diff --git a/trunk/etherpad/src/templates/pro/admin/single-invoice.ejs b/trunk/etherpad/src/templates/pro/admin/single-invoice.ejs new file mode 100644 index 0000000..aeab184 --- /dev/null +++ b/trunk/etherpad/src/templates/pro/admin/single-invoice.ejs @@ -0,0 +1,47 @@ +<% /* 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.includeCss('store/ondemand-billing.css'); +%> + +<h3 class="top">Past Invoices</h3> + +<p>Invoice #<%= invoice.id %>, dated <%= formatDate(invoice.time) %>.</p> + +<table class="billingsummary"> + <tr> + <th>Invoice status</th> + <td><%= invoice.status == 'paid' ? "Paid" : (invoice.status == 'pending' ? "<strong>Pending</strong>" : (invoice.status == 'refunded' ? "<em>Refunded</em>" : invoice.status)) %></td> + </tr> + <tr> + <th>Number of users</th> + <td><%= invoice.users %></td> + </tr> + <tr> + <th>Cost</th> + <td>US $<%= dollars(centsToDollars(invoice.amt)) %></td> + </tr> + <% if (transaction) { %> + <tr> + <th>Paid on</th> + <td><%= formatDate(transaction.time) %></td> + </tr> + <tr> + <th>Paid using</th> + <td><%= transaction.payInfo %></td> + </tr> + <% } %> +</table> + +<p class="returnlink"><a href="<%= request.path %>">« back to invoice list</a></p> + |