summaryrefslogtreecommitdiffstats
path: root/trunk/etherpad/src/templates
diff options
context:
space:
mode:
Diffstat (limited to 'trunk/etherpad/src/templates')
-rw-r--r--trunk/etherpad/src/templates/500_body.ejs26
-rw-r--r--trunk/etherpad/src/templates/beta/signup.ejs63
-rw-r--r--trunk/etherpad/src/templates/email/eepnet_license_info.ejs72
-rw-r--r--trunk/etherpad/src/templates/email/eepnet_purchase_receipt.ejs93
-rw-r--r--trunk/etherpad/src/templates/email/padinvite.ejs18
-rw-r--r--trunk/etherpad/src/templates/email/pro_beta_invite.ejs23
-rw-r--r--trunk/etherpad/src/templates/email/pro_payment_failure.ejs26
-rw-r--r--trunk/etherpad/src/templates/email/pro_payment_receipt.ejs55
-rw-r--r--trunk/etherpad/src/templates/framed/framedfooter.ejs13
-rw-r--r--trunk/etherpad/src/templates/framed/framedheader-pro.ejs76
-rw-r--r--trunk/etherpad/src/templates/framed/framedheader.ejs13
-rw-r--r--trunk/etherpad/src/templates/framed/framedpage-pro.ejs31
-rw-r--r--trunk/etherpad/src/templates/framed/framedpage.ejs37
-rw-r--r--trunk/etherpad/src/templates/html.ejs43
-rw-r--r--trunk/etherpad/src/templates/main/home.ejs58
-rw-r--r--trunk/etherpad/src/templates/main/pro_signup_body.ejs71
-rw-r--r--trunk/etherpad/src/templates/misc/pad_default.ejs16
-rw-r--r--trunk/etherpad/src/templates/notice.ejs16
-rw-r--r--trunk/etherpad/src/templates/pad/create_body.ejs26
-rw-r--r--trunk/etherpad/src/templates/pad/create_body_rafter.ejs23
-rw-r--r--trunk/etherpad/src/templates/pad/exporthtml.ejs28
-rw-r--r--trunk/etherpad/src/templates/pad/pad_body.ejs69
-rw-r--r--trunk/etherpad/src/templates/pad/pad_body2.ejs472
-rw-r--r--trunk/etherpad/src/templates/pad/pad_content.ejs297
-rw-r--r--trunk/etherpad/src/templates/pad/pad_download_link.ejs27
-rw-r--r--trunk/etherpad/src/templates/pad/pad_iphone_body.ejs29
-rw-r--r--trunk/etherpad/src/templates/pad/padfull_body.ejs32
-rw-r--r--trunk/etherpad/src/templates/pad/padslider_body.ejs41
-rw-r--r--trunk/etherpad/src/templates/pad/padview_body.ejs141
-rw-r--r--trunk/etherpad/src/templates/pad/total_users_exceeded.ejs29
-rw-r--r--trunk/etherpad/src/templates/pro-account/recover.ejs48
-rw-r--r--trunk/etherpad/src/templates/pro-account/sign-in.ejs57
-rw-r--r--trunk/etherpad/src/templates/pro/account/account-welcome-email.ejs32
-rw-r--r--trunk/etherpad/src/templates/pro/account/create-admin-account.ejs37
-rw-r--r--trunk/etherpad/src/templates/pro/account/forgot-password-email.ejs22
-rw-r--r--trunk/etherpad/src/templates/pro/account/forgot-password.ejs66
-rw-r--r--trunk/etherpad/src/templates/pro/account/global-multi-domain-recover-email.ejs27
-rw-r--r--trunk/etherpad/src/templates/pro/account/guest-knock.ejs27
-rw-r--r--trunk/etherpad/src/templates/pro/account/my-account.ejs67
-rw-r--r--trunk/etherpad/src/templates/pro/account/signin-guest.ejs51
-rw-r--r--trunk/etherpad/src/templates/pro/account/signin.ejs81
-rw-r--r--trunk/etherpad/src/templates/pro/admin/account-manager.ejs59
-rw-r--r--trunk/etherpad/src/templates/pro/admin/admin-template.ejs31
-rw-r--r--trunk/etherpad/src/templates/pro/admin/admin.ejs15
-rw-r--r--trunk/etherpad/src/templates/pro/admin/billing-invoices.ejs45
-rw-r--r--trunk/etherpad/src/templates/pro/admin/delete-account.ejs35
-rw-r--r--trunk/etherpad/src/templates/pro/admin/manage-account.ejs64
-rw-r--r--trunk/etherpad/src/templates/pro/admin/manage-billing.ejs35
-rw-r--r--trunk/etherpad/src/templates/pro/admin/new-account.ejs86
-rw-r--r--trunk/etherpad/src/templates/pro/admin/pne-config.ejs33
-rw-r--r--trunk/etherpad/src/templates/pro/admin/pne-dashboard.ejs40
-rw-r--r--trunk/etherpad/src/templates/pro/admin/pne-license-manager.ejs132
-rw-r--r--trunk/etherpad/src/templates/pro/admin/pne-shell.ejs33
-rw-r--r--trunk/etherpad/src/templates/pro/admin/pro-config.ejs55
-rw-r--r--trunk/etherpad/src/templates/pro/admin/single-invoice.ejs47
-rw-r--r--trunk/etherpad/src/templates/pro/padlist/pro-padlist.ejs49
-rw-r--r--trunk/etherpad/src/templates/pro/pro-payment-required.ejs51
-rw-r--r--trunk/etherpad/src/templates/pro/pro_home.ejs103
-rw-r--r--trunk/etherpad/src/templates/statistics/stat_page.ejs89
-rw-r--r--trunk/etherpad/src/templates/store/csc-help.ejs23
-rw-r--r--trunk/etherpad/src/templates/store/eepnet-checkout/billing-info.ejs183
-rw-r--r--trunk/etherpad/src/templates/store/eepnet-checkout/cart.ejs119
-rw-r--r--trunk/etherpad/src/templates/store/eepnet-checkout/checkout-template.ejs38
-rw-r--r--trunk/etherpad/src/templates/store/eepnet-checkout/confirmation.ejs33
-rw-r--r--trunk/etherpad/src/templates/store/eepnet-checkout/license-info.ejs40
-rw-r--r--trunk/etherpad/src/templates/store/eepnet-checkout/purchase.ejs33
-rw-r--r--trunk/etherpad/src/templates/store/eepnet-checkout/receipt.ejs43
-rw-r--r--trunk/etherpad/src/templates/store/eepnet-checkout/summary.ejs91
-rw-r--r--trunk/etherpad/src/templates/store/eepnet-checkout/support-contract.ejs41
-rw-r--r--trunk/etherpad/src/templates/store/eepnet_download.ejs43
-rw-r--r--trunk/etherpad/src/templates/store/eepnet_eval_nextsteps.ejs40
-rw-r--r--trunk/etherpad/src/templates/store/eepnet_eval_signup.ejs125
72 files changed, 4333 insertions, 0 deletions
diff --git a/trunk/etherpad/src/templates/500_body.ejs b/trunk/etherpad/src/templates/500_body.ejs
new file mode 100644
index 0000000..34549ed
--- /dev/null
+++ b/trunk/etherpad/src/templates/500_body.ejs
@@ -0,0 +1,26 @@
+<% /* 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 Internal Server Error"); %>
+
+<% if (trace) { %>
+ <pre style="background: #fff; font-family: monospace; padding: 1em; border: 1px solid red;
+ margin: 1em; font-size: 1.25em;"><%= trace %></pre>
+<% } else { %>
+ <div id="errorpage" class="fpcontent">
+ <div class="error500">
+ <p>Oops! A server error occured. It's been logged.</p>
+ <p>Please email &lt;support@pad.spline.inf.fu-berlin.de&gt; if this persists.</p>
+ </div>
+ </div>
+<% } %>
+
diff --git a/trunk/etherpad/src/templates/beta/signup.ejs b/trunk/etherpad/src/templates/beta/signup.ejs
new file mode 100644
index 0000000..5268a29
--- /dev/null
+++ b/trunk/etherpad/src/templates/beta/signup.ejs
@@ -0,0 +1,63 @@
+<% /* 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.includeJQuery() %>
+<% helpers.includeJs("etherpad.js") %>
+<% helpers.includeCss("beta.css") %>
+
+<div class="fpcontent">
+ <div class="beta-signup">
+
+ <h1 style="border: 0;">EtherPad Professional Edition</h1>
+
+ <div class="right">
+ <br/>
+
+ <p>Want an account to keep track of all your team's pads?
+ EtherPad Professional Edition
+ gives you your own site to keep track
+ of pads and control who gets to access what.</p>
+
+
+ <form id="beta-signup-form" action="/ep/beta-account/signup"
+ method="post">
+
+ <% if (errorMsg) { %>
+ <div id="error-msg">
+ <%= errorMsg %>
+ </div>
+ <% } %>
+
+ <p>Your Email:</p>
+ <input type="text" name="email" id="email" />
+ <br/>
+ <button type="submit">Submit</button>
+
+ </form>
+
+ <p>Email <%= helpers.oemail("support") %> with questions or
+ concerns.</p>
+ </div>
+
+ <div class="left">
+
+ <img src="/static/img/account/betawarn.jpg"
+ />
+
+ </div>
+
+ <%= helpers.clearFloats() %>
+
+ </div>
+</div>
+
+
diff --git a/trunk/etherpad/src/templates/email/eepnet_license_info.ejs b/trunk/etherpad/src/templates/email/eepnet_license_info.ejs
new file mode 100644
index 0000000..85556c7
--- /dev/null
+++ b/trunk/etherpad/src/templates/email/eepnet_license_info.ejs
@@ -0,0 +1,72 @@
+<% /* 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. */ %><%
+ var parts = licenseKey.split(":");
+ var name = parts[0];
+ var org = parts[1];
+ var key = parts[2];
+
+ if ((key.length % 2) != 0) {
+ key = key + "+";
+ }
+ var keyLine1 = key.substr(0, key.length/2);
+ var keyLine2 = key.substr(key.length/2, key.length);
+%>
+Dear <%= userName %>,
+
+Thank you for downloading EtherPad Private Network Edition.
+This is an automated email containing your license information.
+
+<% if (isEvaluation) { %>
+NOTE: This is an EVALUATION license, which will expire on
+<%= expiresDate.toString() %>.
+<% } %>
+
+****************************************
+NAME:
+
+ <%= name %>
+
+****************************************
+ORGANIZATION:
+
+ <%= org %>
+
+****************************************
+LICENSE KEY:
+
+ <%= keyLine1 %>
+ <%= keyLine2 %>
+
+****************************************
+INSTRUCTIONS:
+
+ http://<%= request.host %>/ep/pne-manual
+
+****************************************
+DOWNLOAD LINK:
+
+ http://<%= request.host %><%= isEvaluation ? "/ep/store/eepnet-download" : "/ep/store/eepnet-download-nextsteps" %>
+
+<% if (isEvaluation) { %>
+--
+
+This email was sent automatically from pad.spline.inf.fu-berlin.de because you signed
+up for EtherPad PNE. If you did not sign up for
+this, then you can safely just ignore this email.
+
+<% } else { %>
+--
+
+Thanks for buying EtherPad!
+<% } %> \ No newline at end of file
diff --git a/trunk/etherpad/src/templates/email/eepnet_purchase_receipt.ejs b/trunk/etherpad/src/templates/email/eepnet_purchase_receipt.ejs
new file mode 100644
index 0000000..a83cd58
--- /dev/null
+++ b/trunk/etherpad/src/templates/email/eepnet_purchase_receipt.ejs
@@ -0,0 +1,93 @@
+<% /* 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. */ %>Dear <%= cart.ownerName %>,
+
+Thank you for your purchase of EtherPad Private Network Edition. This is your receipt. Please keep this email for your records.
+
+-- The EtherPad Staff
+
+<%
+function row(key, value) {
+%><%= key %>:
+ <%= String(value).split("\n").join("\n ") %>
+<%
+}
+
+function $(cost) {
+ return "US $"+dollars(cost);
+}
+%>
+
+License Information:
+
+<%
+row("Administrator Name", cart.ownerName)
+row("Organization Name", cart.orgName)
+row("Total Users", cart.userCount)
+%>
+
+Billing Information:
+
+<%
+var isUs = cart.billingCountry == "US";
+switch(cart.billingPurchaseType) {
+ case "creditcard":
+ row("Credit Card Number", obfuscateCC(cart.billingCCNumber));
+ row("Expiration Date", cart.billingExpirationMonth+" / 20"+cart.billingExpirationYear);
+ // falling through here intentional.
+ case "invoice":
+ row("Purchaser Name", cart.billingFirstName + " " + cart.billingLastName);
+ row("Purchaser Address", cart.billingAddressLine1 + "\n" +
+ (cart.billingAddressLine2 ? cart.billingAddressLine2 + "\n" : "") +
+ cart.billingCity + ", " +
+ (isUs?cart.billingState:cart.billingProvince) + "\n" +
+ (isUs?cart.billingZipCode:cart.billingPostalCode)+
+ (isUs?'':', '+cart.billingCountry));
+ row("Invoice Number", cart.invoiceId);
+ break;
+ case "paypal":
+ row("Paid Using", "PayPal");
+ row("Invoice Number", cart.invoiceId);
+}
+%>
+
+Summary of Charges:
+
+<%
+row("Etherpad Private Network, "+cart.numUsers+" users", $(cart.baseCost));
+if (cart.couponProductPctDiscount) {
+ row("Referral - "+cart.couponProductPctDiscount+"% savings",
+ "-"+$(cart.productReferralDiscount));
+}
+if (cart.supportCost) {
+ row("Support Contract, 1 year", $(cart.supportCost));
+ if (cart.couponSupportPctDiscount) {
+ row("Referral - "+cart.couponSupportPctDiscount+"% savings",
+ "-"+$(cart.supportReferralDiscount));
+ }
+}
+if (cart.freeUserCount) {
+ row("Referral Bonus - "+cart.freeUserCount+" free user"+(cart.freeUserCount == 1 ? '' : "s"),
+ "US$0.00");
+}
+%>-------------------------------------------------------------------------------
+<%
+var pctDiscount = cart.couponTotalPctDiscount;
+var hasSubtotal = pctDiscount > 0;
+
+if (hasSubtotal) {
+ row("Subtotal", $(cart.subTotal));
+ row("Referral - "+pctDiscount+"% savings", "-"+$(cart.totalReferralDiscount));
+}
+row("Total", $(cart.total));
+%> \ No newline at end of file
diff --git a/trunk/etherpad/src/templates/email/padinvite.ejs b/trunk/etherpad/src/templates/email/padinvite.ejs
new file mode 100644
index 0000000..0f729e3
--- /dev/null
+++ b/trunk/etherpad/src/templates/email/padinvite.ejs
@@ -0,0 +1,18 @@
+<% /* 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. */ %><%= body %>
+
+--
+Sent by <%= request.host %> at the request of an EtherPad user.
+Do not reply to this email.
+Report abuse to: support@pad.spline.inf.fu-berlin.de
diff --git a/trunk/etherpad/src/templates/email/pro_beta_invite.ejs b/trunk/etherpad/src/templates/email/pro_beta_invite.ejs
new file mode 100644
index 0000000..162b443
--- /dev/null
+++ b/trunk/etherpad/src/templates/email/pro_beta_invite.ejs
@@ -0,0 +1,23 @@
+<% /* 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. */ %>Dear <%= toAddr.split('@')[0] %>,
+
+<%= signupAgo %> you signed up for the EtherPad Beta. Now here's a link to activate your account immediately:
+
+<%= activationUrl %>
+
+Any problems or questions? Just respond to this email for help.
+
+Happy Collaborating!
+
+The EtherPad Team
diff --git a/trunk/etherpad/src/templates/email/pro_payment_failure.ejs b/trunk/etherpad/src/templates/email/pro_payment_failure.ejs
new file mode 100644
index 0000000..248a3dd
--- /dev/null
+++ b/trunk/etherpad/src/templates/email/pro_payment_failure.ejs
@@ -0,0 +1,26 @@
+<% /* 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. */ %>Dear <%= fullName %>,
+
+Thank you for using EtherPad Professional. Your monthly billing cycle has ended, but we were unsuccessful in charging your account on file.
+
+<% if (billingError && billingError.length > 0) { %>
+ The following error occurred:
+
+ <%= billingError %>
+
+<% } %>If you do not update your payment information and pay the remaining balance of <%= balance %>, your account will be suspended on <%= suspensionDate %>.
+
+You may update your payment information here: <%= billingAdminLink %>
+
+-- The EtherPad Staff
diff --git a/trunk/etherpad/src/templates/email/pro_payment_receipt.ejs b/trunk/etherpad/src/templates/email/pro_payment_receipt.ejs
new file mode 100644
index 0000000..175b06a
--- /dev/null
+++ b/trunk/etherpad/src/templates/email/pro_payment_receipt.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. */ %>Dear <%= fullName %>,
+
+Thank you for using EtherPad Professional. Your monthly billing cycle has ended, and your account has been charged; this is your receipt. Please keep this email for your records.
+
+-- The EtherPad Staff
+
+<%
+function row(key, value) {
+%><%= key %>:
+ <%= String(value).split("\n").join("\n ") %>
+<%
+}
+
+function $(cost) {
+ return "US $"+dollars(cost);
+}
+%>
+
+Billing Information:
+
+<%
+row("Name", fullName);
+row("Paid Using", paymentSummary);
+row("Expiration", expiration);
+row("Invoice Number", invoiceNumber);
+%>
+
+Summary of Charges:
+
+<%
+row("EtherPad Professional, "+numUsers+" users", $(cost));
+if (coupon) {
+ var discount = [];
+ if (coupon.pctDiscount) {
+ discount.push(coupon.pctDiscount+"% savings");
+ }
+ if (coupon.freeUsers) {
+ discount.push((coupon.freeUsers)+" free users");
+ }
+ discount = discount.join(" and ");
+ %>
+This charge reflects your referral bonus of <%= discount %>.
+<% } %> \ No newline at end of file
diff --git a/trunk/etherpad/src/templates/framed/framedfooter.ejs b/trunk/etherpad/src/templates/framed/framedfooter.ejs
new file mode 100644
index 0000000..7994e38
--- /dev/null
+++ b/trunk/etherpad/src/templates/framed/framedfooter.ejs
@@ -0,0 +1,13 @@
+<% /* 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. */ %>
diff --git a/trunk/etherpad/src/templates/framed/framedheader-pro.ejs b/trunk/etherpad/src/templates/framed/framedheader-pro.ejs
new file mode 100644
index 0000000..fac9eee
--- /dev/null
+++ b/trunk/etherpad/src/templates/framed/framedheader-pro.ejs
@@ -0,0 +1,76 @@
+<% /* 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.addBodyClass("pro-withtopbar"); %>
+
+<div id="pro-topbar">
+
+ <div id="pro-topbar-inner">
+
+ <% if (account) { %>
+ <div id="accountnav">
+ <%= toHTML(account.email) %>
+ <a href="/ep/account/sign-out">(sign out)</a>
+ </div>
+ <% } else { %>
+ <% // TODO: eventually have sign-in link here. %>
+ <% } %>
+
+ <div id="org-name">
+ <a href="/">
+ <%= proDomainOrgName %>
+ </a>
+
+ <% if (isAnEtherpadAdmin) { %>
+ <span style="color: #ff0; padding-left: 2em; font-weight: bold;">INVISIBLE ADMIN MODE</span>
+ <% } %>
+ </div>
+
+ <div style="clear: both;"><!-- --></div>
+
+ </div>
+</div>
+
+<% function renderProTopNav() {
+ var links = [
+ ['/', 'Home', 'home'],
+ ['/ep/padlist/', 'Pads', 'padlist'],
+ ['/ep/account/', 'My Account', 'account'],
+ ];
+ if (account && account.isAdmin) {
+ links.push(['/ep/admin/', 'Admin', 'admin']);
+ }
+ var ul = UL();
+ links.forEach(function(l) {
+ var c = l[2];
+ var selc = (request.path == l[0] || navSelection == c) ? " selected" : "";
+ ul.push(LI({className: 'topnav_'+c+selc},
+ A({href: request.scheme + '://'+request.host+l[0]}, l[1])));
+ });
+ return ul;
+} %>
+
+ <%= pneTrackerHtml %>
+
+<div id="pro-topnav">
+ <div id="pro-topnav-inner">
+ <%= renderProTopNav() %>
+ <%= helpers.clearFloats() %>
+ </div>
+</div>
+
+<!--
+<div id="shuttingdown">
+ <strong style="color:red">Note: EtherPad.com is shutting down March 31, 2010.</strong>
+ <a href="http://<%= fullSuperdomain %>/ep/blog/posts/google-acquires-appjet">(more info)</a>
+</div>
+-->
diff --git a/trunk/etherpad/src/templates/framed/framedheader.ejs b/trunk/etherpad/src/templates/framed/framedheader.ejs
new file mode 100644
index 0000000..d6c25cb
--- /dev/null
+++ b/trunk/etherpad/src/templates/framed/framedheader.ejs
@@ -0,0 +1,13 @@
+<% /* 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. */ %> \ No newline at end of file
diff --git a/trunk/etherpad/src/templates/framed/framedpage-pro.ejs b/trunk/etherpad/src/templates/framed/framedpage-pro.ejs
new file mode 100644
index 0000000..b3acb07
--- /dev/null
+++ b/trunk/etherpad/src/templates/framed/framedpage-pro.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.setBodyId("framedpagebody");
+ helpers.includeCss("etherpad.css");
+ helpers.includeCss("pro/framedpage-pro.css");
+ helpers.addBodyClass("pro-body");
+%>
+
+<div id="container">
+
+<% if (helpers.isHeaderVisible()) { %>
+ <%= renderHeader() %>
+<% } %>
+
+<%= renderGlobalProNotice() %>
+
+<%= getContentHtml() %>
+
+</div>
+
diff --git a/trunk/etherpad/src/templates/framed/framedpage.ejs b/trunk/etherpad/src/templates/framed/framedpage.ejs
new file mode 100644
index 0000000..b1590f8
--- /dev/null
+++ b/trunk/etherpad/src/templates/framed/framedpage.ejs
@@ -0,0 +1,37 @@
+<% /* 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.setBodyId("framedpagebody");
+ helpers.includeCss("etherpad.css");
+ helpers.includeCss("framedpage.css");
+
+ if (isProDomainRequest) {
+ helpers.includeCss("pro/pro-page.css");
+ }
+
+ if (request.path != "/") {
+ helpers.addBodyClass("nothome");
+ }
+%>
+
+<div id="container">
+
+<% if (helpers.isHeaderVisible()) { %>
+ <%= renderHeader() %>
+<% } %>
+
+<%= getContentHtml() %>
+
+<%= renderFooter() %>
+
+</div>
diff --git a/trunk/etherpad/src/templates/html.ejs b/trunk/etherpad/src/templates/html.ejs
new file mode 100644
index 0000000..056d7a7
--- /dev/null
+++ b/trunk/etherpad/src/templates/html.ejs
@@ -0,0 +1,43 @@
+<% /* 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. */ %><!DOCTYPE html PUBLIC
+ "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
+ <head>
+ <meta http-equiv="Content-type" content="text/html; charset=utf-8" />
+ <meta http-equiv="Content-Language" content="en-us" />
+ <%= helpers.robotsMeta() %>
+ <title><%= helpers.htmlTitle() %></title>
+ <base href="<%= helpers.baseHref() %>" />
+
+ <!-- CSS -->
+ <%= helpers.cssIncludes() %>
+
+ <%= helpers.headExtra() %>
+
+ </head>
+
+ <body id="<%= helpers.bodyId() %>" class="<%= helpers.bodyClasses() %>">
+
+ <%= bodyHtml %>
+
+<!-- javascript -->
+
+<%= helpers.clientVarsScript() %>
+<%= helpers.jsIncludes() %>
+<%= helpers.googleAnalytics() %>
+
+ </body>
+</html>
diff --git a/trunk/etherpad/src/templates/main/home.ejs b/trunk/etherpad/src/templates/main/home.ejs
new file mode 100644
index 0000000..495cf77
--- /dev/null
+++ b/trunk/etherpad/src/templates/main/home.ejs
@@ -0,0 +1,58 @@
+<% /* 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("SplinePad [beta]: Open-Sourced!"); %>
+
+<% helpers.includeCss("home-opensource.css"); %>
+
+<div id="home">
+ <div id="title">
+ SplinePad
+ </div>
+
+ <div id="buttons">
+ <a id="home-newpad" href="/ep/pad/newpad">
+ Create new pad
+ </a>
+ <a id="home-newsite" href="ep/pro-signup/">
+ Create team site
+ </a>
+ </div>
+
+ <div id="tos">
+ <h1>
+ <b>Terms of service and Privacy notice</b>
+ </h1>
+
+ <p>
+ <b>Privacy:</b> We guarantee that we will not intentionally hand
+ over your data to any third party.
+ </p>
+
+ <p>
+ <b>Terms:</b> By using splinepad, you certify to agree to the
+ following terms of service: We are not responsible, and cannot
+ be held liable for any loss or damages that may be caused by the
+ result of our service.
+ </p>
+
+ <p>
+ <b>In short:</b> We love the "Datenschutzgesetz" and if
+ something is wrong, we didn't do it.
+ </p>
+
+ Have fun with splinepad.
+ </div>
+
+</div>
+
+
diff --git a/trunk/etherpad/src/templates/main/pro_signup_body.ejs b/trunk/etherpad/src/templates/main/pro_signup_body.ejs
new file mode 100644
index 0000000..ff35dfc
--- /dev/null
+++ b/trunk/etherpad/src/templates/main/pro_signup_body.ejs
@@ -0,0 +1,71 @@
+<% /* 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('pro-signup.css') %>
+
+<div class="fpcontent">
+ <div class="pro-signup">
+
+ <h1>EtherPad Professional for Teams</h1>
+
+ <div id="about">
+
+ <p>Create a team site in order to keep track of pads and share
+ them privately within your team.</p>
+
+ </div>
+
+ <form id="pro-act-form"
+ method="post" action="<%= request.path %>">
+
+ <%= errorDiv() %>
+
+ <div>
+ <div class="inputdiv">
+ <h3>Your team site will live at:</h3>
+
+ <%= input("subdomain") %>.<%= request.host %>/
+ </div>
+ <div class="inputhelp">
+ This is where you and members of your team will sign
+ in.
+ </div>
+ <%= helpers.clearFloats() %>
+ </div>
+
+ <br/><br/>
+
+ <div>
+ <div class="inputdiv">
+ <h3>Administrator account</h3>
+ <%= inf("fullName", "Full Name") %>
+ <%= inf("email", "Email") %>
+ </div>
+ <div class="inputhelp">
+ <p>Instructions for choosing a password and signing in will
+ be emailed here.</p>
+ <p>Please use your <strong>*.fu-berlin.de</strong> address.</p>
+ </div>
+ <%= helpers.clearFloats() %>
+ </div>
+
+ <br/>
+
+ <p><button type="submit" id="createbutton">Create team site now</button></p>
+
+ </form>
+
+ <p style="font-size: 80%;">Existing users: <a href="/ep/pro-account/sign-in">sign in
+ here</a></p>
+ </div>
+</div>
+
diff --git a/trunk/etherpad/src/templates/misc/pad_default.ejs b/trunk/etherpad/src/templates/misc/pad_default.ejs
new file mode 100644
index 0000000..96b7e25
--- /dev/null
+++ b/trunk/etherpad/src/templates/misc/pad_default.ejs
@@ -0,0 +1,16 @@
+<% /* 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. */ %>
+Welcome to EtherPad!
+
+This pad text is synchronized as you type, so that everyone viewing this page sees the same text. This allows you to collaborate seamlessly on documents!
diff --git a/trunk/etherpad/src/templates/notice.ejs b/trunk/etherpad/src/templates/notice.ejs
new file mode 100644
index 0000000..311694f
--- /dev/null
+++ b/trunk/etherpad/src/templates/notice.ejs
@@ -0,0 +1,16 @@
+<% /* 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="notice" class="fpcontent">
+ <%= content %>
+</div>
diff --git a/trunk/etherpad/src/templates/pad/create_body.ejs b/trunk/etherpad/src/templates/pad/create_body.ejs
new file mode 100644
index 0000000..742821f
--- /dev/null
+++ b/trunk/etherpad/src/templates/pad/create_body.ejs
@@ -0,0 +1,26 @@
+<% /* 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("SplinePad [beta]: Create a new pad?"); %>
+
+<div id="createpadpage" class="fpcontent">
+ <form action="<%= request.path %>" method="post">
+
+ <p><tt id="padurl">http://<%= request.host %>/<%= toHTML(padId) %></tt></p>
+
+ <br/>
+ <p>There is no SplinePad document here. Would you like to create one?</p>
+
+ <input type="hidden" name="padId" value="<%= toHTML(padId) %>" />
+ <input type="submit" id="createPad" value="Create Pad" />
+ </form>
+</div>
diff --git a/trunk/etherpad/src/templates/pad/create_body_rafter.ejs b/trunk/etherpad/src/templates/pad/create_body_rafter.ejs
new file mode 100644
index 0000000..28252c7
--- /dev/null
+++ b/trunk/etherpad/src/templates/pad/create_body_rafter.ejs
@@ -0,0 +1,23 @@
+<% /* 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: Create a new pad?"); %>
+
+<div id="createpadpage" class="fpcontent">
+
+ <p><tt>http://<%= request.host %>/<%= toHTML(padId) %></tt></p>
+
+ <p><strong>There is no EtherPad document here.</strong></p>
+
+ <p style="color:red">Creation of new free pads is permanently disabled as part of EtherPad's acquisition by Google. <a href="http://<%= fullSuperdomain %>/ep/blog/posts/google-acquires-appjet">Read more.</a></p>
+
+</div>
diff --git a/trunk/etherpad/src/templates/pad/exporthtml.ejs b/trunk/etherpad/src/templates/pad/exporthtml.ejs
new file mode 100644
index 0000000..288a595
--- /dev/null
+++ b/trunk/etherpad/src/templates/pad/exporthtml.ejs
@@ -0,0 +1,28 @@
+<% /* 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. */ %><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<HTML>
+<HEAD>
+ <META HTTP-EQUIV="CONTENT-TYPE" CONTENT="text/html; charset=utf-8">
+ <TITLE></TITLE>
+ <STYLE TYPE="text/css">
+ <!--
+ @page { margin: 0.79in }
+ P { margin-bottom: 0.08in }
+ -->
+ </STYLE>
+</HEAD>
+<BODY LANG="en-US" DIR="LTR">
+<%= pre ? '<PRE>' : '' %><%= content %><%= pre ? '</PRE>' : '' %>
+</BODY>
+</HTML> \ No newline at end of file
diff --git a/trunk/etherpad/src/templates/pad/pad_body.ejs b/trunk/etherpad/src/templates/pad/pad_body.ejs
new file mode 100644
index 0000000..d932cd6
--- /dev/null
+++ b/trunk/etherpad/src/templates/pad/pad_body.ejs
@@ -0,0 +1,69 @@
+<% /* 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. */ %><%
+ var padIdHtml = toHTML(request.url.split("?", 1)[0]);
+%>
+
+<% helpers.setHtmlTitle("EtherPad: "+toHTML(proTitle || request.path.substr(1))); %>
+<% helpers.setBodyId("padbody") %>
+<% helpers.addBodyClass(bodyClass) %>
+<% helpers.includeCss("pad.css") %>
+<% helpers.includeJs("undo-xpopup.js") %>
+<% helpers.includeCometJs() %>
+<% helpers.includeJQuery(); %>
+<% helpers.includeJs("json2.js") %>
+<% helpers.includeJs("ace.js") %>
+<% helpers.includeJs("collab_client.js") %>
+<% helpers.includeJs("pad.js") %>
+<% helpers.suppressGA() %>
+<% helpers.setRobotsPolicy({index: false, follow: false}) %>
+
+<div id="padpage">
+
+<div id="modaloverlay">
+ <div id="modaldialog">
+ <div id="dialogtopbar">Foo.</div>
+ <table id="dialogcontenttable" cellpadding="0" cellspacing="0" border="0"><tr>
+ <td id="dialogcontent">This is a modal dialog!</td>
+ </tr></table>
+ </div>
+</div>
+<table id="padoutertable" cellpadding="0" cellspacing="0" border="0">
+<tr id="pot_toptr">
+ <td id="pot_shadlefttopseg" class="potshad">&nbsp;</td>
+ <td id="pot_top">
+ <a id="headhomelink" href="/">EtherPad</a>
+ <div id="headurl">
+ <label for="shareurl">Share this URL:</label>
+ &nbsp;<span id="shareurl"><%= padIdHtml %></span>
+ </div>
+ <a id="widthlink" href="javascript: void pad.toggleFullWidth()">M</a>
+ <a id="newpadlink" href="javascript:void pad.newPad()"
+ title="Create and open a new pad in a new window">New Pad</a>
+ </td>
+ <td id="pot_shadrighttopseg" class="potshad">&nbsp;</td>
+</tr>
+
+<tr>
+ <td id="pot_shadleft" class="potshad"><div><!-- --></div></td>
+ <td id="pot_main">
+ <div id="padcontent">
+ <%= contentHtml %>
+ </div><!-- /padcontent -->
+ </td>
+ <td id="pot_shadright" class="potshad"><div><!-- --></div></td>
+</tr>
+
+</table><!-- /padoutertable -->
+
+</div><!-- /padpage -->
diff --git a/trunk/etherpad/src/templates/pad/pad_body2.ejs b/trunk/etherpad/src/templates/pad/pad_body2.ejs
new file mode 100644
index 0000000..23b7adb
--- /dev/null
+++ b/trunk/etherpad/src/templates/pad/pad_body2.ejs
@@ -0,0 +1,472 @@
+<% /* 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, '&quot;'); //"
+%>
+
+<%
+ 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 = ['<a'];
+ pieces.push(' class="', classes.join(' '), '"');
+ pieces.push(' target="_blank"');
+ pieces.push(' href="', url, '"');
+ if (title) {
+ pieces.push(' title="', title.replace(/\"/g, "&quot;"), '"'); //"
+ }
+ pieces.push('>', label);
+ /* if (title) {
+ pieces.push('<sup>?</sup>');
+ }*/
+ pieces.push('</a>');
+ return pieces.join('');
+ }
+%>
+
+<div id="padpage">
+
+<div id="padtop">
+ <div id="topbar">
+ <% /* floated left */ %>
+ <div id="topbarleft"><!-- --></div>
+ <% /* <a href="#" id="topbarnewpad">New Pad</a> */ %>
+ <% /* floated right */ %>
+ <div id="topbarright"><!-- --></div>
+ <% /* <a href="#" id="topbarfullwidth">Toggle Width</a> */ %>
+ <% /* non-floated */ %>
+ <div id="topbarcenter">
+ <a href="/" id="topbaretherpad">EtherPad</a>
+ </div>
+<% if (isProAccountHolder) { %>
+ <a id="backtoprosite" href="/ep/padlist/">Return to pad list</a>
+ <div id="accountnav"><%= toHTML(account.email) %>
+ <a href="/ep/account/sign-out">(sign out)</a>
+ </div>
+<% } else if (isPro) { %>
+ <div id="accountnav">
+ <a href="<%= signinUrl %>">sign in</a>
+ </div>
+<% } %>
+ <div id="specialkeyarea"><!-- --></div>
+ </div>
+<!--
+ <div id="shuttingdown">
+ <strong style="color:red">Note: EtherPad.com is shutting down March 31, 2010.</strong>
+ <a href="http://<%= fullSuperdomain %>/ep/blog/posts/google-acquires-appjet">(more info)</a>
+ </div>
+ -->
+ <div id="alertbar">
+ <div id="servermsg">
+ <h3>Server Notice<span id="servermsgdate"><!-- --></span>:</h3>
+ <a id="hidetopmsg" href="javascript: void pad.hideServerMessage()">hide</a>
+ <p id="servermsgtext"><!-- --></p>
+ </div>
+ </div>
+
+ <div id="docbar">
+ <div id="docbarleft"><!-- --></div>
+ <div id="docbarpadtitle"><span><%= initialTitle %></span></div>
+<% if (isProAccountHolder) { %>
+ <div id="docbarsecurity-outer"><a href="javascript:void(0)" id="docbarsecurity">Security</a></div>
+<% } /* isProAccountHolder */ %>
+ <div id="docbaroptions-outer"><a href="javascript:void(0)" id="docbaroptions">Pad Options</a></div>
+ <div id="docbarsavedrevs-outer"><a href="javascript:void(0)" id="docbarsavedrevs">Saved revisions</a></div>
+ <div id="docbarimpexp-outer"><a href="javascript:void(0)" id="docbarimpexp">Import/Export</a></div>
+ <div id="docbarslider-outer"><a target="_blank" href="/ep/pad/view/<%= localPadId %>/latest" id="docbarslider">Time Slider</a></div>
+<% if (isProAccountHolder) { %>
+ <div id="docbarrenamelink">
+ <a href="javascript:void(0)">(rename)</a>
+ </div>
+<% } /* isProAccountHolder */ %>
+ <input type="text" id="padtitleedit"/>
+ <div id="padtitlebuttons">
+ <a id="padtitlesave" href="javascript:void(0)">Save</a>
+ <a id="padtitlecancel" href="javascript:void(0)">Cancel</a>
+ </div>
+ <div id="impexp-wrapper" class="dbpanel-wrapper">
+ <div id="impexp-panel" class="dbpanel-panel">
+ <div class="dbpanel-leftedge"><!-- --></div>
+ <div class="dbpanel-rightedge"><!-- --></div>
+ <div class="dbpanel-botleftcorner"><!-- --></div>
+ <div class="dbpanel-botrightcorner"><!-- --></div>
+ <div class="dbpanel-middle">
+ <div class="dbpanel-inner">
+ <div class="dbpanel-top"><!-- --></div>
+ </div>
+ <div class="dbpanel-bottom"><!-- --></div>
+ <div id="importexport">
+ <div id="impexp-import">
+ <div id="impexp-importlabel"><b>Import</b> from text file, HTML:</div>
+ <form id="importform" method="post" action="/ep/pad/impexp/import"
+ target="importiframe" enctype="multipart/form-data">
+ <div class="importformdiv" id="importformfilediv">
+ <input type="file" name="file" size="20" id="importfileinput" />
+ <div class="importmessage" id="importmessagefail"></div>
+ </div>
+ <div class="importmessage" id="importmessagesuccess">Successful!</div>
+ <div class="importformdiv" id="importformsubmitdiv">
+ <input type="hidden" name="padId" value="<%= encodeURIComponent(localPadId) %>" />
+ <span class="nowrap">
+ <input type="submit" name="submit" value="Import Now" disabled="disabled" id="importsubmitinput" />
+ <img alt="" id="importstatusball" src="/static/img/misc/status-ball.gif" align="top" />
+ <img alt="" id="importarrow" src="/static/img/may09/leftarrow2.gif" align="top" />
+ </span>
+ </div>
+ </form>
+ </div><!-- /impexp-import -->
+ <div id="impexp-export">
+ <div id="impexp-exportlabel"><b>Export</b> current pad as:</div>
+ <div id="exportlinks">
+ <%= 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.') %>
+ </div>
+ </div><!-- /impexp-export -->
+ <div id="impexp-divider"><!-- --></div>
+ <div id="impexp-disabled-clickcatcher"><!-- --></div>
+ <a id="impexp-close" href="javascript:void(0)">Hide</a>
+ </div><!-- /importexport -->
+ </div>
+ </div>
+ </div>
+ <div id="savedrevs-wrapper" class="dbpanel-wrapper">
+ <div id="savedrevs-panel" class="dbpanel-panel">
+ <div class="dbpanel-leftedge"><!-- --></div>
+ <div class="dbpanel-rightedge"><!-- --></div>
+ <div class="dbpanel-botleftcorner"><!-- --></div>
+ <div class="dbpanel-botrightcorner"><!-- --></div>
+ <div class="dbpanel-middle">
+ <div class="dbpanel-inner">
+ <div class="dbpanel-top"><!-- --></div>
+ </div>
+ <div class="dbpanel-bottom"><!-- --></div>
+ </div>
+ <div id="savedrevisions">
+ <a href="javascript:void(0)" id="savedrevs-savenow">
+ Save Now
+ </a>
+ <div id="savedrevs-scrolly">
+ <div id="savedrevs-scrollleft" class="disabledscrollleft"><!-- --></div>
+ <div id="savedrevs-scrollright" class="disabledscrollright"><!-- --></div>
+ <div id="savedrevs-scrollouter">
+ <div id="savedrevs-scrollinner">
+ <!-- -->
+ </div>
+ </div>
+ </div>
+ <a id="savedrevs-close" href="javascript:void(0)">Hide</a>
+ </div><!-- /savedrevs close -->
+ </div>
+ </div><!-- /savedrevs-wrapper -->
+ <div id="revision-notifier"><span class="label">Saved:</span> <span class="name">Revision 1</span></div>
+ <div id="options-wrapper" class="dbpanel-wrapper">
+ <div id="options-panel" class="dbpanel-panel">
+ <div class="dbpanel-leftedge"><!-- --></div>
+ <div class="dbpanel-rightedge"><!-- --></div>
+ <div class="dbpanel-botleftcorner"><!-- --></div>
+ <div class="dbpanel-botrightcorner"><!-- --></div>
+ <div class="dbpanel-middle">
+ <div class="dbpanel-inner">
+ <div class="dbpanel-top"><!-- --></div>
+ </div>
+ <div class="dbpanel-bottom"><!-- --></div>
+ </div>
+ <div id="padoptions">
+ <div id="options-viewhead">Shared view options:</div>
+ <input type="checkbox" id="options-colorscheck" />
+ <label for="options-colorscheck" id="options-colorslabel">Authorship colors</label>
+ <input type="checkbox" id="options-linenoscheck" />
+ <label for="options-linenoscheck" id="options-linenoslabel">Line numbers</label>
+ <div id="options-fontlabel">Display font:</div>
+ <select id="viewfontmenu"><option value="normal">Normal</option><option value="monospace">Monospaced</option></select>
+ <div id="options-viewexplain">These options affect everyone's view of the pad.</div>
+ <a id="options-close" href="javascript:void(0)">Hide</a>
+ </div>
+ </div>
+ </div><!-- /options-wrapper -->
+<% if (isProAccountHolder) { %>
+ <div id="security-wrapper" class="dbpanel-wrapper">
+ <div id="security-panel" class="dbpanel-panel">
+ <div class="dbpanel-leftedge"><!-- --></div>
+ <div class="dbpanel-rightedge"><!-- --></div>
+ <div class="dbpanel-botleftcorner"><!-- --></div>
+ <div class="dbpanel-botrightcorner"><!-- --></div>
+ <div class="dbpanel-middle">
+ <div class="dbpanel-inner">
+ <div class="dbpanel-top"><!-- --></div>
+ </div>
+ <div class="dbpanel-bottom"><!-- --></div>
+ </div>
+ <div id="padsecurity">
+ <div id="security-access">
+ <div id="security-accesshead">Pad Access:</div>
+ <input type="radio" name="padaccess" id="access-private" value="deny"/>
+ <label for="access-private" id="access-private-label"><strong>Private</strong> (Team account-holders only)</label>
+ <input type="radio" name="padaccess" id="access-public" value="allow"/>
+ <label for="access-public" id="access-public-label"><strong>Public</strong> (Allow Internet guests)</label>
+ </div>
+ <div id="security-password">
+ <div id="security-passhead">Password:</div>
+ <div id="security-passbody">
+ <div class="nopassword" id="password-nonedit">
+ <div id="password-display">None</div>
+ <a href="javascript:void(0)" id="password-setlink">Set...</a>
+ <a href="javascript:void(0)" id="password-clearlink">Clear</a>
+ </div>
+ <div id="password-inedit">
+ <a href="javascript:void(0)" id="password-savelink">Save</a>
+ <a href="javascript:void(0)" id="password-cancellink">Cancel</a>
+ <input type="text" id="security-passwordedit" maxlength="31" />
+ </div>
+ </div>
+ </div>
+ <a id="security-close" href="javascript:void(0)">Hide</a>
+ </div>
+ </div>
+ </div><!-- /security-wrapper -->
+<% } /* isProAccountHolder */ %>
+ </div><!-- /docbar -->
+</div>
+
+<div id="padmain">
+ <div id="padsidebar">
+ <div id="padusers">
+ <div id="connectionbox" class="cboxconnecting">
+ <div id="connectionboxinner">
+ <div class="connecting">
+ Connecting...
+ </div>
+ <div class="reconnecting">
+ Reestablishing connection...
+ </div>
+ <div class="disconnected">
+ <h2 class="h2_disconnect">Disconnected.</h2>
+ <h2 class="h2_userdup">Opened in another window.</h2>
+ <h2 class="h2_unauth">No Authorization.</h2>
+ <div id="disconnected_looping">
+ <p><b>We're having trouble talking to the EtherPad synchronization server.</b>
+ You may be connecting through an incompatible firewall or proxy server.</p>
+ </div>
+ <div id="disconnected_initsocketfail">
+ <p><b>We were unable to connect to the EtherPad synchronization server.</b>
+ This may be due to an incompatibility with your web
+ browser or internet connection.</p>
+ </div>
+ <div id="disconnected_userdup">
+ <p><b>You seem to have opened this pad in another browser window.</b>
+ If you'd like to use this window instead, you can reconnect.</p>
+ </div>
+ <div id="disconnected_unknown">
+ <p><b>Lost connection with the EtherPad synchronization
+ server.</b> This may be due to a loss of network connectivity.</p>
+ </div>
+ <div id="disconnected_slowcommit">
+ <p><b>Server not responding.</b> This may be due to network connectivity issues or high load on the server.</p>
+ </div>
+ <div id="disconnected_unauth">
+ <p>Your browser's credentials or permissions have changed while viewing this pad. Try reconnecting.</p>
+ </div>
+ <div id="reconnect_advise">
+ <p>If this continues to happen, please <a target="_blank" href="/ep/support">let us know</a>
+ (opens in new window).</p>
+ </div>
+ <div id="reconnect_form">
+ <button id="forcereconnect">Reconnect Now</button>
+ </div>
+ </div>
+ </div>
+ </div>
+
+ <div id="connectionstatus">
+ <!-- -->
+ </div>
+
+ <div id="myuser">
+ <div id="mycolorpicker">
+ <div class="pickerswatchouter n1"><div class="pickerswatch"><!-- --></div></div>
+ <div class="pickerswatchouter n2"><div class="pickerswatch"><!-- --></div></div>
+ <div class="pickerswatchouter n3"><div class="pickerswatch"><!-- --></div></div>
+ <div class="pickerswatchouter n4"><div class="pickerswatch"><!-- --></div></div>
+ <div class="pickerswatchouter n5"><div class="pickerswatch"><!-- --></div></div>
+ <div class="pickerswatchouter n6"><div class="pickerswatch"><!-- --></div></div>
+ <div class="pickerswatchouter n7"><div class="pickerswatch"><!-- --></div></div>
+ <div class="pickerswatchouter n8"><div class="pickerswatch"><!-- --></div></div>
+ <div id="mycolorpickersave">Save</div>
+ <div id="mycolorpickercancel">Cancel</div>
+ </div>
+ <div id="myswatchbox"><div id="myswatch"><!-- --></div></div>
+ <div id="myusernameform"><input type="text" id="myusernameedit" disabled="disabled" /></div>
+ <div id="mystatusform"><input type="text" id="mystatusedit" disabled="disabled" /></div>
+ </div>
+ <div id="otherusers">
+ <div id="guestprompts"><!-- --></div>
+ <table id="otheruserstable" cellspacing="0" cellpadding="0" border="0">
+ <tr><td></td></tr>
+ </table>
+ <div id="nootherusers"><a href="javascript:void(0)">Invite</a> other users and they will show up here.</div>
+ </div>
+ <div id="userlistbuttonarea">
+ <a href="javascript:void(0)" id="sharebutton">Share</a>
+ </div>
+ </div> <!-- /padusers -->
+
+ <div id="hdraggie"><!-- --></div>
+
+ <div id="padchat">
+<!-- <div id="chattop"><a href="#">View chat logs...</a></div> -->
+ <div id="chatlines">
+ <a href="javascript:void(0)" id="chatloadmore">Load more history...</a>
+ <div id="chatloadingmore">Loading history...</div>
+ </div>
+ <div id="chatbottom">
+ <div id="chatprompt">Chat:</div>
+ <div id="chatentryform"><input type="text" id="chatentrybox"/></div>
+ </div>
+ </div>
+ </div> <!-- /padsidebar -->
+
+ <div id="padeditor">
+ <div id="editbar" class="disabledtoolbar">
+ <% /* floated left */ %>
+ <div id="editbarleft"><!-- --></div>
+ <% /* floated right */ %>
+ <div id="editbarright"><!-- --></div>
+ <% /* non-floated */ %>
+ <div id="editbarinner">
+ <a href="javascript:void (window.pad&&pad.editbarClick('bold'));" class="editbarbutton bold" title="Bold (ctrl-B)">&nbsp;</a>
+ <a href="javascript:void (window.pad&&pad.editbarClick('italic'));" class="editbarbutton italic" title="Italics (ctrl-I)">&nbsp;</a>
+ <a href="javascript:void (window.pad&&pad.editbarClick('underline'));" class="editbarbutton underline" title="Underline (ctrl-U)">&nbsp;</a>
+ <a href="javascript:void (window.pad&&pad.editbarClick('strikethrough'));" class="editbarbutton strikethrough" title="Strikethrough">&nbsp;</a>
+ <a href="javascript:void (window.pad&&pad.editbarClick('h1'));" class="editbarbutton h1" title="H1">&nbsp;</a>
+ <a href="javascript:void (window.pad&&pad.editbarClick('h2'));" class="editbarbutton h2" title="H2">&nbsp;</a>
+ <a href="javascript:void (window.pad&&pad.editbarClick('h3'));" class="editbarbutton h3" title="H3">&nbsp;</a>
+ <a href="javascript:void (window.pad&&pad.editbarClick('h4'));" class="editbarbutton h4" title="H4">&nbsp;</a>
+ <a href="javascript:void (window.pad&&pad.editbarClick('h5'));" class="editbarbutton h5" title="H5">&nbsp;</a>
+ <a href="javascript:void (window.pad&&pad.editbarClick('h6'));" class="editbarbutton h6" title="H6">&nbsp;</a>
+ <a href="javascript:void (window.pad&&pad.editbarClick('clearauthorship'));" class="editbarbutton clearauthorship" title="Clear Authorship Colors">&nbsp;</a>
+ <a href="javascript:void (window.pad&&pad.editbarClick('undo'));" class="editbarbutton undo" title="Undo (ctrl-Z)">&nbsp;</a>
+ <a href="javascript:void (window.pad&&pad.editbarClick('redo'));" class="editbarbutton redo" title="Redo (ctrl-Y)">&nbsp;</a>
+ <a href="javascript:void (window.pad&&pad.editbarClick('insertunorderedlist'));" class="editbarbutton insertunorderedlist" title="Toggle Bullet List">&nbsp;</a>
+ <a href="javascript:void (window.pad&&pad.editbarClick('indent'));" class="editbarbutton indent" title="Indent List">&nbsp;</a>
+ <a href="javascript:void (window.pad&&pad.editbarClick('outdent'));" class="editbarbutton outdent" title="Unindent List">&nbsp;</a>
+ <div id="syncstatussyncing" title="Syncing..."><!-- --></div>
+ <div id="syncstatusdone" title="Synced."><!-- --></div>
+ <a href="javascript:void (window.pad&&pad.editbarClick('save'));" class="editbarbutton save" title="Save Revision">&nbsp;</a>
+ </div>
+ </div>
+ <div id="editorcontainerbox">
+ <div id="editorloadingbox">Loading...</div>
+ <div id="editorcontainer"><!-- --></div>
+ </div>
+ </div><!-- /padeditor -->
+
+ <div id="bottomarea">
+ <div id="viewbarcontents">
+ <div id="viewzoomtitle">Zoom:</div>
+ <select id="viewzoommenu"><option value="z85">85%</option><option value="z100">100%</option><option value="z115">115%</option><option value="z150">150%</option><option value="z200">200%</option><option value="z300">300%</option></select>
+ </div>
+
+ <div id="widthprefcheck"
+ class="<%= (prefs.isFullWidth?'widthprefchecked':'widthprefunchecked') %>"
+ ><!-- --></div>
+ <div id="sidebarcheck"
+ class="<%= (prefs.hideSidebar?'sidebarunchecked':'sidebarchecked') %>"
+ ><!-- --></div>
+ </div>
+
+</div><!-- /padmain -->
+
+</div><!-- /padpage -->
+
+<div id="modaloverlay"><div id="modaloverlay-inner"><!-- --></div></div>
+<div id="mainmodals">
+ <div id="sharebox">
+ <div id="sharebox-inner">
+ <a href="javascript:void(0)" id="sharebox-hide"><!-- --></a>
+ <div id="sharebox-stripe" class="sharebox-stripe-private">
+ <div class="public">
+ <strong>Public Pad:</strong> This pad is accessible to anyone who
+ visits its URL. To make it private, <a href="javascript:void(0)" class="setsecurity">change security settings</a>.
+ </div>
+ <div class="private">
+ <strong>Private Pad:</strong> This pad is only accessible to team account-holders. To allow anyone to access it, <a href="javascript:void(0)" class="setsecurity">change security settings</a>.
+ </div>
+ </div>
+ <div id="sharebox-forms">
+ <div id="sharebox-pastelink">Paste link over email or IM:</div>
+ <div id="sharebox-orsend">or send an email invitation...</div>
+ <a href="javascript:void(0)" id="sharebox-send"><!-- --></a>
+ <input id="sharebox-url" type="text" readonly="readonly" value="<%=padUrlAttrValue%>"/>
+ <input type="text" id="sharebox-to" class="modalfield" />
+ <input type="text" id="sharebox-subject" class="modalfield" />
+ <textarea id="sharebox-message" rows="6" cols="40" class="modalfield"></textarea>
+ <div id="sharebox-fieldname-to">To</div>
+ <div id="sharebox-fieldname-subject">Subject</div>
+ <div id="sharebox-fieldname-message">Message</div>
+ <div id="sharebox-dislink"><!-- --></div>
+ </div>
+ <div id="sharebox-shownwhenexpanded">
+ <div id="sharebox-response"><!-- --></div>
+ </div>
+ </div>
+ </div>
+</div>
+
+<% if (request.params.djs) { %>
+ <div id="djs"><!-- --></div>
+<% } %>
+
+<form id="reconnectform"
+ method="post"
+ action="/ep/pad/reconnect"
+ accept-charset="UTF-8"
+ style="display: none;">
+ <input type="hidden" class="padId" name="padId" />
+ <input type="hidden" class="diagnosticInfo"
+ name="diagnosticInfo" />
+ <input type="hidden" class="missedChanges" name="missedChanges" />
+</form>
diff --git a/trunk/etherpad/src/templates/pad/pad_content.ejs b/trunk/etherpad/src/templates/pad/pad_content.ejs
new file mode 100644
index 0000000..4e25c7f
--- /dev/null
+++ b/trunk/etherpad/src/templates/pad/pad_content.ejs
@@ -0,0 +1,297 @@
+<% /* 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 checkboxPref(name, label) {
+ var r = ['<div class="prefcheckbox" id="checkpref', name, '">'];
+ r.push('<table cellspacing="0" cellpadding="0" border="0">');
+ r.push('<tr>');
+ r.push('<td class="checkboxcell" valign="middle"><input type="checkbox" /></td>');
+ r.push('<td class="labelcell" valign="middle">', label, '</td>');
+ r.push('</tr>');
+ r.push('</table>');
+ r.push('</div>');
+ return r.join('');
+ }
+
+ function exportOption(type, label, requiresOffice, url, title) {
+ url = url || '/ep/pad/export/'+padId+'/latest?format='+type;
+ var classes = [ "exportlink", "exporthref"+type ];
+ if (requiresOffice && !hasOffice) {
+ classes.push("disabledexport");
+ } else if (requiresOffice) {
+ classes.push("requiresoffice");
+ }
+ var aStartArr = ['<a '];
+ if (classes.length > 0) {
+ aStartArr.push(' class="'+classes.join(' ')+'"');
+ }
+ aStartArr.push(' target="_blank" href="', url, '">');
+ var aStart = aStartArr.join('');
+ var r = ['<div class="exportlink" id="export', type, '"'];
+ if (title) {
+ r.push(' title="'+title+'"');
+ }
+ r.push('>');
+ r.push('<table cellspacing="0" cellpadding="0" border="0">');
+ r.push('<tr>');
+ r.push('<td class="exportpic" valign="middle">');
+ r.push(aStart, '<img alt="" src="/static/img/may09/'+type+'.gif" />', '</a>');
+ r.push('</td>');
+ r.push('<td class="labelcell" valign="middle">');
+ r.push(aStart, label, '</a>');
+ if (title) {
+ r.push('<sup>?</sup>')
+ }
+ r.push('</td>');
+ if (requiresOffice) {
+ r.push('<td class="exportspinner" ');
+ r.push('id="exportspinner', type, '"');
+ r.push(' valign="middle"><img alt="" src="/static/img/misc/status-ball.gif" /></td>');
+ }
+ r.push('</tr>');
+ r.push('</table>');
+ r.push('</div>');
+ return r.join('');
+ }
+%>
+
+<div id="servermsg" class="topmsg hidden">
+ <p><b>Server Notice (<span id="servermsgdate"></span>)</b></p>
+ <br/>
+ <a id="hidetopmsg" href="javascript: void pad.hideTopMsg('server')">hide</a>
+ <p id="servermsgtext"></p>
+</div>
+
+<div id="bigtoperror_wrap" class="topmsg hidden">
+
+ <div class="bigtoperror" id="disconnected_looping">
+ <p><b>We're having trouble establishing a connection with an
+ EtherPad synchronization server.</b> You may be connecting through an incompatible firewall or
+ proxy server.</p>
+ </div>
+
+ <div class="bigtoperror" id="disconnected_userdup">
+ <p><b>You seem to have opened this pad in another browser
+ window.</b> If you'd like to use this window
+ instead, you can reconnect.</p>
+ </div>
+
+ <div class="bigtoperror" id="disconnected_slowcommit">
+ <p><b>We're having difficulties talking to the EtherPad
+ synchronization server.</b> This may be due to network connectivity issues or high load on the server.</p>
+ </div>
+
+ <div class="bigtoperror" id="disconnected_initsocketfail">
+ <p><b>We were unable to establish the initial connection with
+ the EtherPad synchronization server.</b> This may be due to an incompatibility with your web
+ browser or internet connection.</p>
+ </div>
+
+ <div class="bigtoperror" id="disconnected_unknown">
+ <p><b>Lost connection with the EtherPad synchronization
+ server.</b> This may be due to a loss of network connectivity.</p>
+ </div>
+
+ <div class="bigtoperror" id="reconnect_advise">
+ <p>If this continues to happen, please <a target="_blank" href="/ep/support">let us know</a>
+ (opens in new window).</p>
+ </div>
+
+ <div id="reconnect_form">
+ <p><button class="forcereconnect">Reconnect
+ Now</button></p>
+ </div>
+
+</div>
+
+<div id="padtablediv">
+<table id="padtable"
+ border="0" cellspacing="0" cellpadding="0">
+ <tr>
+ <td id="topbar">
+ <div id="connectionstatus"
+ class="connecting">Connecting...</div>
+ <div id="topbarmsg">&nbsp;</div>
+ <a class="showhide" id="showsidebar" href="javascript:void pad.showSideBar();">
+ &laquo; show side bar
+ </a>
+ </td>
+ <td id="sidebartop">
+ <a class="showhide" id="hidesidebar" href="javascript:void pad.hideSideBar();">
+ hide &raquo;
+ </a>
+ </td>
+ </tr>
+
+ <tr id="sizedcontent">
+ <td id="editorcell" class="editorcell_loading" width="100%" valign="top">
+ <div id="editorcellinner">
+ <div id="loadingbox">
+ Loading...
+ </div>
+ <div id="toptoolbar" class="disabledtoolbar">
+ <a href="javascript:void pad.toolbarClick('bold');" class="toptoolbarbutton bold" title="Bold (ctrl-B)">&nbsp;</a>
+ <a href="javascript:void pad.toolbarClick('italic');" class="toptoolbarbutton italic" title="Italics (ctrl-I)">&nbsp;</a>
+ <a href="javascript:void pad.toolbarClick('underline');" class="toptoolbarbutton underline" title="Underline (ctrl-U)">&nbsp;</a>
+ <a href="javascript:void pad.toolbarClick('undo');" class="toptoolbarbutton undo" title="Undo (ctrl-Z)">&nbsp;</a>
+ <a href="javascript:void pad.toolbarClick('redo');" class="toptoolbarbutton redo" title="Redo (ctrl-Y)">&nbsp;</a>
+ <form id="padtitle" action="/"><input type="text" id="padtitleedit"/><span class="padtitlepad">Pad:</span> <span id="padtitletitle">&nbsp;</span> &nbsp;<span class="editlink">(<a href="javascript:void pad.editTitle();">rename</a>)</span><span class="oklink"><a href="javascript:void pad.submitTitle(true);">OK</a></span></form>
+ <a href="javascript:void pad.passwordClick();" id="passwordlock" title="" class="passwordhidden">&nbsp;</a>
+ </div>
+ <div id="editorcontainer"><!-- --></div>
+ <div id="bottoolbar" class="disabledtoolbar">
+ <div id="viewzoom">View Zoom: <select id="viewzoommenu"><option value="z85">85%</option><option value="z100">100%</option><option value="z115">115%</option><option value="z150">150%</option><option value="z200">200%</option><option value="z300">300%</option></select></div>
+ <div id="viewfont">View Font: <select id="viewfontmenu"><option value="normal">Normal</option><option value="code">Code</option></select></div>
+ </div>
+ </div>
+ </td>
+ <td id="sidebarcell" valign="top">
+ <div id="sidebar" class="sidebar_loading">
+ <div id="headuserlistwrap" class="sideheadwrap sh_uncollapsed"><p class="sidehead">Connected Users</p></div>
+ <div id="userlistwrap" class="sidebox">
+ <div id="userlist"><!-- setbyjs --></div>
+ <div id="invitemore">
+ <a class="small_link" id="invitemorelink" href="javascript:void pad.invitemoreShow();">invite more people...</a>
+ <div id="inviteinstructions" style="display:none;">
+ <p>To invite someone to this pad, just copy and paste them the URL to this page.</p>
+ <p id="emailinviteleadin">Or we can send them an invitation for you:</p>
+ <p>
+ Email:&nbsp;<input id="invite_email" type="text" name="email" value="" />
+ <input type="submit" id="invite_email_submit" value="Send" />
+ </p>
+ <p id="invite_email_status"><!-- --></p>
+ <p id="hideinstructions"><a class="small_link" href="javascript:void pad.invitemoreHide();">hide</a></p>
+ </div>
+ </div>
+ </div>
+ <div id="headchatbox" class="sideheadwrap sh_collapsed"><p id="chatheadname" class="sidehead">Chat</p></div>
+ <div class="sidebox hidden" id="chatbox">
+ <div id="chatmessages"><!-- --></div>
+ <div>
+ <table id="chatsaytable" border="0" cellspacing="0" cellpadding="0">
+ <tr>
+ <td width="5" valign="middle">Say:</td>
+ <td><input type="text" id="chatinput" /></td>
+ </tr>
+ </table>
+ </div>
+ </div>
+ <div id="headimportexport" class="sideheadwrap sh_collapsed"><p class="sidehead">Import/Export</p></div>
+ <div class="sidebox hidden" id="importexport">
+ <div id="exportsection">
+ <p id="headexport"><strong>Download</strong> as:</p>
+ <table>
+ <tr>
+ <td class="firsttd"><%= exportOption('html', 'HTML', false) %></td>
+ </tr>
+ <tr>
+ <td class="firsttd"><%= exportOption('txt', 'Plain text', false) %></td>
+ </tr>
+ <tr>
+ <td class="firsttd"><%= exportOption('link', 'Bookmark file', false,
+ '/ep/pad/linkfile?padId='+padId,
+ 'This will save a file that, when opened, takes you to this pad.') %></td>
+ </tr>
+ </table>
+ <div id="exportmessage"></div>
+ </div>
+ <div id="importsection">
+ <p id="headimport"><strong>Import</strong> text from file:</p>
+ <form id="importform" method="post" action="/ep/pad/impexp/import" target="importiframe" enctype="multipart/form-data">
+ <div class="importformdiv" id="importformfilediv">
+ <input type="file" name="file" size="20" id="importfileinput" />
+ <div class="importmessage" id="importmessagefail"></div>
+ </div>
+ <div class="importmessage" id="importmessagesuccess"></div>
+ <div class="importformdiv" id="importformsubmitdiv">
+ <input type="hidden" name="padId" value="<%= encodeURIComponent(padId) %>" />
+ <span class="nowrap">
+ <input type="submit" name="submit" value="Import Now" disabled="disabled" id="importsubmitinput" />
+ <img alt="" id="importstatusball" src="/static/img/misc/status-ball.gif" align="bottom" />
+ <img alt="" id="importarrow" src="/static/img/may09/leftarrow.gif" align="bottom" />
+ </span>
+ </div>
+ </form>
+ </div>
+ </div>
+ <div id="headrevisions" class="sideheadwrap sh_collapsed"><p class="sidehead">Saved Revisions</p></div>
+ <div class="sidebox hidden" id="revisions">
+ <div id="nosaveprivs">
+ Sorry, you have exceeded the maximum allowable
+ number of saved revisions.
+ </div>
+ <input id="savenow" type="submit" value="Save Now" />
+ <div id="revisionlist">
+ </div>
+ </div>
+ <div id="headprefs" class="sideheadwrap sh_collapsed"><p class="sidehead">Options</p></div>
+ <div class="sidebox hidden" id="prefs">
+ <%= checkboxPref("showcolors", "Highlight who typed what.") %>
+ <%= checkboxPref("wrap", "Wrap long lines.") %>
+ <%= checkboxPref("linenums", "Show line numbers.") %>
+ <%= checkboxPref("fullwidth", "Use full window width.") %>
+ <%= checkboxPref("jshighlight", "Highlight JavaScript syntax.") %>
+ </div>
+ <div id="headfeedback" class="sideheadwrap sh_collapsed"><p class="sidehead">Feedback</p></div>
+ <div class="sidebox hidden sidebox_last" id="feedback">
+ <div id="feedbackbox">
+ <p style="text-align: center;">Tell us what you
+ think of EtherPad!<br/>(Include your email if you want a response)</p>
+ <div id="formbox">
+ <textarea rows="5" cols="10" id="feedbackarea" name="feedbackarea"></textarea>
+ <input id="feedbacksubmit" type="submit"
+ value="Send to EtherPad Team" />
+ </div>
+ </div>
+ <div id="feedbackresult">
+ <p>Thanks for the feedback! Keep it coming.</p>
+ <p>You can also send feedback by email to
+ <span id="feedbackemail"
+ style="white-space: nowrap;">feedback@e***rp**d.com</span> to receive a personal
+ response.</p>
+ </div>
+ </div>
+ </div>
+ </td>
+ </tr>
+</table>
+</div><!-- #padtablediv -->
+
+<div style="clear: both;"><!-- --></div>
+
+<% if (request.params.djs) { %>
+ <div id="djs">&nbsp;</div>
+<% } %>
+
+<div id="appjetfooter">
+ Powered by <a target="_blank" href="/ep/about/appjet">AppJet</a>
+ <img id="plane" src="/static/img/tinyplane.gif" alt="AppJet" />
+</div><!-- /appjetfooter -->
+
+<form id="reconnect"
+ method="post"
+ action="/ep/pad/reconnect"
+ accept-charset="UTF-8"
+ style="display: none;">
+ <input type="hidden" id="padId" name="padId" />
+ <input type="hidden" id="diagnosticInfo"
+ name="diagnosticInfo" />
+ <input type="hidden" id="missedChanges" name="missedChanges" />
+</form>
+
+<form id="newpad"
+ name="newpad"
+ action="/ep/pad/newpad"
+ target="_blank"
+ style="display: none;">
+</form>
diff --git a/trunk/etherpad/src/templates/pad/pad_download_link.ejs b/trunk/etherpad/src/templates/pad/pad_download_link.ejs
new file mode 100644
index 0000000..e05d7d0
--- /dev/null
+++ b/trunk/etherpad/src/templates/pad/pad_download_link.ejs
@@ -0,0 +1,27 @@
+<% /* 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. */ %><%
+
+var host = request.host;
+helpers.addToHead('<meta http-equiv="refresh" content="0;url=http://'+host+'/'+padId+'" />');
+
+%>
+
+<div id="refreshpage">
+ <h1>Etherpad</h1>
+
+ <p>This pad document, <a href="http://<%= host %>/<%= padId %>"><%= padId %></a>, is stored on <a href="http://<%= host %>"><%= host %></a>. Please click the link below to access this pad.</p>
+
+ <a style="size: 200%; text-align: center;" href="http://<%= host %>/<%= padId %>">http://<%= host %>/<%= padId %></a>
+
+</div> \ No newline at end of file
diff --git a/trunk/etherpad/src/templates/pad/pad_iphone_body.ejs b/trunk/etherpad/src/templates/pad/pad_iphone_body.ejs
new file mode 100644
index 0000000..96279ce
--- /dev/null
+++ b/trunk/etherpad/src/templates/pad/pad_iphone_body.ejs
@@ -0,0 +1,29 @@
+<% /* 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 style="font-size: 4em; font-family: sans-serif; text-align: center;">
+
+ <p>EtherPad is not yet fully-functional on the iPhone.</p>
+
+ <a style="display: block; padding: 1em; border: 3px solid #333; background: #ddd; margin: 1em; -webkit-border-radius: 1em;"
+ href="/ep/pad/view/<%= padId %>/latest">
+ View Read-Only
+ </a>
+
+ <a style="display: block; padding: 1em; border: 3px solid #333; background: #ddd; margin: 1em; -webkit-border-radius: 1em;"
+ href="/<%= padId %>?skipIphoneCheck=1">
+ Proceed to Editor<br/>
+ <span style="font-size: .6em;">(may not be fully-functional)</span>
+ </a>
+
+</div>
diff --git a/trunk/etherpad/src/templates/pad/padfull_body.ejs b/trunk/etherpad/src/templates/pad/padfull_body.ejs
new file mode 100644
index 0000000..5f85b4e
--- /dev/null
+++ b/trunk/etherpad/src/templates/pad/padfull_body.ejs
@@ -0,0 +1,32 @@
+<% /* 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="padfullpage" class="fpcontent">
+
+<h1>Pad is Full!</h1>
+
+<div id="msg">
+
+<div id="padurlwrap">
+<p><tt id="padurl">http://<%= request.host %>/<%= padId %></tt></p>
+</div>
+
+<p>Sorry, only <%= maxUsersPerPad %> people are allowed to edit a
+single pad at the same time in the free version of EtherPad.</p>
+
+<p>Please see our <a href="http://pad.spline.inf.fu-berlin.de/ep/about/pricing">pricing plans</a> for
+information about having more than <%= maxUsersPerPad %>
+collaborators.</p>
+
+</div>
+
+</div>
diff --git a/trunk/etherpad/src/templates/pad/padslider_body.ejs b/trunk/etherpad/src/templates/pad/padslider_body.ejs
new file mode 100644
index 0000000..51a9e84
--- /dev/null
+++ b/trunk/etherpad/src/templates/pad/padslider_body.ejs
@@ -0,0 +1,41 @@
+<% /* 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(toHTML("Time Slider"));
+ helpers.setBodyId("padsliderbody");
+ helpers.includeCss("etherpad.css");
+ //helpers.includeCss("jqueryui/theme/ui.all.css");
+ helpers.setRobotsPolicy({index: false, follow: false});
+ helpers.includeJQuery();
+ //helpers.includeJs("jquery-ui-slider-1.5.3.js");
+ helpers.includeJs("json2.js");
+ helpers.includeJs("timeslider.js");
+
+ function dfmt(t) {
+ var d = new Date(t);
+ return d.toString();
+ }
+%>
+
+<!-- <div id="sliderui"></div> -->
+<p>Powered by <a href="/">EtherPad</a>.</p><br />
+<div id="controls">
+<a href="<%= request.url %>#" class="prev">prev</a> /
+<a href="<%= request.url %>#" class="next">next</a> &nbsp; &nbsp;
+<a href="<%= request.url %>#" class="play">play</a> /
+<a href="<%= request.url %>#" class="stop">stop</a> &nbsp; &nbsp;
+seek to #<input class="entry" type="text" size="6"/>
+<div id="currevdisplay"><span class="min">0</span> --- <span class="cur">0</span> --- <span class="max">0</span></div>
+</div>
+
+<div id="stuff">Loading...</div>
diff --git a/trunk/etherpad/src/templates/pad/padview_body.ejs b/trunk/etherpad/src/templates/pad/padview_body.ejs
new file mode 100644
index 0000000..e18ff12
--- /dev/null
+++ b/trunk/etherpad/src/templates/pad/padview_body.ejs
@@ -0,0 +1,141 @@
+<% /* 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.addBodyClass(bodyClass);
+ helpers.setHtmlTitle(toHTML(padId + " / " + rlabel));
+ helpers.setBodyId("padviewbody");
+ helpers.includeCss("broadcast.css");
+ helpers.setRobotsPolicy({index: false, follow: false})
+ helpers.includeJQuery();
+ helpers.includeCometJs();
+ helpers.includeJs("json2.js");
+ helpers.includeJs("pad_utils.js");
+ helpers.includeJs("broadcast_slider.js");
+ helpers.includeJs("broadcast_revisions.js");
+ helpers.includeJs("easysync2_client.js");
+ helpers.includeJs("domline_client.js");
+ helpers.includeJs("linestylefilter_client.js");
+ helpers.includeJs("cssmanager_client.js");
+ helpers.includeJs("broadcast.js");
+ helpers.addToHead('\n<style type="text/css" title="dynamicsyntax"></style>\n');
+
+ function dfmt(t) {
+ var d = new Date(t);
+ return d.toString();
+ }
+
+ function exportOption(type, label, requiresOffice, url, title) {
+ url = url || '/ep/pad/export/'+padId+'/'+revisionId+'?format='+type;
+ var aStart =
+ ['<a',
+ (requiresOffice && ! hasOffice ? ' class="disabledexport"' : ' href="'+url+'"'),
+ '>'].join('');
+ var r = ['<div class="exportlink" id="export', type, '"'];
+ if (title) {
+ r.push(' title="'+title+'"');
+ }
+ r.push('>');
+ r.push('<table cellspacing="0" cellpadding="0" border="0">');
+ r.push('<tr>');
+ r.push('<td class="exportpic" valign="middle">');
+ r.push(aStart, '<img src="/static/img/may09/'+type+'.gif" />', '</a>');
+ r.push('<td class="labelcell" valign="middle">');
+ r.push(aStart, label, '</a>');
+ if (title) {
+ r.push('<sup>?</sup>')
+ }
+ r.push('</td>');
+ r.push('</tr>');
+ r.push('</table>');
+ r.push('</div>');
+ return r.join('');
+ }
+%>
+
+<div id="padpage">
+<div id="topbar" style="margin: 7px; margin-top: 0px;">
+ <div id="topbarleft"><!-- --></div>
+ <div id="topbarright"><!-- --></div>
+ <div id="topbarcenter">
+ <a href="/" id="topbaretherpad">EtherPad</a>
+ </div>
+<% if (isProAccountHolder) { %>
+ <div id="accountnav"><%= toHTML(account.email) %>
+ <a href="/ep/account/sign-out">(sign out)</a>
+ </div>
+<% } else if (isPro) { %>
+ <div id="accountnav">
+ <a href="<%= signinUrl %>">sign in</a>
+ </div>
+<% } %>
+</div>
+
+<div id="timeslider-wrapper">
+<div id="error" style="display: none">It looks like you're having connection troubles. <a href="/ep/pad/view/<%= padId %>/latest">Reconnect now</a>.</div>
+<div id="timeslider" unselectable="on" style="display: none">
+ <div id="timeslider-left"></div>
+ <div id="timeslider-right"></div>
+ <div id="timer"><%= dateFormat %></div>
+ <div id="timeslider-slider">
+ <div id="ui-slider-handle">
+
+ </div>
+ <div id="ui-slider-bar">
+
+ </div>
+ </div>
+ <div id="playpause_button">
+ <div id="playpause_button_icon" class=""></div>
+ </div>
+ <div id="steppers">
+ <div class="stepper" id="leftstar"></div>
+ <div class="stepper" id="rightstar"></div>
+ <div class="stepper" id="leftstep"></div>
+ <div class="stepper" id="rightstep"></div>
+ </div>
+</div>
+</div>
+<div id="rightbars">
+<div id="rightbar"><a id="viewlatest" href="/ep/pad/view/<%= padId %>/latest">
+<% if (revisionId != "latest") { %>View latest content<% } else { %>Viewing latest content<% } %></a><br>
+<a class="tlink" href="/ep/pad/view/<%= padId %>/<%= revisionId %>" thref="/ep/pad/view/<%= padId %>/rev.%revision%">Link to this version</a>
+<% if (readOnly === false) { %><br><a class="tlink" href="/ep/pad/view/<%= roPadId %>/<%= revisionId %>" thref="/ep/pad/view/<%= roPadId %>/rev.%revision%">Link to read-only page</a><br><a href="/<%= padId %>">Edit this pad</a><% } %>
+<h2>Download as</h2>
+<img src="/static/img/may09/html.gif"><a class="tlink" href="/ep/pad/export/<%= padId %>/<%= revisionId %>?format=html" thref="/ep/pad/export/<%= padId %>/rev.%revision%?format=html">HTML</a><br>
+<img src="/static/img/may09/txt.gif" ><a class="tlink" href="/ep/pad/export/<%= padId %>/<%= revisionId %>?format=html" thref="/ep/pad/export/<%= padId %>/rev.%revision%?format=txt" >Plain text</a><br>
+
+
+</div>
+<div id="legend">
+<h2>Authors</h2>
+<table id="authorstable" border="0" cellspacing="0" cellpadding="0">
+
+</table>
+</div>
+
+</div>
+<div id="padmain"
+ <% if (request.userAgent.isIPhone()) { %> style="font-size: 3em;" <% } %>
+>
+<div id="titlebar"><h1><%= padTitle %></h1><div id="revision"><span id="revision_label"><%= rlabel %></span><br><span id="revision_date">
+Saved
+<%= ["Jan", "Feb", "March", "April", "May", "June", "July", "Aug", "Sept", "Oct", "Nov", "Dec"][new Date(savedWhen).getMonth()] %>
+<%= new Date(savedWhen).getDate() %>,
+<%= new Date(savedWhen).getFullYear() %>
+</span></div></div>
+ <div id="padcontent"
+ <% if (request.userAgent.isIPhone()) { %> style="font-size: 1.3em;" <% } %>
+ >
+<%= padHTML %></div>
+</div>
+</div>
diff --git a/trunk/etherpad/src/templates/pad/total_users_exceeded.ejs b/trunk/etherpad/src/templates/pad/total_users_exceeded.ejs
new file mode 100644
index 0000000..7ac7e1b
--- /dev/null
+++ b/trunk/etherpad/src/templates/pad/total_users_exceeded.ejs
@@ -0,0 +1,29 @@
+<% /* 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 class="fpcontent"
+ style="font-family: Verdana, sans-serif; margin-top: 2em; border: 1px solid #ccc; padding: 1em; background: #eee;">
+
+ <h1>EtherPad Server Is Full</h1>
+
+ <p>Sorry, this EtherPad server is only licensed to service
+ <%= userQuota %> active users
+ within a <%= activeUserWindowHours %>-hour period,
+ and that quota is currently full.</p>
+
+ <p>Please contact your server administrator and ask him or her to
+ purchase a license with additional users.</p>
+
+ <a href="/">&laquo; Home</a>
+
+</div>
+
diff --git a/trunk/etherpad/src/templates/pro-account/recover.ejs b/trunk/etherpad/src/templates/pro-account/recover.ejs
new file mode 100644
index 0000000..686fe3b
--- /dev/null
+++ b/trunk/etherpad/src/templates/pro-account/recover.ejs
@@ -0,0 +1,48 @@
+<% /* 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("global-pro-account.css") %>
+
+<div class="fpcontent">
+ <div class="global-pro-account">
+
+ <h1>Recover Lost Account</h1>
+
+ <%= errorDiv() %>
+
+ <p>Enter your email address to recover your
+ account information</p>
+
+ <form id="global-sign-in"
+ action="<%= request.path %>" method="post">
+ <label for="email">Email Address:</label>
+ <input type="text" name="email" id="email" size="30"
+ <% if (oldData.email) { %>value="<%= oldData.email %>"<% } %>
+ />
+
+ <br/>
+ <button type="submit">Send account info</button>
+
+ </form>
+
+ <p><a href="/ep/pro-account/sign-in">&laquo; Back to sign
+ in</a></p>
+
+ <hr>
+
+ <p>New users: <a href="/ep/pro-signup/">create an account
+ instantly</a>.</p>
+
+ </div>
+</div>
+
+
diff --git a/trunk/etherpad/src/templates/pro-account/sign-in.ejs b/trunk/etherpad/src/templates/pro-account/sign-in.ejs
new file mode 100644
index 0000000..470bbc4
--- /dev/null
+++ b/trunk/etherpad/src/templates/pro-account/sign-in.ejs
@@ -0,0 +1,57 @@
+<% /* 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("global-pro-account.css") %>
+
+<div class="fpcontent">
+ <div class="global-pro-account">
+
+ <h1>EtherPad Professional Sign In</h1>
+
+ <%= errorDiv() %>
+
+ <form id="global-sign-in"
+ action="<%= request.path %>" method="post">
+ <label for="email">Email Address:</label>
+ <input type="text" name="email" id="email" size="30"
+ <% if (oldData.email) { %>value="<%= oldData.email %>"<% } %>
+ />
+
+ <label for="password">Password:</label>
+ <input type="password" name="password" id="password" size="30" />
+
+ <label for="subDomain">Site Address:</label>
+ <input type="text" name="subDomain" id="subDomain" size="30"
+ <% if (oldData.subDomain) { %>value="<%= oldData.subDomain %>"<% } %>
+ />.<%= request.host %>/
+ <br/>
+ <button type="submit">Sign In</button>
+
+ <div class="tip">
+ <b>Tip:</b> you can also sign in by going directly to your site
+ address.
+ </div>
+
+ </form>
+
+ <p><a href="/ep/pro-account/recover">Recover lost password or
+ site address</a></p>
+
+ <hr/>
+
+ <p>New users: <a href="/ep/pro-signup/">create an account
+ instantly</a>.</p>
+
+ </div>
+</div>
+
+
diff --git a/trunk/etherpad/src/templates/pro/account/account-welcome-email.ejs b/trunk/etherpad/src/templates/pro/account/account-welcome-email.ejs
new file mode 100644
index 0000000..33e1ac5
--- /dev/null
+++ b/trunk/etherpad/src/templates/pro/account/account-welcome-email.ejs
@@ -0,0 +1,32 @@
+<% /* 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. */ %>
+Dear <%= account.fullName %>,
+
+<% if (adminAccount) { %>
+<%= adminAccount.fullName %> has created an EtherPad account for you on <%=
+request.host %> (<%= siteName %>). You can sign in by clicking on the following link:
+<% } else { %>
+Thank you for signing up for EtherPad Professional Edition. You can sign in by clicking on the following link:
+<% } %>
+
+<%= signinLink %>
+
+For help signing in, or general support issues, please email support@pad.spline.inf.fu-berlin.de.
+
+--
+This email was sent to <%= toEmail %> from an EtherPad user.
+If you received it in error, you may safely ignore it.
+<%/* EtherPad's offices are located at Pier 38, The Embarcadero,
+San Francisco, CA 94107 */%>
+
diff --git a/trunk/etherpad/src/templates/pro/account/create-admin-account.ejs b/trunk/etherpad/src/templates/pro/account/create-admin-account.ejs
new file mode 100644
index 0000000..2a6c9f8
--- /dev/null
+++ b/trunk/etherpad/src/templates/pro/account/create-admin-account.ejs
@@ -0,0 +1,37 @@
+<% /* 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("pro/account.css") %>
+
+<div class="fpcontent">
+ <div class="account-container">
+
+ <h3>Welcome to your own EtherPad server!</h3>
+
+ <p>To get started, please create an administrator account. This
+ account will also be the primary admin contact for this
+ system.</p>
+
+ <%= errorDiv() %>
+
+ <%= renderAccountForm('create-admin-account', [
+ {title: "Create Admin Account"},
+ {text: "fullName", label: "Full Name:"},
+ {text: "email", label: "Email:"},
+ {password: "password", label: "Password:"},
+ {password: "passwordConfirm", label: "Confirm Password:"},
+ {submit: "Create Account"}
+ ]) %>
+
+ </div>
+</div>
+
diff --git a/trunk/etherpad/src/templates/pro/account/forgot-password-email.ejs b/trunk/etherpad/src/templates/pro/account/forgot-password-email.ejs
new file mode 100644
index 0000000..4595cee
--- /dev/null
+++ b/trunk/etherpad/src/templates/pro/account/forgot-password-email.ejs
@@ -0,0 +1,22 @@
+<% /* 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. */ %>
+Dear <%= account.fullName %>,
+
+We received a request to reset your EtherPad password. To proceed, click the following link:
+
+<%= recoverUrl %>
+
+If you did not request a password reset, simply ignore this email.
+
+
diff --git a/trunk/etherpad/src/templates/pro/account/forgot-password.ejs b/trunk/etherpad/src/templates/pro/account/forgot-password.ejs
new file mode 100644
index 0000000..bbc78dd
--- /dev/null
+++ b/trunk/etherpad/src/templates/pro/account/forgot-password.ejs
@@ -0,0 +1,66 @@
+<% /* 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("pro/account.css") %>
+<% helpers.setHtmlTitle("EtherPad: Forgot Password") %>
+
+<div class="fpcontent">
+ <div class="account-container forgotpass-container">
+
+ <% var md = messageDiv(); %>
+ <% if (md) { %>
+ <%= md %>
+ <% } else { %>
+
+ <form action="<%= request.path + '?' + request.query %>"
+ method="post">
+
+ <div class="bb bb-forgotpass">
+ <div class="bb-top">
+ <div class="bb-topleft"><!-- --></div>
+ <div class="bb-topright"><!-- --></div>
+ <div class="bb-title">Recover Lost Password</div>
+ </div>
+ <div class="bb-in">
+
+ <%= errorDiv() %>
+
+ <div id="instructions">
+ Enter your email address and we will send you a link
+ to reset your password.
+ </div>
+
+ <div>
+ <label for="email" id="email-label">Email</label>
+ <input class="textin" type="text" name="email" id="email" value="<%= email
+ %>" />
+ <%= helpers.clearFloats() %>
+ </div>
+
+ <div>
+ <button type="submit" class="bluebutton
+ bluebutton120">
+ Send Email
+ </button>
+ <%= helpers.clearFloats() %>
+ </div>
+
+ </div>
+ </div>
+ </form>
+ <% } %>
+
+ <p><a href="/ep/account/sign-in">&laquo; Back to sign-in</a></p>
+
+ </div>
+</div>
+
diff --git a/trunk/etherpad/src/templates/pro/account/global-multi-domain-recover-email.ejs b/trunk/etherpad/src/templates/pro/account/global-multi-domain-recover-email.ejs
new file mode 100644
index 0000000..d2eb4de
--- /dev/null
+++ b/trunk/etherpad/src/templates/pro/account/global-multi-domain-recover-email.ejs
@@ -0,0 +1,27 @@
+<% /* 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. */ %>
+Dear <%= accountList[0].fullName %>,
+
+We received a request to recover the EtherPad password for "<%=
+email %>. We found multiple accounts linked to this email address.
+Please choose one of the following URLs to proceed with recovering the
+password for that EtherPad site:
+
+<% for (var i = 0; i < accountList.length; i++) { %>
+<%= recoverLink(accountList[i], domainList[i]) %>
+<% } %>
+
+--
+If you did not request a password reset, simply ignore this email.
+
diff --git a/trunk/etherpad/src/templates/pro/account/guest-knock.ejs b/trunk/etherpad/src/templates/pro/account/guest-knock.ejs
new file mode 100644
index 0000000..44c69c0
--- /dev/null
+++ b/trunk/etherpad/src/templates/pro/account/guest-knock.ejs
@@ -0,0 +1,27 @@
+<% /* 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.includeJQuery() %>
+<% helpers.includeJs("pro/guest-knock-client.js") %>
+<% helpers.includeCss("pro/account.css") %>
+
+<div id="guest-knock-box">
+ <p>
+ <img src="/static/img/misc/status-ball.gif">
+ Waiting for approval...
+ </p>
+</div>
+
+<div id="guest-knock-denied">
+ Access Denied.
+</div>
+
diff --git a/trunk/etherpad/src/templates/pro/account/my-account.ejs b/trunk/etherpad/src/templates/pro/account/my-account.ejs
new file mode 100644
index 0000000..9634285
--- /dev/null
+++ b/trunk/etherpad/src/templates/pro/account/my-account.ejs
@@ -0,0 +1,67 @@
+<% /* 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("pro/account.css") %>
+<% helpers.setHtmlTitle("EtherPad: My Account") %>
+
+<div class="fpcontent">
+<div class="my-account">
+ <%= messageDiv() %>
+ <%= errorDiv() %>
+
+<% if (!changePass) { %>
+ <h2>My Info</h2>
+
+ <form method="post" action="/ep/account/update-info">
+ <table>
+ <tr>
+ <th>Full Name:</th>
+ <td class="ti"><%= INPUT({type: 'text', name: 'fullName',
+ value: account.fullName}) %></td>
+ </tr>
+ <tr>
+ <th>Email:</th>
+ <td class="ti"><%= INPUT({type: 'text', name: 'email', value:
+ account.email}) %></td>
+ </tr>
+ <tr>
+ <td colspan="2" style="text-align: right;">
+ <input type="submit" value="Update Info" />
+ </td>
+ </tr>
+ </table>
+ </form>
+<% } %>
+
+<h2>Password</h2>
+
+<form method="post" action="/ep/account/update-password">
+<table>
+ <tr>
+ <th>New Password:</th>
+ <td class="ti"><%= INPUT({type: 'password', name: 'password', value: ''}) %></td>
+ </tr>
+ <tr>
+ <th>Confirm Password:</th>
+ <td class="ti"><%= INPUT({type: 'password', name: 'passwordConfirm', value: ''}) %></td>
+ </tr>
+ <tr>
+ <td colspan="2" style="text-align: right;">
+ <input type="submit" id="passwordSubmit" value="Update Password" />
+ </td>
+ </tr>
+</table>
+</form>
+
+</div>
+</div>
+
diff --git a/trunk/etherpad/src/templates/pro/account/signin-guest.ejs b/trunk/etherpad/src/templates/pro/account/signin-guest.ejs
new file mode 100644
index 0000000..621c381
--- /dev/null
+++ b/trunk/etherpad/src/templates/pro/account/signin-guest.ejs
@@ -0,0 +1,51 @@
+<% /* 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("pro/account.css") %>
+<% helpers.includeJQuery() %>
+<% helpers.includeJs("pro/signin-client.js") %>
+<% helpers.setHtmlTitle("EtherPad: Sign In") %>
+
+<div class="fpcontent">
+ <div class="account-container">
+
+ <form id="guest-signin-form"
+ action="<%= request.path + '?' + request.query %>" method="post"
+ style="border: 1px solid #5a5; background: #efe; padding: 1em;">
+
+ <div style="font-weight: bold;">Guest Sign In:</div>
+
+ <% if (errorMessage) { %>
+ <div style="margin: 1em 0; padding: 1em; border: 1px solid red; background: #fee;">
+ <%= errorMessage %>
+ </div>
+ <% } %>
+
+ <p>Enter your name to be displayed to other users:</p>
+ <input id="guestDisplayName" type="text" name="guestDisplayName" value="<%= guestName
+ %>" />
+ <input type="hidden" name="localPadId" value="<%= localPadId %>" />
+
+ <input type="submit" value="Request Access" />
+
+ </form>
+
+ <form id="account-signin-choice"
+ method="get"
+ action="/ep/account/sign-in">
+ <input type="hidden" name="guest" value="1" />
+ <input type="hidden" name="padId" value="<%= toHTML(localPadId) %>" />
+ Account holders: <button>Sign in</button>
+ </form>
+ </div>
+</div>
+
diff --git a/trunk/etherpad/src/templates/pro/account/signin.ejs b/trunk/etherpad/src/templates/pro/account/signin.ejs
new file mode 100644
index 0000000..c67bea6
--- /dev/null
+++ b/trunk/etherpad/src/templates/pro/account/signin.ejs
@@ -0,0 +1,81 @@
+<% /* 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.includeJQuery() %>
+<% helpers.includeJs("pro/signin-client.js") %>
+<% helpers.includeCss("pro/account.css") %>
+<% helpers.setHtmlTitle("EtherPad: Sign In") %>
+
+<div class="fpcontent">
+ <div class="account-container">
+
+ <%= signinNotice() %>
+
+ <form id="signin-form" action="<%= request.path + '?' + request.query %>" method="post">
+ <div class="bb bb-signin">
+ <div class="bb-top">
+ <div class="bb-topleft"><!-- --></div>
+ <div class="bb-topright"><!-- --></div>
+ <div class="bb-title">Sign In to <%= siteName %> EtherPad</div>
+ </div>
+ <div class="bb-in">
+ <%= errorDiv() %>
+ <div>
+ <label for="email" id="email-label">Email</label>
+ <input class="textin" type="text" name="email" id="email" value="<%= email
+ %>" />
+ <%= helpers.clearFloats() %>
+ </div>
+
+ <div>
+ <label for="password" id="password-label">Password</label>
+ <input class="passin" type="password" name="password"
+ id="password"
+ value="<%= password
+ %>" />
+ <%= helpers.clearFloats() %>
+ </div>
+
+ <div>
+ <input type="checkbox" id="rememberMe" name="rememberMe"
+ <%= (rememberMe ? 'checked="on"' : '') %> />
+ <label for="rememberMe" id="rememberMe-label">Remember me on this
+ computer</label>
+
+ <button type="submit" class="bluebutton bluebutton120" id="signInButton">
+ Sign In
+ </button>
+ <%= helpers.clearFloats() %>
+ </div>
+
+ </div>
+ </div>
+ </form>
+
+ <% if (showGuestBox) { %>
+ <form action="/ep/account/guest-sign-in"
+ id="guest-signin-choice"
+ method="get">
+ <input type="hidden" name="padId" value="<%= toHTML(localPadId) %>" />
+ Guests: <button type="submit">Request Guest Access</button>
+ </form>
+ <% } %>
+
+ <div id="bottom-text">
+ <a
+ href="/ep/account/forgot-password">Recover lost
+ password</a>
+ </div>
+
+ </div>
+</div>
+
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>&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/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>&nbsp;</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" />
+ &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/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 %>">&laquo; back to invoice list</a></p>
+
diff --git a/trunk/etherpad/src/templates/pro/padlist/pro-padlist.ejs b/trunk/etherpad/src/templates/pro/padlist/pro-padlist.ejs
new file mode 100644
index 0000000..b762679
--- /dev/null
+++ b/trunk/etherpad/src/templates/pro/padlist/pro-padlist.ejs
@@ -0,0 +1,49 @@
+<% /* 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("lib/jquery.contextmenu.css") %>
+<% helpers.includeCss("pro/padlist.css") %>
+
+<% helpers.includeJQuery() %>
+<% helpers.includeJs("lib/jquery.contextmenu.js") %>
+<% helpers.includeJs("pro/pro-padlist-client.js") %>
+
+<% helpers.setHtmlTitle("Pad List - " + orgName + " - EtherPad") %>
+
+<div class="fpcontent">
+
+ <%= renderPadNav() %>
+ <%= renderNotice() %>
+ <%= renderShowingDesc(padList.length) %>
+
+ <% if (padList.length > 0) { %>
+ <%= renderPadList() %>
+ <p style="font-size: .8em;"><i><%= padList.length %> pad<% if (padList.length > 1) { %>s<% } %></i> <% if (isAdmin) { %>(<a href="/ep/padlist/all-pads.zip">Download all pads as a ZIP archive</a>.) <% } %>
+</p>
+
+ <% } else { %>
+ <p>No pads in this list.</p>
+ <% } %>
+
+</div>
+
+<form action="/ep/padlist/delete" method="post" id="delete-pad" style="display: none;">
+ <input type="hidden" name="returnPath" value="<%= request.url %>" />
+ <input id="padIdToDelete" name="padIdToDelete" type="hidden" value="-" />
+</form>
+
+<form action="/ep/padlist/toggle-archive" method="post" id="toggle-archive-pad" style="display: none;">
+ <input type="hidden" name="returnPath" value="<%= request.url %>" />
+ <input id="padIdToToggleArchive" name="padIdToToggleArchive" type="hidden" value="-" />
+</form>
+
+
diff --git a/trunk/etherpad/src/templates/pro/pro-payment-required.ejs b/trunk/etherpad/src/templates/pro/pro-payment-required.ejs
new file mode 100644
index 0000000..3649990
--- /dev/null
+++ b/trunk/etherpad/src/templates/pro/pro-payment-required.ejs
@@ -0,0 +1,51 @@
+<% /* 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.includeJQuery() %>
+<% helpers.includeJs("etherpad.js") %>
+<% helpers.includeCss("pro/payment-required.css") %>
+
+<div class="fpcontent payment-required">
+
+
+<div id="outside">
+<div id="inside">
+
+ <h1>Payment Required</h1>
+
+ <div id="message"><%= message %></div>
+ <br/>
+
+ <% if (isAdmin) { %>
+ <a class="manage-billing-button" href="/ep/admin/billing/">
+ Manage Billing Info
+ </a>
+ <% } else { %>
+ <p>Please contact one of the following site administrator to
+ set up a billing profile on <%= request.domain %>:</p>
+
+ <ul>
+ <% adminList.forEach(function(a) { %>
+ <li><%= a.fullName %>&nbsp;&nbsp;&lt;<%= TT(a.email)
+ %>&gt;</li>
+ <% }); %>
+ </ul>
+
+ <% } %>
+
+ <br/><br/>
+ <p>Questions? Contact <%= helpers.oemail("support") %>.</p>
+
+</div>
+</div>
+
+
diff --git a/trunk/etherpad/src/templates/pro/pro_home.ejs b/trunk/etherpad/src/templates/pro/pro_home.ejs
new file mode 100644
index 0000000..bcf7443
--- /dev/null
+++ b/trunk/etherpad/src/templates/pro/pro_home.ejs
@@ -0,0 +1,103 @@
+<% /* 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(orgName + " - EtherPad"); %>
+<% helpers.includeJQuery() %>
+<% helpers.includeJs("etherpad.js") %>
+<% helpers.includeCss("pro/pro-home.css"); %>
+<% helpers.includeCss("pro/padlist.css"); %>
+
+<div class="fpcontent">
+
+ <div id="welcome-msg">
+ Welcome <%= account.fullName %>
+ <% if (account.isAdmin) { %>(Administrator)<% } %>
+ <br/>
+ <br/>
+ </div>
+
+
+ <div id="homeright">
+ <a href="/ep/pad/newpad">
+ <img src="/static/img/davy/btn/createpad-small.gif" alt="Create new pad" />
+ </a>
+
+ <% if (livePads.length > 0) { %>
+ <div id="live-pads">
+ <h3>Live Pads (currently being edited)</h3>
+ <div id="listwrap">
+ <%= renderLivePads() %>
+ </div>
+ </div>
+ <% } %>
+
+ <% if (recentPads.length > 0) { %>
+ <div id="recent-pads">
+ <h3>Your Recent Pads:</h3>
+ <div id="listwrap">
+ <%= renderRecentPads() %>
+ </div>
+ <a id="viewall" href="/ep/padlist/">View all pads...</a>
+ <div style="clear:both"><!-- --></div>
+ </div>
+ <% } %>
+
+ </div>
+
+ <div id="homeleft">
+ <div id="homeleft-title">
+ Latest News
+ </div>
+
+ <div class="news-time-sep">
+ <div class="date">
+ June 17th, 2009
+ </div>
+ <div class="line"><!-- --></div>
+ </div>
+
+ <div class="news-item">
+ <p>Welcome to your EtherPad Beta Account! Please report bugs by
+ sending email to <%= helpers.oemail("bugs") %>.
+
+ <p>We hope you enjoy EtherPad!</p>
+
+ <p>Sincerely,</p>
+
+ <p>Spline</p>
+ </p>
+ </div>
+
+ </div>
+
+
+ </div><!-- /homeleft -->
+
+ <%= helpers.clearFloats() %>
+
+ <% if (isPNE) { %>
+ <div id="version-info"
+ style="margin-top: 2em; font-size: 76%; color: #444; text-align: right;">
+ <br/>
+ EtherPad Private Network Edition (PNE)
+ Version <%= pneVersion %><br/>
+
+ <% if (isEvaluation && evalExpDate) { %>
+ <br/>
+ <span style="color: #c22;">EVALUATION EDITION: Expires <%= evalExpDate.toString()
+ %>.<br/>
+ <% } %>
+ </div>
+ <% } %>
+
+</div>
+
diff --git a/trunk/etherpad/src/templates/statistics/stat_page.ejs b/trunk/etherpad/src/templates/statistics/stat_page.ejs
new file mode 100644
index 0000000..22277b3
--- /dev/null
+++ b/trunk/etherpad/src/templates/statistics/stat_page.ejs
@@ -0,0 +1,89 @@
+<% /* 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('admin/admin-stats.css');
+helpers.includeJQuery();
+helpers.includeJs('statpage.js');
+
+%>
+
+<a id="backtoadmin" href="/ep/admin/">&laquo; back to admin</a>
+
+<div id="topnav">
+ <ul>
+ <% statCategoryNames.forEach(function(catName) {
+ %> <li>
+ <a class="navlink" id="link<%= catName %>" href="<%= request.path %>#<%= catName %>"><%= catName %></a>
+ </li> <%
+ }); %>
+ </ul>
+</div>
+
+<div>&nbsp;</div>
+
+<%= helpers.clearFloats() %>
+
+<%= optionsForm %>
+
+<% function formatLatest(latest) {
+ if (typeof(latest) == 'string') {
+ return latest;
+ } else {
+ return '<table class="latesttable" border="0" cellpadding="0" cellspacing="0">'+
+ latest.map(function(x) { return "<tr><td>"+x.value+"</td><td>"+x.description+"</td></tr>"; }).join("\n")+
+ "</table>";
+ }
+}
+%>
+
+<%
+function displayStat(statObject) {
+ %>
+ <div class="statentry <%= statObject.specialState %>" id="<%= statObject.id %>">
+ <h2 class="title"><%= statObject.name %></h2>
+ <div class="statbody">
+ <h3><%= statObject.displayName %></h3>
+ <table>
+ <tr>
+ <td class="graph">
+ <%= statObject.graph %>
+ <% if (statObject.dataLinks) { %>
+ <div class="datalinks">(data for <%= statObject.dataLinks.join(", ") %>)</div>
+ <% } %>
+ </td>
+ <td class="latest">
+ <h4>Latest values:</h4>
+ <%= formatLatest(statObject.latest) %>
+ </td>
+ </tr>
+ </table>
+ </div>
+ </div>
+ <%
+}
+
+function displayCategory(categoryName) {
+ %>
+ <div class="categorywrapper" id="box<%= categoryName %>">
+ <%
+ categoriesToStats[categoryName].forEach(displayStat);
+ %>
+ </div>
+ <%
+}
+
+statCategoryNames.forEach(displayCategory);
+
+%>
+
diff --git a/trunk/etherpad/src/templates/store/csc-help.ejs b/trunk/etherpad/src/templates/store/csc-help.ejs
new file mode 100644
index 0000000..3623fac
--- /dev/null
+++ b/trunk/etherpad/src/templates/store/csc-help.ejs
@@ -0,0 +1,23 @@
+<% /* 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. */ %><html>
+<body>
+
+<p>The CSC (or CVC) is the 3-digit number printed on the back of your card.
+For American Express, it's the 4-digit number on the front.</p>
+
+<img src="/static/img/billing/csc-help.gif" alt="cc back" />
+
+</body>
+</html>
+
diff --git a/trunk/etherpad/src/templates/store/eepnet-checkout/billing-info.ejs b/trunk/etherpad/src/templates/store/eepnet-checkout/billing-info.ejs
new file mode 100644
index 0000000..69e0ead
--- /dev/null
+++ b/trunk/etherpad/src/templates/store/eepnet-checkout/billing-info.ejs
@@ -0,0 +1,183 @@
+<% /* 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. */ %><%
+ if (!cart.billingCountry) {
+ cart.billingCountry = "US";
+ }
+ helpers.includeJQuery();
+ helpers.includeJs("billing_shared.js");
+ helpers.includeJs("billing.js");
+
+ function classesPlusError(classes, id) {
+ return (classes || []).concat(errorIfInvalid(id) || []).join(' ');
+ }
+%>
+
+<% function textRow(id, label, classes, notBillingField) {
+ var val = (cart[id] || "");
+ var maxlen=60;
+ var border;
+ if (id == "billingCCNumber") {
+ if (billing.validateCcNumber(val)) {
+ border = "greenborder";
+ } else if (billing.validateCcLength(val)) {
+ border = "redborder";
+ }
+ val = obfuscateCC(val);
+ maxlen = 16;
+ }
+ var classString = classesPlusError((notBillingField?[]:['billingfield']).concat(classes), id);
+ return TR({className: classString},
+ TD({className: 'pcell'},
+ LABEL({htmlFor: id}, label+(label.length > 0 ? ":" : ''))),
+ TD({className: 'tcell'},
+ INPUT({type: 'text', name: id, size:35, maxlength:maxlen,
+ value: val,
+ className: border})));
+ } %>
+
+<h4>Your name:</h4>
+<table class="billingtable">
+ <%= textRow("billingFirstName", "First Name", [], true) %>
+ <%= textRow("billingLastName", "Last Name", [], true) %>
+</table>
+
+<h4>Payment information:</h4>
+
+<% if (request.scheme == 'https') { %>
+ <div class='secure'>
+ <p>Your payment information will be sent securely.</p>
+ </div>
+<% } %>
+
+<%
+ function purchaseType(id, title) {
+ var sel;
+ if (! cart.billingPurchaseType) {
+ sel = (id == 'creditcard');
+ } else {
+ sel = (cart.billingPurchaseType == id);
+ }
+ %>
+ <span class="paymentbutton">
+ <input type="radio" value="<%= id %>" name="billingPurchaseType" id="purchase<%= id %>" <%= sel ? 'checked="checked"' : "" %> style="display: inline-block; vertical-align: middle;"/>
+ <label for="purchase<%= id %>">
+ <img src="/static/img/billing/<%= id %>.gif" style="display: inline-block; vertical-align: middle;" /> <span style="display: inline-block; vertical-align: middle;"><%= title %></span>
+ </label>
+ </span>
+ <%
+ }
+%>
+
+<div id="billingselect">
+<p class="<%= errorIfInvalid("billingPurchaseType") %>">Pay using:
+<% purchaseType('creditcard', 'Credit Card'); %>
+<% purchaseType('invoice', 'Invoice'); %>
+<% purchaseType('paypal', 'PayPal'); %>
+</p>
+</div>
+
+<table class="billingtable">
+ <%= textRow("billingCCNumber", "Credit Card Number", ['creditcardreq']) %>
+
+<% function cardInput(cctype) {
+ var classes = [];
+ if (cart.billingCCNumber) {
+ if (cctype == billing.getCcType(cart.billingCCNumber)) {
+ classes.push("ccimageselected");
+ }
+ }
+ classes.push("ccimage");
+ var img = IMG({
+ src: "/static/img/billing/"+cctype+".gif",
+ alt: cctype,
+ className: classes.join(" "),
+ style: "vertical-align: middle",
+ id: "img"+cctype});
+ return img;
+ } %>
+
+ <tr class="billingfield creditcardreq">
+ <td class="pcell">&nbsp;</td>
+ <td valign="center">
+ <div id="ccimages">
+ <% ["visa", "mc", "disc", "amex"].forEach(function(t) { %>
+ <%= cardInput(t) %>
+ <% }); %>
+ </div>
+ </td>
+ </tr>
+
+ <tr class="billingfield creditcardreq <%= errorIfInvalid("billingMeta") %>">
+ <td class="pcell">Expiration (MM/YY):</td>
+ <td>
+ <input type="text" name="billingExpirationMonth" size="2" maxlength="2"
+ value="<%= (cart.billingExpirationMonth || '') %>" />
+ /
+ <input type="text" name="billingExpirationYear" size="2" maxlength="2"
+ value="<%= (cart.billingExpirationYear || '') %>" />
+ &nbsp;&nbsp;&nbsp;&nbsp;CSC/CVC:
+ <input type="text" name="billingCSC" size="4" maxlength="4"
+ value="<%= (cart.billingCSC || '') %>"/>
+ <a target="_blank" href="//<%= getFullSuperdomainHost() %>/ep/store/csc-help" id="cschelp">what's this?</a>
+ </td>
+ </tr>
+
+ <tr class="billingfield creditcardreq">
+ <td colspan=2 style="text-align: center; font-weight: normal;">(Be sure to enter your <strong>credit card billing address</strong> below.)</td>
+ </tr>
+
+ <tr class="<%= classesPlusError(['billingfield', 'creditcardreq', 'invoicereq'], 'billingCountry') %>">
+ <td class="pcell">Country:</td>
+ <td>
+ <select id="billingCountry" name="billingCountry">
+ <% countryList.forEach(function(c) { %>
+ <%= ((c[0] == cart.billingCountry) ?
+ OPTION({value: c[0], selected: true}, c[1]) :
+ OPTION({value: c[0]}, c[1])) %>
+ <% }); %>
+ </select>
+ </td>
+ </tr>
+
+ <%= textRow("billingAddressLine1", "Address", ['creditcardreq', 'invoicereq']) %>
+ <%= textRow("billingAddressLine2", "", ['creditcardreq', 'invoicereq']) %>
+ <%= textRow("billingCity", "City", ['creditcardreq', 'invoicereq']) %>
+
+ <tr class="<%= classesPlusError(['billingfield', 'creditcardreq', 'invoicereq', 'usonly'], 'billingState') %>">
+ <td class="pcell">State:</td>
+ <td>
+ <select id="billingState" name="billingState">
+ <% usaStateList.forEach(function(s) { %>
+ <%= ((s == cart.billingState) ?
+ OPTION({value: s, selected: true}, s) :
+ OPTION({value: s}, s)) %>
+ <% }); %>
+ </select>
+ </td>
+ </tr>
+ <%= textRow("billingProvince", "Province", ['creditcardreq', 'invoicereq', 'intonly'])%>
+ <%= textRow("billingZipCode", "Zip Code", ['creditcardreq', 'invoicereq', 'usonly']) %>
+ <%= textRow("billingPostalCode", "Postal Code", ['creditcardreq', 'invoicereq', 'intonly'])%>
+ <tr class="billingfield paypalreq"><td colspan=2 class="firstcell">Click "<%= billingButtonName %>" below to continue with PayPal.</td></tr>
+</table>
+
+<% if (showCouponCode) { %>
+ <h4>Optional information:</h4>
+ <table class="billingtable">
+ <%= textRow("billingReferralCode", "Referral Code", [], true) %>
+ </table>
+<% } %>
+
+
+<%= billingFinalPhrase %> \ No newline at end of file
diff --git a/trunk/etherpad/src/templates/store/eepnet-checkout/cart.ejs b/trunk/etherpad/src/templates/store/eepnet-checkout/cart.ejs
new file mode 100644
index 0000000..147ff1b
--- /dev/null
+++ b/trunk/etherpad/src/templates/store/eepnet-checkout/cart.ejs
@@ -0,0 +1,119 @@
+<% /* 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="<%= shoppingcartid %>" class="shoppingcart">
+ <table cellspacing="0" cellpadding="0">
+ <tr>
+ <th>Item</th>
+ <th class="pcell">Cost</th>
+ </tr>
+
+ <% if (! ('baseCost' in cart) && ! ('supportCost' in cart)) { %>
+ <tr>
+ <td colspan="2" class="noitems">
+ <em>Nothing selected.</em>
+ </td>
+ </tr>
+ <% } %>
+
+ <% if (cart.baseCost) { %>
+ <tr class="base">
+ <td>
+ <span class="item">Etherpad Private Network</span><br />
+ <span class="desc"><%= cart.numUsers %> users
+ <% if (editable) { %>
+ <span class="editlink">(<a href="<%= pathTo("purchase") %>">edit</a>)</span>
+ <% } %>
+ </span>
+ </td>
+ <td class="pcell">US$<%= dollars(cart.baseCost) %></td>
+ </tr>
+ <% if (cart.couponProductPctDiscount) { %>
+ <tr class="basediscount refer">
+ <td>
+ <span class="desc">Referral - <%= cart.couponProductPctDiscount %>% savings</span>
+ </td>
+ <td class="pcell">-US$<%= dollars(cart.productReferralDiscount) %></td>
+ </tr>
+ <% } %>
+ <% } %>
+
+ <% if (cart.supportCost) { %>
+ <tr class="support">
+ <td>
+ <span class="item">Support Contract
+ <% if (editable) { %>
+ <span class="editlink">(<a href="<%= pathTo("support-contract") %>">edit</a>)</span>
+ <% } %>
+ </span>
+ <br />
+ <span class="desc">1 year</span>
+ </td>
+ <td class="pcell">US$<%= dollars(cart.supportCost) %></td>
+ </tr>
+ <% if (cart.couponSupportPctDiscount) { %>
+ <tr class="supportdiscount refer">
+ <td>
+ <span class="desc">Referral - <%= cart.couponSupportPctDiscount %>% savings</span>
+ </td>
+ <td class="pcell">-US$<%= dollars(cart.supportReferralDiscount) %></td>
+ </tr>
+ <% } %>
+ <% } else if (cart.baseCost) { %>
+ <tr class="support">
+ <td>
+ <span class="item">No Support Contract
+ <% if (editable) { %>
+ <span class="editlink">(<a href="<%= pathTo("support-contract") %>">edit</a>)</span>
+ <% } %>
+ </span>
+ </td>
+ <td class="pcell">US$0.00</td>
+ </tr>
+ <% } %>
+
+ <% if (cart.freeUserCount) { %>
+ <tr class="referralbonus refer">
+ <td>
+ <span class="item">Bonus Users</span><br />
+ <span class="desc">
+ Referral - <%= cart.freeUserCount %> free
+ user<%= (cart.freeUserCount == 1 ? '' : "s") %>
+ </span>
+ </td>
+ <td class="pcell">US$0.00</td>
+ </tr>
+ <% } %>
+
+ <tr class="spacer"><td>&nbsp;</td></tr>
+
+ <%
+ var pctDiscount = cart.couponTotalPctDiscount;
+ var hasSubtotal = pctDiscount > 0;
+ %>
+ <% if (hasSubtotal) { %>
+ <tr class="subtotal">
+ <td>Subtotal</td>
+ <td class="pcell">US$<%= dollars(cart.subTotal) %></td>
+ </tr>
+ <tr class="referraldiscount refer">
+ <td>Referral - <%= pctDiscount %>% savings</td>
+ <td class="pcell">-US$<%= dollars(cart.totalReferralDiscount) %></td>
+ </tr>
+ <% } %>
+ <tr class="total<%= (hasSubtotal ? '' : ' withoutsubtotal') %>">
+ <td>Total</td>
+ <td class="pcell">US$<%= dollars(cart.total) %></td>
+ </tr>
+ </table>
+</div> \ No newline at end of file
diff --git a/trunk/etherpad/src/templates/store/eepnet-checkout/checkout-template.ejs b/trunk/etherpad/src/templates/store/eepnet-checkout/checkout-template.ejs
new file mode 100644
index 0000000..817f0eb
--- /dev/null
+++ b/trunk/etherpad/src/templates/store/eepnet-checkout/checkout-template.ejs
@@ -0,0 +1,38 @@
+<% /* 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/eepnet-checkout.css"); %>
+<% helpers.includeJQuery() %>
+<% helpers.includeJs("etherpad.js") %>
+<% helpers.setHtmlTitle(title); %>
+
+<%
+var selectCount = 0;
+function select(id, title) {
+ var className = 'poslabel';
+ if (pageId == id) {
+ className += ' current';
+ }
+ selectCount++;
+ return SPAN({className: className}, selectCount+". "+title);
+}
+%>
+
+<div class="fpcontent">
+<div id="<%= pageId %>">
+
+ <h2>Private Network Edition: Purchase Online</h2>
+
+ <%= helpers.rafterNote() %>
+
+</div><!-- /pageId -->
+</div><!-- /fpcontent -->
diff --git a/trunk/etherpad/src/templates/store/eepnet-checkout/confirmation.ejs b/trunk/etherpad/src/templates/store/eepnet-checkout/confirmation.ejs
new file mode 100644
index 0000000..3b38775
--- /dev/null
+++ b/trunk/etherpad/src/templates/store/eepnet-checkout/confirmation.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.includeJs('confirmation.js');
+%>
+
+<% if (request.params.frompaypal) {
+ handlePayPalRedirect();
+} %>
+
+<%= displaySummary(true) %>
+
+<% switch(cart.billingPurchaseType) {
+ case 'creditcard': case 'paypal': %>
+ <p>If this looks good, click "Purchase" below to complete your purchase.</p>
+ <% break;
+ case 'invoice': %>
+ <p>If this looks good, print this page and mail it along with a check or other
+ prearranged payment to:</p><p><strong>AppJet, Inc.<br>Pier 38 - Suite 210<br>The Embarcadero<br>San Francisco, CA 94107</strong></p>
+ <% break;
+}
+ %>
+
diff --git a/trunk/etherpad/src/templates/store/eepnet-checkout/license-info.ejs b/trunk/etherpad/src/templates/store/eepnet-checkout/license-info.ejs
new file mode 100644
index 0000000..4d710f2
--- /dev/null
+++ b/trunk/etherpad/src/templates/store/eepnet-checkout/license-info.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. */ %><p>Your license key will be issued to a particular individual at your organization, and will be delivered to the email address you specify below.</p>
+
+<table border="1">
+ <tr class="<%= errorIfInvalid('email') %>">
+ <td>Email address to receive license key:</td>
+ <td><input name="email" type="text"
+ value="<%= cart.email %>" /></td>
+ </tr>
+
+ <tr class="<%= errorIfInvalid('ownerName') %>">
+ <td>Name of license owner (your name):</td>
+ <td><input name="ownerName" type="text"
+ value="<%= cart.ownerName %>" /></td>
+ </tr>
+
+ <tr class="<%= errorIfInvalid('orgName') %>">
+ <td>Organization or company name:</td>
+ <td><input name="orgName" type="text"
+ value="<%= cart.orgName %>" /></td>
+ </tr>
+
+ <tr class="<%= errorIfInvalid('licenseAgreement') %> center">
+ <td colspan=2>
+ <input id="c1" type="checkbox" name="licenseAgreement" <%= (cart.licenseAgreement ? 'checked="checked"' : '') %> />
+ <label for="c1">I agree to the <a target="_blank" href="/static/html/eepnet/eepnet-license.html">License</a>.</label>
+ </td>
+ </tr>
+</table> \ No newline at end of file
diff --git a/trunk/etherpad/src/templates/store/eepnet-checkout/purchase.ejs b/trunk/etherpad/src/templates/store/eepnet-checkout/purchase.ejs
new file mode 100644
index 0000000..49cb3bb
--- /dev/null
+++ b/trunk/etherpad/src/templates/store/eepnet-checkout/purchase.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. */ %><p>Thank you for choosing to purchase <strong>Enterprise EtherPad Private Network Edition.</strong></p>
+
+<p>A license allows a certain number of concurrent users, at a one-time cost of US $<%= dollars(costPerUser) %> per user with no recurring costs. <a target="_blank" href="/ep/about/pricing-eepnet-users">Learn more about how we count users</a>.</p>
+
+<p>How many users should your license support?</p>
+
+<table>
+ <tr class="<%= errorIfInvalid('numUsers') %>">
+ <td class="pcell">Number of Users at US $<%= dollars(costPerUser) %>/user:</td>
+ <td class="tcell"><input name="numUsers" type="text"
+ value="<%= cart.numUsers %>" /></td>
+ </tr>
+</table>
+
+<table>
+ <tr class="<%= errorIfInvalid('couponCode') %>">
+ <td colspan="2" class="pcell">Referral Code (optional):</td>
+ <td class="tcell"><input id="couponCode" name="couponCode" type="text"
+ maxlength="8" value="<%= cart.couponCode %>" /></td>
+ </tr>
+</table>
diff --git a/trunk/etherpad/src/templates/store/eepnet-checkout/receipt.ejs b/trunk/etherpad/src/templates/store/eepnet-checkout/receipt.ejs
new file mode 100644
index 0000000..8d3a2a5
--- /dev/null
+++ b/trunk/etherpad/src/templates/store/eepnet-checkout/receipt.ejs
@@ -0,0 +1,43 @@
+<% /* 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. */ %><% if (cart.showStartOverMessage) { %>
+ <div class="innererrormsg">
+ Your purchase is complete! To purchase another item, please return to the <a href="<%= pathTo('purchase') %>?clearcart=1">purchase page</a>.
+ </div>
+<% }
+
+switch(cart.status) {
+ case 'success':
+ %><p><strong>Thank you for your purchase!</strong> This page serves as your receipt. Please print it for your records. You will receive a copy of this receipt and license key by email shortly.</p><%
+ break;
+ case 'pending':
+ %><p>Your purchase is pending approval by PayPal. Once it clears,
+ usually in 2-5 business days, you will receive a copy of this receipt and
+ your license key by email.</p><%
+ break;
+} %>
+
+<%
+ var instructions = "/ep/pne-manual";
+ var download = "/ep/store/eepnet-download-nextsteps";
+%>
+
+<p>To install EtherPad Private Network Edition:</p>
+<ul>
+ <li><a href="<%= download %>">Download Etherpad: Private Network Edition</a>.</li>
+ <li>Read the <a href="<%= instructions %>">EtherPad: Private Network Edition installation instructions</a>.</li>
+</ul>
+
+<p><strong></strong></p>
+
+<%= displaySummary() %>
diff --git a/trunk/etherpad/src/templates/store/eepnet-checkout/summary.ejs b/trunk/etherpad/src/templates/store/eepnet-checkout/summary.ejs
new file mode 100644
index 0000000..753873c
--- /dev/null
+++ b/trunk/etherpad/src/templates/store/eepnet-checkout/summary.ejs
@@ -0,0 +1,91 @@
+<% /* 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 textRow(tcell, pcell) {
+ %><tr>
+ <td class="tcell"><%= tcell %></td>
+ <td class="pcell"><%= pcell %></td>
+ </tr>
+ <%
+}
+var keyData = {
+ ownerName: cart.ownerName,
+ orgName: cart.orgName
+}
+if (cart.licenseKey) {
+ var parts = cart.licenseKey.split(":");
+ keyData.ownerName = parts[0];
+ keyData.orgName = parts[1];
+ keyData.key = parts[2];
+
+ keyData.keyLine1 = keyData.key.substring(0, keyData.key.length/3);
+ keyData.keyLine2 = keyData.key.substring(keyData.key.length/3, 2*keyData.key.length/3);
+ keyData.keyLine3 = keyData.key.substring(2*keyData.key.length/3, keyData.key.length);
+}
+
+function makeRows(arr) {
+ arr.forEach(function(arr) { textRow(arr[0], arr[1]); });
+}
+%>
+
+<h4>License Information <% if (editable) { %><span class="editlink">(<a href="<%= pathTo("license-info") %>">edit</a>)</span><% } %></h4>
+
+<table>
+ <%
+ makeRows([
+ [ "Administrator name:", keyData.ownerName ],
+ [ "Organization/Company:", keyData.orgName ],
+ [ "Email address for delivery:", cart.email ],
+ [ "Total users:", cart.userCount ]
+ ]);
+ if (keyData.key) {
+ textRow("License key:", keyData.keyLine1+"<BR>"+keyData.keyLine2+"<BR>"+keyData.keyLine3);
+ %><!-- key: <%= keyData.key %> --><%
+ }
+ %>
+</table>
+
+<h4>Payment Information <% if (editable) { %><span class="editlink">(<a href="<%= pathTo("billing-info") %>">edit</a>)</span><% } %></h4>
+
+<table>
+ <%
+ var isUs = cart.billingCountry == "US";
+ switch(cart.billingPurchaseType) {
+ case 'creditcard':
+ makeRows([
+ [ "Credit card number:", obfuscateCC(cart.billingCCNumber) ],
+ [ "Expiration date:", cart.billingExpirationMonth+" / 20"+cart.billingExpirationYear ]
+ ]);
+ // falling through intentional.
+ case 'invoice':
+ makeRows([
+ [ "Purchaser name:", cart.billingFirstName + " " + cart.billingLastName ],
+ [ "Purchaser address: ", cart.billingAddressLine1 + "<br>" +
+ (cart.billingAddressLine2 ? cart.billingAddressLine2 + "<br>" : "") +
+ cart.billingCity + ", " +
+ (isUs?cart.billingState:cart.billingProvince) + "<br>" +
+ (isUs?cart.billingZipCode:cart.billingPostalCode) +
+ (isUs?'':', '+cart.billingCountry) ],
+ [ "Invoice number: ", cart.invoiceId ]
+ ]);
+ break;
+ case 'paypal':
+ textRow("Paid using:", "PayPal");
+ textRow("InvoiceNumber:", cart.invoiceId);
+ }
+ %>
+</table>
+
+<h4>Summary of Charges</h4>
+
+<%= displayCart("shoppingconfirmation", editable) %>
diff --git a/trunk/etherpad/src/templates/store/eepnet-checkout/support-contract.ejs b/trunk/etherpad/src/templates/store/eepnet-checkout/support-contract.ejs
new file mode 100644
index 0000000..ff33fda
--- /dev/null
+++ b/trunk/etherpad/src/templates/store/eepnet-checkout/support-contract.ejs
@@ -0,0 +1,41 @@
+<% /* 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. */ %><p>A support contract gives you free upgrades and help directly from the engineers who developed EtherPad. Support contracts cost US $<%= dollars(costPerUser * supportCostPct/100) %> per user per year, with a US $<%= dollars(supportMinCost) %> per year minimum. <a target="_blank" href="/ep/about/pricing-eepnet-support">Learn more about support contracts</a>.</p>
+
+<p>For the <%= cart.numUsers %>-user license you've selected, a support contract costs US $<%= discountedSupportCost() !== undefined ? dollars(discountedSupportCost()) : dollars(supportCost()) %>.
+
+<p>Do you want a support contract?</p>
+
+<table>
+ <tr>
+ <td>
+ <input id="r1" type="radio" name="supportContract" value="true"
+ <%= (cart.supportContract == "true") ? "checked" : "" %> />
+ </td>
+ <td>
+ <label for="r1">Yes, I want to purchase a support contract.</label>
+ </td>
+ </tr>
+
+ <tr>
+ <td>
+ <input id="r2" type="radio" name="supportContract" value="false"
+ <%= (cart.supportContract != "true")? "checked" : "" %> />
+ </td>
+ <td>
+ <label for="r2">
+ No thanks, I just want the software license.
+ </label>
+ </td>
+ </tr>
+</table> \ No newline at end of file
diff --git a/trunk/etherpad/src/templates/store/eepnet_download.ejs b/trunk/etherpad/src/templates/store/eepnet_download.ejs
new file mode 100644
index 0000000..42c89ee
--- /dev/null
+++ b/trunk/etherpad/src/templates/store/eepnet_download.ejs
@@ -0,0 +1,43 @@
+<% /* 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/store.css") %>
+<% helpers.includeJQuery() %>
+<% helpers.includeJs("store.js") %>
+
+<div class="fpcontent storepage" id="downloadpage">
+
+ <% if (message) { %>
+ <div id="topmsg">
+ <%= message %>
+ </div>
+ <% } %>
+
+ <h2>Download EtherPad Private Network Edition:</h2>
+
+ <br/><br/>
+ <center>
+ <input id="license_agree" type="checkbox" />
+ <label id="license_agree_label"
+ for="license_agree" style="font-size: 1.2em;">
+ Agree to the <a target="_blank" href="/static/html/eepnet/eepnet-eval-license.html">License</a>
+ </label>
+
+ <a class="downloadbutton_disabled" href="javascript:store.mustAgree();">
+ Download Now
+ </a>
+ <h3>Version: <%= versionString %></h3><br/>
+
+ </center>
+
+
+</div>
diff --git a/trunk/etherpad/src/templates/store/eepnet_eval_nextsteps.ejs b/trunk/etherpad/src/templates/store/eepnet_eval_nextsteps.ejs
new file mode 100644
index 0000000..4c4cec4
--- /dev/null
+++ b/trunk/etherpad/src/templates/store/eepnet_eval_nextsteps.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. */ %><div class="fpcontent">
+ <h2>Downloading...</h2>
+
+ <p>Your download should begin automatically. If it does not, you
+ can click this link:</p>
+
+ <ul>
+ <li><a href="/ep/store/eepnet-download-zip">Download Now</a>
+ </li>
+ </ul>
+
+ <h2>Next Steps</h2>
+
+ <ul>
+ <li>Read the
+ <a href="/ep/pne-manual/">PNE System Administrator's
+ Manual</a>.</li>
+
+ <li>A license key was sent to you by email, which you will need to
+ run EtherPad PNE.</li>
+
+ </ul>
+
+</div>
+
+<iframe style="display: none;" width="0" height="0"
+ src="/ep/store/eepnet-download-zip"></iframe>
+
diff --git a/trunk/etherpad/src/templates/store/eepnet_eval_signup.ejs b/trunk/etherpad/src/templates/store/eepnet_eval_signup.ejs
new file mode 100644
index 0000000..5a1edf4
--- /dev/null
+++ b/trunk/etherpad/src/templates/store/eepnet_eval_signup.ejs
@@ -0,0 +1,125 @@
+<% /* 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("Sign up for EtherPad PNE Free Trial"); %>
+<% helpers.includeJQuery() %>
+<% helpers.includeJs("etherpad.js") %>
+<% helpers.includeJs("store.js") %>
+<% helpers.includeCss("store/store.css") %>
+
+<% function renderField(maxlen, id, title) {
+ var oldValue = (oldData[id] || "");
+ return DIV(P(LABEL({htmlFor: id}, title),
+ INPUT({maxlength: maxlen,
+ type: "text",
+ className: "signupData",
+ name: id,
+ id: id,
+ value: oldValue})));
+ }
+
+ function renderWebLeadField(name) {
+ return INPUT({type: 'hidden', name: name, id: "wl_"+name, value: ""});
+ }
+%>
+
+<div class="fpcontent storepage" id="eepnet_trial_signup_page">
+
+ <h2 id="toph2">Private Network Edition: <%= trialDays %>-Day Free Trial</h2>
+
+ <p>Enter your information here to download a free <%= trialDays
+ %>-day trial of EtherPad Private Network Edition.</p>
+
+ <div style="display: none;" id="errormsg">&nbsp;</div>
+
+ <div style="display: none;" id="processingmsg">
+ <img src="/static/img/misc/status-ball.gif" alt="" />
+ Processing, please wait...
+ </div>
+
+ <div id="dlsignup">
+
+ <form id="signupForm" method="post" action="<%= request.path %>">
+
+ <% /* note: these fields should match exactly the eepnet-pricingcontact
+ form in pricing_eepnet.ejs */ %>
+
+ <%= renderField(40, "firstName", "First Name:") %>
+ <%= renderField(80, "lastName", "Last Name:") %>
+ <%= renderField(80, "email", "Your Email (license key will be sent here):") %>
+ <%= renderField(40, "orgName", "Company/Organization:") %>
+
+ <p>
+ <label for="industry">Industry</label>
+ <select id="industry" name="industry">
+ <% sfIndustryList.forEach(function(i) { %>
+ <%= ((i == oldData.industry) ?
+ OPTION({value: toHTML(i), selected: true}, i) :
+ OPTION({value: toHTML(i)}, i)) %>
+ <% }); %>
+ </select>
+ </p>
+
+ <%= renderField(40, "jobTitle", "Your Title:") %>
+ <%= renderField(40, "phone", "Phone Number:") %>
+ <%= renderField(160, "estUsers", "Estimated number of users:") %>
+
+ </form>
+
+ <p><button id="submit" onclick="javascript: void store.eepnetTrial.submit();">Go To Download --&gt;</button></p>
+
+ </div>
+
+ <p>If you already have a license, you
+ can <a href="/ep/store/eepnet-download">skip directly to download</a>.</p>
+
+ <p>You can also <a href="/ep/store/eepnet-recover-license">recover a
+ lost license key</a>.</p>
+
+ <p>Questions? Email <%= helpers.oemail("sales") %>.</p>
+
+</div>
+
+<form id="wlform"
+ method="post"
+ target="wltarget"
+ action="<%= request.scheme %>://www.salesforce.com/servlet/servlet.WebToLead?encoding=UTF-8"
+>
+
+ <input type="hidden" name="retURL" value="<%= request.scheme %>://<%= request.host %>/ep/store/salesforce-web2lead-ok" />
+
+ <% [
+ "oid",
+ "first_name",
+ "last_name",
+ "email",
+ "company",
+ "title",
+ "phone",
+ "00N80000003FYtG",
+ "00N80000003FYto",
+ "00N80000003FYuI",
+ "lead_source",
+ "industry"
+ ].forEach(function(f) { %>
+
+ <%= renderWebLeadField(f) %>
+
+ <% }); %>
+
+</form>
+
+<iframe style="width: 1px; height: 1px; border: 0;"
+ name="wltarget"
+ id="wltarget"
+ src="about:blank"></iframe>
+