diff options
author | Egil Moeller <egil.moller@freecode.no> | 2010-04-04 20:23:12 +0200 |
---|---|---|
committer | Egil Moeller <egil.moller@freecode.no> | 2010-04-04 20:23:12 +0200 |
commit | ea4340f31dab4c6af7632dfc348ea9dfab2799eb (patch) | |
tree | 18b746564194b201487f097928b94f3e3f96daba | |
parent | 5e5e8640ff6757a059025adb3f5d6dc95dcc22a5 (diff) | |
parent | 0c4322daa175fd81cf3f9aaa5b7c912c70be3f7d (diff) | |
download | etherpad-ea4340f31dab4c6af7632dfc348ea9dfab2799eb.tar.gz etherpad-ea4340f31dab4c6af7632dfc348ea9dfab2799eb.tar.xz etherpad-ea4340f31dab4c6af7632dfc348ea9dfab2799eb.zip |
Merge branch 'master' of git://github.com/Pita/pad
76 files changed, 1050 insertions, 2531 deletions
diff --git a/build/apt/.gitignore b/build/apt/.gitignore new file mode 100644 index 0000000..50139f0 --- /dev/null +++ b/build/apt/.gitignore @@ -0,0 +1,5 @@ +*~ +.tmp* +.build* +.package* +.revision* diff --git a/build/apt/DEBIAN/control b/build/apt/DEBIAN/control new file mode 100644 index 0000000..0129652 --- /dev/null +++ b/build/apt/DEBIAN/control @@ -0,0 +1,16 @@ +Package: etherpad-%BRANCH% +Priority: optional +Section: web +Maintainer: penSec.IT UG (haftungsbeschränkt) <etherpad@pensec.it> +Architecture: all +Version: 1.0-%REVISION% +Depends: debconf (>= 0.2.17), sun-java6-jre, scala, mysql-server, mysql-client, libmysql-java, bash +Description: Etherpad is... + EtherPad is the only web-based word processor that allows people to work + together in really real-time. + . + When multiple people edit the same document simultaneously, any changes are + instantly reflected on everyone's screen. The result is a new and productive + way to collaborate on text documents, useful for meeting notes, drafting + sessions, education, team programming, and more. + diff --git a/build/apt/DEBIAN/postinst b/build/apt/DEBIAN/postinst new file mode 100755 index 0000000..f872508 --- /dev/null +++ b/build/apt/DEBIAN/postinst @@ -0,0 +1,143 @@ +#!/bin/bash + +################################################################################ +# +# Copyright (c) 2010 penSec.IT UG (haftungsbeschränkt) +# http://www.pensec.it +# mail@pensec.it +# +# 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. +# +################################################################################ + + + +set -e +. /usr/share/debconf/confmodule + +if [ -n "$ETHERPAD_DEBUG" ]; then + echo "now debugging $0 $@" + set -x +fi + +db_version 2.0 + + + + + +##### +# +# Propts the user for a configuration value and writes it into a property file +# +# @param $1 Name of the debconfig template to prompt +# @param $2 File to write the answer to +# @param $3 deprecated +# +function configuration_property() { + TEMPLATE="${1}" + PROPERTY_FILE="/etc/etherpad/properties/${2}" + PLACEHOLDER="${3}" + + PROPERTY="" + if [ -f "${PROPERTY_FILE}" ]; then + PROPERTY=`cat "${PROPERTY_FILE}"` + fi + db_input high "etherpad-%BRANCH%/${TEMPLATE}" || true + db_go + + db_get "etherpad-%BRANCH%/${TEMPLATE}" + if [ "" != "$RET" ]; then + PROPERTY="$RET" + fi + + echo "${PROPERTY}" > "${PROPERTY_FILE}" +} +# +##### + + + +case "$1" in + + configure) + + # Create system user + if ! getent passwd etherpad > /dev/null ; then + echo 'Adding system-user for etherpad' 1>&2 + adduser --system --group --quiet \ + --home /usr/share/etherpad --no-create-home \ + --disabled-login --force-badname etherpad + fi + + + # Give user the rights to write into the log & data directory + if [ -d "/var/log/etherpad" ]; then + EMPTY_STATEMENT="true" + else + mkdir -p "/var/log/etherpad" + fi + chown -R etherpad:etherpad "/var/log/etherpad" + + if [ -d "/usr/share/etherpad/etherpad/data" ]; then + EMPTY_STATEMENT="true" + else + mkdir -p "/usr/share/etherpad/etherpad/data" + fi + chown -R etherpad:etherpad "/usr/share/etherpad/etherpad/data" + + + # Give user the rights do write everywhere, did not yet figure + # out which rights are necessary, exactly + chown -R etherpad:etherpad "/usr/share/etherpad" + ;; + +esac + + + +##### +# +# Get configuration properties +# +configuration_property "is_production" "is-production" "IS_PRODUCTION" +configuration_property "admin_password" "admin-password" "ADMIN_PASSWORD" +configuration_property "port" "port" "PORT" +configuration_property "database_host" "database-host" "DATABASE_HOST" +configuration_property "database_port" "database-port" "DATABASE_PORT" +configuration_property "database_name" "database-name" "DATABASE_NAME" +configuration_property "database_username" "database-username" "DATABASE_USERNAME" +configuration_property "database_password" "database-password" "DATABASE_PASSWORD" +# +##### + + + + + +##### +# +# MySQL-Autosetup should be discussed. Simply calling setup-myql-db.sh is +# insufficient +# +# # Auto-setup database +# db_input medium "etherpad-%BRANCH%/setup_database" || true +# db_go +# +# db_get "etherpad-%BRANCH%/setup_database" +# if [ "$RET" = "true" ]; then +# # TODO +# fi +# +##### + diff --git a/build/apt/DEBIAN/prerm b/build/apt/DEBIAN/prerm new file mode 100755 index 0000000..9a9f516 --- /dev/null +++ b/build/apt/DEBIAN/prerm @@ -0,0 +1,30 @@ +#!/bin/sh + +################################################################################ +# +# Copyright (c) 2010 penSec.IT UG (haftungsbeschränkt) +# http://www.pensec.it +# mail@pensec.it +# +# 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. +# +################################################################################ + + + +set -e + +# Remove log+data directories, otherwise uninstall will fail +rm -rf /var/log/etherpad +rm -rf /usr/share/etherpad/etherpad/data + diff --git a/build/apt/DEBIAN/templates b/build/apt/DEBIAN/templates new file mode 100644 index 0000000..d7c6f36 --- /dev/null +++ b/build/apt/DEBIAN/templates @@ -0,0 +1,68 @@ +Template: etherpad-%BRANCH%/is_production +Type: boolean +Default: false +Description: Install as production mode? + Do you wish to install etherpad in production mode? + . + Note: be aware that etherpad is under active development and not yet ready + for general deployment! + +Template: etherpad-%BRANCH%/admin_password +Type: password +Default: password +Description: etherpad administration password + Please insert the administration password, default is password. + +Template: etherpad-%BRANCH%/port +Type: string +Default: 9000 +Description: etherpad tcp port + Please insert the port on which etherpad should listen, default is 9000. You + cannot use privileged ports (<= 1024). + . + If you want to make etherpad available on port 80/443 use etherpad-proxy which + will install a webserver (like nginx or apache) to proxy dynamic etherpad + contents and serve static contents directly. + +Template: etherpad-%BRANCH%/setup_database +Type: boolean +Default: false +Description: Do yo want etherpad to create a database for you? + Do you want to use the database wizard to setup a database for etherpad to + use? + . + Note: This wizard only works with local mysql installations. If you want to use + a remote mysql database, then answer no and edit + /etc/etherpad/etherpad.properties appropriatly. + +Template: etherpad-%BRANCH%/database_host +Type: string +Default: localhost +Description: MySQL database hostname + Please insert the database hostname, default is localhost. + +Template: etherpad-%BRANCH%/database_port +Type: string +Default: 3306 +Description: MySQL database port + Please insert the database port, default is 3306. + +Template: etherpad-%BRANCH%/database_name +Type: string +Default: etherpad +Description: MySQL database name + Please insert the database name, default is etherpad. + +Template: etherpad-%BRANCH%/database_username +Type: string +Default: etherpad +Description: MySQL database username + Please insert the database username, default is etherpad. + +Template: etherpad-%BRANCH%/database_password +Type: password +Default: password +Description: MySQL database password + Please insert the password for the specified database user, default is + password. + diff --git a/build/apt/README b/build/apt/README new file mode 100644 index 0000000..7dba49b --- /dev/null +++ b/build/apt/README @@ -0,0 +1,25 @@ +README +====== + +This is a simple script to build debian packages from different etherpad +repositories. All you have to do is call ./do.sh and select the repository to +build from. + +Depending on the repository you use you have to have installed mercurial or +git-core in addition to the following packages: + + * debconf (>= 0.2.17) + * dpkg + * sun-java6-jdk + * scala + * mysql-client + * libmysql-java + * bash + + + +--- + +If you need commercial support on etherpad don't hesitate to contact +mail@pensec.it + diff --git a/build/apt/TODO b/build/apt/TODO new file mode 100644 index 0000000..9389c82 --- /dev/null +++ b/build/apt/TODO @@ -0,0 +1,7 @@ +TODO +==== + + * Auto-Database setup + * etherpad-official replaces etherpad-deprecated and etherpad-devel (and vice- + versa) + diff --git a/build/apt/build/build.sh b/build/apt/build/build.sh new file mode 100755 index 0000000..ce308bb --- /dev/null +++ b/build/apt/build/build.sh @@ -0,0 +1,236 @@ +#!/bin/bash + +################################################################################ +# +# Copyright (c) 2010 penSec.IT UG (haftungsbeschränkt) +# http://www.pensec.it +# mail@pensec.it +# +# 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. +# +################################################################################ + + + +##### +# Build a Debian/Ubuntu Etherpad package of the source +# +# @param $1 (optional) If "${1}" == "rebuild" then the cached repository will be +# purged and cloned instead of simply updated +# @param $REPOSITORY_URL the source of the package +# @param $REPOSITORY_NAME name of the new package, package will be named +# etherpad-${REPOSITORY_NAME} +# @param $REPOSITORY_TYPE Element of set {hg, git}, describes which command line +# toolchain (mercurial or git) will be used +# +if [ "" == "${REPOSITORY_URL}" ]; then + echo "Missing environment variable REPOSITORY_URL" + exit 1 +fi +if [ "" == "${REPOSITORY_NAME}" ]; then + echo "Missing environment variable REPOSITORY_NAME" + exit 1 +fi +if [ "" == "${REPOSITORY_TYPE}" ]; then + echo "Missing environment variable REPOSITORY_TYPE" + exit 1 +fi + + + +##### +# You have to change following lines to your requirements: +# +export JAVA_HOME=/usr/lib/jvm/java-6-sun/ +export SCALA_HOME=/usr/share/java +export MYSQL_CONNECTOR_JAR=/usr/share/java/mysql-connector-java.jar +export JAVA="$JAVA_HOME/bin/java" +export SCALA="$SCALA_HOME/bin/scala" +export PATH="$JAVA_HOME/bin:$SCALA_HOME/bin:$PATH" +# +##### + + +##### +# Don't change this! +# +REPOSITORY="${REPOSITORY_URL}" +BRANCH="${REPOSITORY_NAME}" + +TMP_DIR=".tmp.${REPOSITORY_NAME}" +BUILD_DIR=".build.${REPOSITORY_NAME}" +PACKAGE_DIR=".package.${REPOSITORY_NAME}" +REVISION_FILE=".revision.${REPOSITORY_NAME}" + +REBUILD="no" +if [ "rebuild" == "${1}" ]; then + REBUILD="yes" +fi +# +##### + + + +# If the repository isn't checked out by now we can't do a simple {git|hg} pull, +# we need to do a complete {git|hg} clone instead +if [ "yes" != "${REBUILD}" ]; then + if [ -d "${TMP_DIR}" ]; then + bash -c "cd ${TMP_DIR}; ${REPOSITORY_TYPE} pull" + else + echo "Repository does not exist, will fetch" + REBUILD="yes" + fi +fi + +# Refresh the complett repository (purge & clone instead of pull) +if [ "yes" == "${REBUILD}" ]; then + if [ -d "${TMP_DIR}" ]; then + rm -rf "${TMP_DIR}" + fi + + # Fetch the source from remote endpoint + $REPOSITORY_TYPE clone "${REPOSITORY}" "${TMP_DIR}" +fi + + + +# If there where errors during {git,hg} clone, then ${TMP_DIR} does not exist +# and we can't continue +if [ -d "${TMP_DIR}" ]; then + echo "Checkout seesm successful, continuing..." +else + echo "Error while checkout, missing directory ${TMP_DIR}" + exit 1 +fi + +# Ugly fix to work with the google repository which includes a trunk and +# branches directory instead of using mercurial branches +if [ -d "${TMP_DIR}/trunk" ]; then + touch "${TMP_DIR}/LICENSE" + touch "${TMP_DIR}/README.md" + bash -c "cd ${TMP_DIR}; cp -r trunk/* ./" +fi + + + +# Rebuild jar +echo "" +echo "Trying to apply patch. If it detects the patch doesn't match just skip" +echo "" +cp "build/makejar.diff" "${TMP_DIR}/makejar.diff" +bash -c "cd ${TMP_DIR}; patch -p1 < makejar.diff" +bash -c "cd ${TMP_DIR}/infrastructure; ./bin/makejar.sh" +bash -c "cd ${TMP_DIR}/infrastructure/ace; bin/make normal etherpad" +cp "${TMP_DIR}/infrastructure/build/appjet.jar" "${TMP_DIR}/etherpad/appjet-eth-dev.jar" + + + +# Testing the build +#bash -c "./build/test-build.sh" + + + +# Increments the version & create the control file +REVISION="0" +if [ -f "${REVISION_FILE}" ]; then + REVISION=`cat "${REVISION_FILE}"` + REVISION=`expr $REVISION + 1` +fi +echo $REVISION > "${REVISION_FILE}" + +# Patch the debain control file +cp "DEBIAN/control" "${TMP_DIR}/control.0" +sed "s/%BRANCH%/${BRANCH}/" "${TMP_DIR}/control.0" > "${TMP_DIR}/control.1" +sed "s/%REVISION%/${REVISION}/" "${TMP_DIR}/control.1" > "${TMP_DIR}/control.2" +cp "${TMP_DIR}/control.2" "${TMP_DIR}/control" + +# Patch the install & deinstall script +cp "DEBIAN/prerm" "${TMP_DIR}/prerm" +cp "DEBIAN/postinst" "${TMP_DIR}/postinst.0" +sed "s/%BRANCH%/${BRANCH}/" "${TMP_DIR}/postinst.0" > "${TMP_DIR}/postinst.1" +cp "${TMP_DIR}/postinst.1" "${TMP_DIR}/postinst" + +# Patch debconf templates +cp "DEBIAN/templates" "${TMP_DIR}/templates.0" +sed "s/%BRANCH%/${BRANCH}/" "${TMP_DIR}/templates.0" > "${TMP_DIR}/templates.1" +cp "${TMP_DIR}/templates.1" "${TMP_DIR}/templates" + +# Patch init script +cp "etc/init.d/etherpad" "${TMP_DIR}/init.0" +sed "s/%BRANCH%/${BRANCH}/" "${TMP_DIR}/init.0" > "${TMP_DIR}/init.1" +cp "${TMP_DIR}/init.1" "${TMP_DIR}/init" + +# Copy the config folder +cp -r "etc" "${TMP_DIR}/etc" + + + +# Build the package enviroment (needed to build with dpgk-deb build) +if [ -d "${BUILD_DIR}" ]; then + sudo rm -r "${BUILD_DIR}" +fi +mkdir "${BUILD_DIR}" +mkdir -p "${BUILD_DIR}/DEBIAN" +mkdir -p "${BUILD_DIR}/usr/share/etherpad" +mkdir -p "${BUILD_DIR}/usr/share/doc/etherpad" +mkdir -p "${BUILD_DIR}/var/log/etherpad" + + + +# Gather the required files +cp "${TMP_DIR}/control" "${BUILD_DIR}/DEBIAN/control" +cp "${TMP_DIR}/postinst" "${BUILD_DIR}/DEBIAN/postinst" +cp "${TMP_DIR}/prerm" "${BUILD_DIR}/DEBIAN/prerm" +cp "${TMP_DIR}/templates" "${BUILD_DIR}/DEBIAN/templates" +cp -r "${TMP_DIR}/etc" "${BUILD_DIR}/" +cp "${TMP_DIR}/init" "${BUILD_DIR}/etc/init.d/etherpad" +cp -r "${TMP_DIR}/etherpad" "${BUILD_DIR}/usr/share/etherpad" +cp "build/run.sh" "${BUILD_DIR}/usr/share/etherpad/etherpad/bin" +mkdir -p "${BUILD_DIR}/usr/share/etherpad/etherpad/data" +cp -r "${TMP_DIR}/infrastructure" "${BUILD_DIR}/usr/share/etherpad" +cp "${TMP_DIR}/COPYING" "${BUILD_DIR}/usr/share/doc/etherpad" +cp "${TMP_DIR}/LICENSE" "${BUILD_DIR}/usr/share/doc/etherpad" +cp "${TMP_DIR}/README.md" "${BUILD_DIR}/usr/share/doc/etherpad" + + + +# Fix priviliges and build the package +sudo chown -R root:root "${BUILD_DIR}" +sudo chmod +x "${BUILD_DIR}/DEBIAN/postinst" +sudo chmod +x "${BUILD_DIR}/DEBIAN/prerm" +sudo chmod +x "${BUILD_DIR}/etc/init.d/etherpad" +sudo chmod -R 777 "${BUILD_DIR}/usr/share/etherpad/etherpad/data" + +if [ -d "${PACKAGE_DIR}" ]; then + rm -rf "${PACKAGE_DIR}" +fi +mkdir "${PACKAGE_DIR}" + +dpkg-deb --build "${BUILD_DIR}" "${PACKAGE_DIR}" + + + +# Transfer the package to local repository if environment variable +PACKAGE=`bash -c "cd ${PACKAGE_DIR}; find . -name *.deb"` + +if [ "yes" == "${DEPLOY_TO_LOCAL_REPOSITORY}" ]; then + if [ -f "${PACKAGE_DIR}/${PACKAGE}" ]; then + cp "${PACKAGE_DIR}/${PACKAGE}" "/var/www/packages" + bash -c "cd /var/www/packages; reprepro -b . includedeb lenny ${PACKAGE}; rm ${PACKAGE}" + else + echo "No package in ${PACKAGE_DIR}" + fi +fi + +echo "Finished building package ${PACKAGE}" + diff --git a/build/apt/build/makejar.diff b/build/apt/build/makejar.diff new file mode 100644 index 0000000..6e0d44e --- /dev/null +++ b/build/apt/build/makejar.diff @@ -0,0 +1,17 @@ +diff -r 81287c8af1ac infrastructure/bin/makejar.sh +--- a/infrastructure/bin/makejar.sh Fri Dec 18 18:44:23 2009 +1100 ++++ b/infrastructure/bin/makejar.sh Sat Dec 19 09:50:05 2009 -0500 +@@ -32,11 +32,11 @@ + + TMPSTORE=/tmp/ajbuild-tmpstore-`date +%s` + +-JARFILES=`echo $SCALA_HOME/lib/scala-library.jar lib/*.jar lib/manifest` ++JARFILES=`echo $SCALA_HOME/scala-library.jar lib/*.jar lib/manifest` + function genjar { + echo "unzipping JARs..." + pushd $1 >> /dev/null +- $JAR xf $SCALA_HOME/lib/scala-library.jar ++ $JAR xf $SCALA_HOME/scala-library.jar + rm -rf META-INF + for a in ../../lib/*.jar; do + $JAR xf $a diff --git a/build/apt/build/run.sh b/build/apt/build/run.sh new file mode 100755 index 0000000..1aa3954 --- /dev/null +++ b/build/apt/build/run.sh @@ -0,0 +1,28 @@ +#!/bin/bash + +################################################################################ +# +# Copyright (c) 2010 penSec.IT UG (haftungsbeschränkt) +# http://www.pensec.it +# mail@pensec.it +# +# 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. +# +################################################################################ + + + + + +bash -c "`dirname $0`/run-local.sh" > "/var/log/etherpad/log" 2> "/var/log/etherpad/error" + diff --git a/build/apt/build/test.sh b/build/apt/build/test.sh new file mode 100755 index 0000000..0abf7bf --- /dev/null +++ b/build/apt/build/test.sh @@ -0,0 +1,52 @@ +#!/bin/bash + +################################################################################ +# +# Copyright (c) 2010 penSec.IT UG (haftungsbeschränkt) +# http://www.pensec.it +# mail@pensec.it +# +# 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. +# +################################################################################ + + + + + +##### +# Must be called by build.sh +##### + + + +# Truncate database to test start etherpad +echo "I'm going to lunch MySQL now, you maybe have to enter your root@localhost password" +sudo /etc/init.d/mysql start + +DATABASE_NAME="etherpad" +DATABASE_USER="etherpad" +DROP_DATABASE="DROP DATABASE ${DATABASE_NAME}" +CREATE_DATABASE="CREATE DATABASE ${DATABASE_NAME}" +DROP_USER="DROP USER '${DATABASE_USER}'@'localhost'" +CREATE_USER="GRANT ALL PRIVILEGES ON ${DATABASE_NAME}.* TO '${DATABASE_USER}'@'localhost' identified by 'password';" +echo "${DROP_DATABASE}; ${CREATE_DATABASE}; ${DROP_USER}; ${CREATE_USER}" | mysql -u root -p | grep etherpad + + + +# Start etherpad and wait for the HTTP-Server to be available +echo "I'm going to lunch etherpad in a clean environment, try if it works on http://localhost:9000/" +echo "Kill with ^C to build debian package (waiting 10 seconds)" +sleep 10 +bash -c "cd ${TMP_DIR}/etherpad; ./bin/run-local.sh" + diff --git a/build/apt/do.sh b/build/apt/do.sh new file mode 100755 index 0000000..c268ce9 --- /dev/null +++ b/build/apt/do.sh @@ -0,0 +1,127 @@ +#!/bin/bash + +################################################################################ +# +# Copyright (c) 2010 penSec.IT UG (haftungsbeschränkt) +# http://www.pensec.it +# mail@pensec.it +# +# 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. +# +################################################################################ + + + +##### +# +# To build a Debian/Ubuntu package simply run this script. It will prompt you +# for the repository to build from. +# +# Dependencies: debconf (>= 0.2.17), dpkg, sun-java6-jdk, scala, mysql-client, +# libmysql-java, bash, mercurial | git-core +# +##### + + + +##### +# +# There has to be a better way of doing this ;-) +# +REPOSITORY_0_URL="https://etherpad.googlecode.com/hg/trunk" +REPOSITORY_0_NAME="deprecated" +REPOSITORY_0_TYPE="hg" +REPOSITORY_1_URL="git://github.com/ether/pad.git" +REPOSITORY_1_NAME="official" +REPOSITORY_1_TYPE="git" +REPOSITORY_2_URL="git://github.com/redhog/pad.git" +REPOSITORY_2_NAME="devel" +REPOSITORY_2_TYPE="git" +REPOSITORY_3_URL="git://github.com/johnyma22/pad.git" +REPOSITORY_3_NAME="johny" +REPOSITORY_3_TYPE="git" +REPOSITORY_4_URL="git://github.com/Pita/pad.git" +REPOSITORY_4_NAME="pita" +REPOSITORY_4_TYPE="git" +REPOSITORY_5_URL="./../../" +REPOSITORY_5_NAME="local" +REPOSITORY_5_TYPE="git" + + +# Tell the user his choises +echo "Please choose the repository to build a debian package from:" +echo "" + +for i in {0..5} +do + URL="REPOSITORY_${i}_URL" + NAME="REPOSITORY_${i}_NAME" + TYPE="REPOSITORY_${i}_TYPE" + + echo " ${i}) ${!NAME} ${!URL}" +done +echo "" +read -p "Repository id: " REPOSITORY + + + +# Test if user's too stupid to input correct number +URL="REPOSITORY_${REPOSITORY}_URL" +NAME="REPOSITORY_${REPOSITORY}_NAME" +TYPE="REPOSITORY_${REPOSITORY}_TYPE" + +if [ "" == "${!URL}" ]; then + echo "Invalid repository id \"${REPOSITORY}\"" + exit 1 +fi + + +# Communicate repository details to build script +export REPOSITORY_URL="${!URL}" +export REPOSITORY_NAME="${!NAME}" +export REPOSITORY_TYPE="${!TYPE}" +# +##### + + + +##### +# +# Is a complete rebuild necessary or is a simple update sufficient +# +echo "" +read -p "Purge before rebuild (yes/no) [n]: " REBUILD + +if [ "y" == "${REBUILD}" ]; then + echo "You answered \"${REBUILD}\", will purge before rebuilding" + REBUILD="rebuild" +else + echo "You answered \"${REBUILD}\", will try ${!TYPE} pull before rebuilding" +fi +# +##### + + + +##### +# +# Tell user what we're going to to and then do it +# +echo "" +echo "Will build package etherpad-${!NAME} form ${!TYPE}:${!URL}, please be patient..." +echo "" + +bash -c "./build/build.sh ${REBUILD}" +# +##### + diff --git a/build/apt/etc/etherpad/etherpad.properties b/build/apt/etc/etherpad/etherpad.properties new file mode 100644 index 0000000..69114c7 --- /dev/null +++ b/build/apt/etc/etherpad/etherpad.properties @@ -0,0 +1,16 @@ +ajstdlibHome = ../infrastructure/framework-src/modules +appjetHome = ./data/appjet +devMode = true +etherpad.adminPass = %ADMIN_PASSWORD% +etherpad.fakeProduction = false +etherpad.isProduction = %IS_PRODUCTION% +etherpad.SQL_JDBC_DRIVER = com.mysql.jdbc.Driver +etherpad.SQL_JDBC_URL = jdbc:mysql://%DATABASE_HOST%:%DATABASE_PORT%/%DATABASE_NAME% +etherpad.SQL_PASSWORD = %DATABASE_PASSWORD% +etherpad.SQL_USERNAME = %DATABASE_USERNAME% +listen = %PORT% +logDir = /var/log/etherpad +modulePath = ./src +transportPrefix = /comet +transportUseWildcardSubdomains = true +useVirtualFileRoot = ./src diff --git a/build/apt/etc/etherpad/properties/admin-password b/build/apt/etc/etherpad/properties/admin-password new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/build/apt/etc/etherpad/properties/admin-password diff --git a/build/apt/etc/etherpad/properties/database-host b/build/apt/etc/etherpad/properties/database-host new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/build/apt/etc/etherpad/properties/database-host diff --git a/build/apt/etc/etherpad/properties/database-name b/build/apt/etc/etherpad/properties/database-name new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/build/apt/etc/etherpad/properties/database-name diff --git a/build/apt/etc/etherpad/properties/database-password b/build/apt/etc/etherpad/properties/database-password new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/build/apt/etc/etherpad/properties/database-password diff --git a/build/apt/etc/etherpad/properties/database-port b/build/apt/etc/etherpad/properties/database-port new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/build/apt/etc/etherpad/properties/database-port diff --git a/build/apt/etc/etherpad/properties/database-username b/build/apt/etc/etherpad/properties/database-username new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/build/apt/etc/etherpad/properties/database-username diff --git a/build/apt/etc/etherpad/properties/is-production b/build/apt/etc/etherpad/properties/is-production new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/build/apt/etc/etherpad/properties/is-production diff --git a/build/apt/etc/etherpad/properties/port b/build/apt/etc/etherpad/properties/port new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/build/apt/etc/etherpad/properties/port diff --git a/build/apt/etc/init.d/etherpad b/build/apt/etc/init.d/etherpad new file mode 100755 index 0000000..95847b8 --- /dev/null +++ b/build/apt/etc/init.d/etherpad @@ -0,0 +1,235 @@ +#! /bin/bash + +### BEGIN INIT INFO +# Provides: etherpad-%BRANCH% +# Required-Start: $local_fs $remote_fs +# Required-Stop: $local_fs $remote_fs +# Default-Start: 2 3 4 5 +# Default-Stop: S 0 1 6 +# Short-Description: etherpad initscript +# Description: EtherPad is the only web-based word processor that allows +# people to work together in really real-time. +# . +# When multiple people edit the same document simultaneously, +# any changes are instantly reflected on everyone's screen. +# The result is a new and productive way to collaborate on +# text documents, useful for meeting notes, drafting +# sessions, education, team programming, and more. +### END INIT INFO + +# Author: penSec.IT UG (haftungsbeschränkt) <mail@pensec.it> + +################################################################################ +# +# Copyright (c) 2010 penSec.IT UG (haftungsbeschränkt) +# http://www.pensec.it +# mail@pensec.it +# +# 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. +# +################################################################################ + +# Do NOT "set -e" + + + +##### +# +# Patches the configuration file by replacing ,,%$2%'' with the contents of file +# $1 in file $3 +# +# @param $1 Configuration File which contains the value to set to +# @param $2 Configuration key to apply (can be done only once) +# @param $3 Configuration file +# +function apply_config() { + CONFIG_FILE="${3}" + TMP_FILE="/tmp/etherpad.properties" + + CONFIG_KEY="$2" + CONFIG_VALUE=`cat $1` + + sed "s/%$CONFIG_KEY%/$CONFIG_VALUE/" $CONFIG_FILE > $TMP_FILE + cp $TMP_FILE $CONFIG_FILE + rm $TMP_FILE +} +# +##### + + + + + +# PATH should only include /usr/* if it runs after the mountnfs.sh script +PATH=/usr/sbin:/usr/bin:/sbin:/bin +DESC="etherpad daemon" +NAME="etherpad" +DAEMON_BASE="/usr/share/etherpad/etherpad" +DAEMON=$DAEMON_BASE/bin/run.sh +DAEMON_ARGS="" +PIDFILE=/var/run/$NAME.pid +SCRIPTNAME=/etc/init.d/$NAME + +# Exit if the package is not installed +[ -x "$DAEMON" ] || exit 0 + +# Read configuration variable file if it is present +[ -r /etc/default/$NAME ] && . /etc/default/$NAME + +# Load the VERBOSE setting and other rcS variables +[ -f /etc/default/rcS ] && . /etc/default/rcS + +# Define LSB log_* functions. +# Depend on lsb-base (>= 3.0-6) to ensure that this file is present. +. /lib/lsb/init-functions + +# +# Function that starts the daemon/service +# +do_start() +{ + CONFIGURATION_BASE="/etc/etherpad" + CONFIGURATION_SRC="${CONFIGURATION_BASE}/etherpad.properties" + CONFIGURATION_DEST="${DAEMON_BASE}/etc/etherpad.localdev-default.properties" + + + # Reset configuration + cp "${CONFIGURATION_BASE}/etherpad.properties" "${CONFIGURATION_DEST}" + + + # Apply configuration properties + apply_config "${CONFIGURATION_BASE}/properties/is-production" "IS_PRODUCTION" "${CONFIGURATION_DEST}" + apply_config "${CONFIGURATION_BASE}/properties/admin-password" "ADMIN_PASSWORD" "${CONFIGURATION_DEST}" + apply_config "${CONFIGURATION_BASE}/properties/port" "PORT" "${CONFIGURATION_DEST}" + apply_config "${CONFIGURATION_BASE}/properties/database-host" "DATABASE_HOST" "${CONFIGURATION_DEST}" + apply_config "${CONFIGURATION_BASE}/properties/database-port" "DATABASE_PORT" "${CONFIGURATION_DEST}" + apply_config "${CONFIGURATION_BASE}/properties/database-name" "DATABASE_NAME" "${CONFIGURATION_DEST}" + apply_config "${CONFIGURATION_BASE}/properties/database-username" "DATABASE_USERNAME" "${CONFIGURATION_DEST}" + apply_config "${CONFIGURATION_BASE}/properties/database-password" "DATABASE_PASSWORD" "${CONFIGURATION_DEST}" + + + # Give the etherpad user the configuration file + chown etherpad:etherpad "${CONFIGURATION_DEST}" + + + + # Return + # 0 if daemon has been started + # 1 if daemon was already running + # 2 if daemon could not be started + start-stop-daemon --background --chdir $DAEMON_BASE --chuid etherpad:etherpad --start --quiet --make-pidfile --pidfile $PIDFILE --exec $DAEMON --test \ + || return 1 + start-stop-daemon --background --chdir $DAEMON_BASE --chuid etherpad:etherpad --start --quiet --make-pidfile --pidfile $PIDFILE --exec $DAEMON -- \ + $DAEMON_ARGS \ + || return 2 + # Add code here, if necessary, that waits for the process to be ready + # to handle requests from services started subsequently which depend + # on this one. As a last resort, sleep for some time. +} + +# +# Function that stops the daemon/service +# +do_stop() +{ + # Return + # 0 if daemon has been stopped + # 1 if daemon was already stopped + # 2 if daemon could not be stopped + # other if a failure occurred + start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 --pidfile $PIDFILE --name $NAME + RETVAL="$?" + [ "$RETVAL" = 2 ] && return 2 + # Wait for children to finish too if this is a daemon that forks + # and if the daemon is only ever run from this initscript. + # If the above conditions are not satisfied then add some other code + # that waits for the process to drop all resources that could be + # needed by services started subsequently. A last resort is to + # sleep for some time. + start-stop-daemon --stop --quiet --oknodo --retry=0/30/KILL/5 --exec $DAEMON + [ "$?" = 2 ] && return 2 + # Many daemons don't delete their pidfiles when they exit. + rm -f $PIDFILE + return "$RETVAL" +} + +# +# Function that sends a SIGHUP to the daemon/service +# +do_reload() { + # + # If the daemon can reload its configuration without + # restarting (for example, when it is sent a SIGHUP), + # then implement that here. + # + start-stop-daemon --stop --signal 1 --quiet --pidfile $PIDFILE --name $NAME + return 0 +} + +case "$1" in + start) + [ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC" "$NAME" + do_start + case "$?" in + 0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;; + 2) [ "$VERBOSE" != no ] && log_end_msg 1 ;; + esac + ;; + stop) + [ "$VERBOSE" != no ] && log_daemon_msg "Stopping $DESC" "$NAME" + do_stop + case "$?" in + 0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;; + 2) [ "$VERBOSE" != no ] && log_end_msg 1 ;; + esac + ;; + #reload|force-reload) + # + # If do_reload() is not implemented then leave this commented out + # and leave 'force-reload' as an alias for 'restart'. + # + #log_daemon_msg "Reloading $DESC" "$NAME" + #do_reload + #log_end_msg $? + #;; + restart|force-reload) + # + # If the "reload" option is implemented then remove the + # 'force-reload' alias + # + log_daemon_msg "Restarting $DESC" "$NAME" + do_stop + case "$?" in + 0|1) + do_start + case "$?" in + 0) log_end_msg 0 ;; + 1) log_end_msg 1 ;; # Old process is still running + *) log_end_msg 1 ;; # Failed to start + esac + ;; + *) + # Failed to stop + log_end_msg 1 + ;; + esac + ;; + *) + #echo "Usage: $SCRIPTNAME {start|stop|restart|reload|force-reload}" >&2 + echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload}" >&2 + exit 3 + ;; +esac + +: + diff --git a/etherpad/etc/etherpad.localdev-default.properties b/etherpad/etc/etherpad.localdev-default.properties index 26bc8e5..97f420f 100644 --- a/etherpad/etc/etherpad.localdev-default.properties +++ b/etherpad/etc/etherpad.localdev-default.properties @@ -8,6 +8,7 @@ etherpad.SQL_JDBC_DRIVER = com.mysql.jdbc.Driver etherpad.SQL_JDBC_URL = jdbc:mysql://localhost:3306/etherpad etherpad.SQL_PASSWORD = password etherpad.SQL_USERNAME = etherpad +etherpad.proAccounts = true listen = 9000 logDir = ./data/logs modulePath = ./src diff --git a/etherpad/src/etherpad/globals.js b/etherpad/src/etherpad/globals.js index 343a989..53a3f95 100644 --- a/etherpad/src/etherpad/globals.js +++ b/etherpad/src/etherpad/globals.js @@ -1,5 +1,6 @@ /** * Copyright 2009 Google Inc. + * Copyright 2010 Pita, Peter Martischka <petermartischka@googlemail.com> * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -26,6 +27,11 @@ function isProduction() { return (appjet.config['etherpad.isProduction'] == "true"); } +function isProAccountEnabled() { + return (appjet.config['etherpad.proAccounts'] == "true"); +} + + var SUPERDOMAINS = { 'localbox.info': true, 'localhost': true, diff --git a/etherpad/src/etherpad/pro/pro_utils.js b/etherpad/src/etherpad/pro/pro_utils.js index 787f424..c9874f0 100644 --- a/etherpad/src/etherpad/pro/pro_utils.js +++ b/etherpad/src/etherpad/pro/pro_utils.js @@ -1,5 +1,6 @@ /** * Copyright 2009 Google Inc. + * Copyright 2010 Pita, Peter Martischka <petermartischka@googlemail.com> * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -54,7 +55,9 @@ function getRequestSuperdomain() { } function isProDomainRequest() { - // the result of this function never changes within the same request. + if(!isProAccountEnabled()) + return false; + // the result of this function never changes within the same request. var c = appjet.requestCache; if (c.isProDomainRequest === undefined) { c.isProDomainRequest = _computeIsProDomainRequest(); diff --git a/etherpad/src/plugins/twitterStyleTags/controllers/tagBrowser.js b/etherpad/src/plugins/twitterStyleTags/controllers/tagBrowser.js index eb42b10..793067d 100644 --- a/etherpad/src/plugins/twitterStyleTags/controllers/tagBrowser.js +++ b/etherpad/src/plugins/twitterStyleTags/controllers/tagBrowser.js @@ -1,5 +1,6 @@ /** * Copyright 2009 RedHog, Egil Möller <egil.moller@piratpartiet.se> + * Copyright 2010 Pita, Peter Martischka <petermartischka@googlemail.com> * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -179,6 +180,7 @@ function newTagsSql(querySql) { 'where ' + ' tp.TAG_ID = t.ID ' + ' and tp.PAD_ID in %(query_post_table)s ' + + ' and tp.PAD_ID NOT LIKE \'%$%\'' + 'group by t.NAME, tn.total ' + 'having ' + ' count(tp.PAD_ID) > 0 and count(tp.PAD_ID) < tn.total ' + @@ -210,7 +212,7 @@ function onRequest() { var queryNewTagsSql = newTagsSql(querySql); var newTags = sqlobj.executeRaw(queryNewTagsSql.sql, queryNewTagsSql.params); - /* Select the 10 last changed matching pads and some extra information on them. */ + /* Select the 10 last changed matching pads and some extra information on them. Except the Pro Pads*/ var sql = '' + 'select ' + ' m.id as ID, ' + @@ -222,6 +224,8 @@ function onRequest() { ' m.id = q.ID ' + ' join PAD_TAG_CACHE as c on ' + ' c.PAD_ID = q.ID ' + + 'where ' + + ' m.id NOT LIKE \'%$%\'' + 'order by ' + ' m.lastWriteTime desc ' + 'limit 10'; diff --git a/etherpad/src/plugins/twitterStyleTags/static/css/tagBrowser.css b/etherpad/src/plugins/twitterStyleTags/static/css/tagBrowser.css index 94b2be8..f3321a4 100644 --- a/etherpad/src/plugins/twitterStyleTags/static/css/tagBrowser.css +++ b/etherpad/src/plugins/twitterStyleTags/static/css/tagBrowser.css @@ -49,7 +49,7 @@ h1 { margin-top: 0; } -#home-newpad { +#home-newpad, #home-newteam { display: block; background-color: #a3bde0; color: #555555; diff --git a/etherpad/src/plugins/twitterStyleTags/templates/tagBrowser.ejs b/etherpad/src/plugins/twitterStyleTags/templates/tagBrowser.ejs index 1f1c0e3..7a91547 100644 --- a/etherpad/src/plugins/twitterStyleTags/templates/tagBrowser.ejs +++ b/etherpad/src/plugins/twitterStyleTags/templates/tagBrowser.ejs @@ -1,4 +1,6 @@ -<% /* Copyright 2009 Google Inc. +<% /* +Copyright 2009 Google Inc. +Copyright 2010 Pita, Peter Martischka <petermartischka@googlemail.com> Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -77,9 +79,18 @@ limitations under the License. */ %> <div id="padsidebar"> <div id="padusers"> - <a href="/ep/pad/newpad" id="home-newpad"> - Create new pad - </a> + <% if (isProAccountEnabled()) { %> + <a href="/ep/pad/newpad" style="padding: 25px 0" id="home-newpad"> + Create new pad + </a> + <a href="/ep/pro-signup/" style="padding: 25px 0" id="home-newteam"> + Create new team + </a> + <% } else { %> + <a href="/ep/pad/newpad" id="home-newpad"> + Create new pad + </a> + <% } %> </div> <div id="hdraggie"><!-- --></div> diff --git a/etherpad/src/static/css/home-opensource.css b/etherpad/src/static/css/home-opensource.css index 41e7996..82f15da 100644 --- a/etherpad/src/static/css/home-opensource.css +++ b/etherpad/src/static/css/home-opensource.css @@ -10,7 +10,7 @@ font-size: 3.6em; } -#home a#home-newpad { +#home a#home-newpad, #home a#home-newteam{ display: block; padding: 1em; margin: 12px 60px; @@ -20,7 +20,7 @@ color: #fff; } -#home a#home-newpad:hover { +#home a#home-newpad:hover, #home a#home-newteam:hover{ background: #26b; } diff --git a/etherpad/src/static/swf/vidplayer.swf b/etherpad/src/static/swf/vidplayer.swf Binary files differdeleted file mode 100755 index a38a94e..0000000 --- a/etherpad/src/static/swf/vidplayer.swf +++ /dev/null diff --git a/etherpad/src/templates/beta/signup.ejs b/etherpad/src/templates/beta/signup.ejs deleted file mode 100644 index 5268a29..0000000 --- a/etherpad/src/templates/beta/signup.ejs +++ /dev/null @@ -1,63 +0,0 @@ -<% /* 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/etherpad/src/templates/email/eepnet_license_info.ejs b/etherpad/src/templates/email/eepnet_license_info.ejs deleted file mode 100644 index ea431de..0000000 --- a/etherpad/src/templates/email/eepnet_license_info.ejs +++ /dev/null @@ -1,72 +0,0 @@ -<% /* 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 etherpad.com 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/etherpad/src/templates/email/eepnet_purchase_receipt.ejs b/etherpad/src/templates/email/eepnet_purchase_receipt.ejs deleted file mode 100644 index a83cd58..0000000 --- a/etherpad/src/templates/email/eepnet_purchase_receipt.ejs +++ /dev/null @@ -1,93 +0,0 @@ -<% /* 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/etherpad/src/templates/email/pro_beta_invite.ejs b/etherpad/src/templates/email/pro_beta_invite.ejs deleted file mode 100644 index 162b443..0000000 --- a/etherpad/src/templates/email/pro_beta_invite.ejs +++ /dev/null @@ -1,23 +0,0 @@ -<% /* 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/etherpad/src/templates/email/pro_payment_failure.ejs b/etherpad/src/templates/email/pro_payment_failure.ejs deleted file mode 100644 index 248a3dd..0000000 --- a/etherpad/src/templates/email/pro_payment_failure.ejs +++ /dev/null @@ -1,26 +0,0 @@ -<% /* 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/etherpad/src/templates/email/pro_payment_receipt.ejs b/etherpad/src/templates/email/pro_payment_receipt.ejs deleted file mode 100644 index 175b06a..0000000 --- a/etherpad/src/templates/email/pro_payment_receipt.ejs +++ /dev/null @@ -1,55 +0,0 @@ -<% /* 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/etherpad/src/templates/framed/framedheader-pro.ejs b/etherpad/src/templates/framed/framedheader-pro.ejs index 857fa3e..73b0e99 100644 --- a/etherpad/src/templates/framed/framedheader-pro.ejs +++ b/etherpad/src/templates/framed/framedheader-pro.ejs @@ -1,4 +1,6 @@ -<% /* Copyright 2009 Google Inc. +<% /* +Copyright 2009 Google Inc. +Copyright 2010 Pita, Peter Martischka <petermartischka@googlemail.com> Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -64,10 +66,8 @@ limitations under the License. */ %><% helpers.addBodyClass("pro-withtopbar"); % <div id="pro-topnav"> <div id="pro-topnav-inner"> - <% if (validLicense && account) { %> <%= renderProTopNav() %> <%= helpers.clearFloats() %> - <% } %> </div> </div> diff --git a/etherpad/src/templates/main/home.ejs b/etherpad/src/templates/main/home.ejs index 3fc0484..aa5d934 100644 --- a/etherpad/src/templates/main/home.ejs +++ b/etherpad/src/templates/main/home.ejs @@ -1,4 +1,6 @@ -<% /* Copyright 2009 Google Inc. +<% /* +Copyright 2009 Google Inc. +Copyright 2010 Pita, Peter Martischka <petermartischka@googlemail.com> Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -23,11 +25,11 @@ limitations under the License. */ %><% helpers.setHtmlTitle("EtherPad: Open-Sour <a id="home-newpad" href="/ep/pad/newpad"> Create new pad </a> - <!-- - <a id="home-newsite" href="ep/pro-signup/"> - Create team site - </a> - --> + <% if (isProAccountEnabled()) { %> + <a id="home-newteam" href="/ep/pro-signup/"> + Create team site + </a> + <% } %> </div> </div> diff --git a/etherpad/src/templates/pad/create_body_rafter.ejs b/etherpad/src/templates/pad/create_body_rafter.ejs deleted file mode 100644 index 28252c7..0000000 --- a/etherpad/src/templates/pad/create_body_rafter.ejs +++ /dev/null @@ -1,23 +0,0 @@ -<% /* 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/etherpad/src/templates/pad/exporthtml.ejs b/etherpad/src/templates/pad/exporthtml.ejs deleted file mode 100644 index 288a595..0000000 --- a/etherpad/src/templates/pad/exporthtml.ejs +++ /dev/null @@ -1,28 +0,0 @@ -<% /* 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/etherpad/src/templates/pad/pad_body.ejs b/etherpad/src/templates/pad/pad_body.ejs deleted file mode 100644 index d932cd6..0000000 --- a/etherpad/src/templates/pad/pad_body.ejs +++ /dev/null @@ -1,69 +0,0 @@ -<% /* 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"> </td> - <td id="pot_top"> - <a id="headhomelink" href="/">EtherPad</a> - <div id="headurl"> - <label for="shareurl">Share this URL:</label> - <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"> </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/etherpad/src/templates/pad/pad_content.ejs b/etherpad/src/templates/pad/pad_content.ejs deleted file mode 100644 index dbbd9bd..0000000 --- a/etherpad/src/templates/pad/pad_content.ejs +++ /dev/null @@ -1,300 +0,0 @@ -<% /* 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"> </div> - <a class="showhide" id="showsidebar" href="javascript:void pad.showSideBar();"> - « show side bar - </a> - </td> - <td id="sidebartop"> - <a class="showhide" id="hidesidebar" href="javascript:void pad.hideSideBar();"> - hide » - </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)"> </a> - <a href="javascript:void pad.toolbarClick('italic');" class="toptoolbarbutton italic" title="Italics (ctrl-I)"> </a> - <a href="javascript:void pad.toolbarClick('underline');" class="toptoolbarbutton underline" title="Underline (ctrl-U)"> </a> - <a href="javascript:void pad.toolbarClick('undo');" class="toptoolbarbutton undo" title="Undo (ctrl-Z)"> </a> - <a href="javascript:void pad.toolbarClick('redo');" class="toptoolbarbutton redo" title="Redo (ctrl-Y)"> </a> - <form id="padtitle" action="/"><input type="text" id="padtitleedit"/><span class="padtitlepad">Pad:</span> <span id="padtitletitle"> </span> <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"> </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: <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> - <td class="secondtd"><%= exportOption('doc', 'Microsoft Word', true) %></td> - </tr> - <tr> - <td class="firsttd"><%= exportOption('txt', 'Plain text', false) %></td> - <td class="secondtd"><%= exportOption('pdf', 'PDF', true) %></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> - <td class="secondtd"><%= exportOption('odt', 'OpenDocument', true) %></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"> </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/etherpad/src/templates/pad/pad_download_link.ejs b/etherpad/src/templates/pad/pad_download_link.ejs deleted file mode 100644 index e05d7d0..0000000 --- a/etherpad/src/templates/pad/pad_download_link.ejs +++ /dev/null @@ -1,27 +0,0 @@ -<% /* 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/etherpad/src/templates/pad/padfull_body.ejs b/etherpad/src/templates/pad/padfull_body.ejs deleted file mode 100644 index 41a100c..0000000 --- a/etherpad/src/templates/pad/padfull_body.ejs +++ /dev/null @@ -1,32 +0,0 @@ -<% /* 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://etherpad.com/ep/about/pricing">pricing plans</a> for -information about having more than <%= maxUsersPerPad %> -collaborators.</p> - -</div> - -</div> diff --git a/etherpad/src/templates/pad/padslider_body.ejs b/etherpad/src/templates/pad/padslider_body.ejs deleted file mode 100644 index 51a9e84..0000000 --- a/etherpad/src/templates/pad/padslider_body.ejs +++ /dev/null @@ -1,41 +0,0 @@ -<% /* 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> -<a href="<%= request.url %>#" class="play">play</a> / -<a href="<%= request.url %>#" class="stop">stop</a> -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/etherpad/src/templates/pad/total_users_exceeded.ejs b/etherpad/src/templates/pad/total_users_exceeded.ejs deleted file mode 100644 index 7ac7e1b..0000000 --- a/etherpad/src/templates/pad/total_users_exceeded.ejs +++ /dev/null @@ -1,29 +0,0 @@ -<% /* 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="/">« Home</a> - -</div> - diff --git a/etherpad/src/templates/pro-help/billing.ejs b/etherpad/src/templates/pro-help/billing.ejs deleted file mode 100644 index 269d37b..0000000 --- a/etherpad/src/templates/pro-help/billing.ejs +++ /dev/null @@ -1,45 +0,0 @@ -<% /* 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. */ %> -<h1>Account Quotas and Billing</h1> - -<p> -EtherPad Professional Edition allows you to create accounts for members -of your team. Account-holders may sign in at -<tt>your-domain.etherpad.com</tt>. -</p> - -<p>You may have up to <%= numFreeAccounts %> accounts for free. Once you -try to add more accounts, you will be prompted to enter payment -information. Above <%= numFreeAccounts %> accounts, you will be charged -$<%= pricePerAccount %> per account per month. For example, to have <%= -numFreeAccounts+1 %> accounts will cost a total of $<%= pricePerAccount * -(numFreeAccounts+1) %> per month.</p> - -<p>You are billed at the end of your monthly billing cycle, so if you -start on January 1st, you will not be billed until February 1st. To -compute the total amount charged at the end of the month, we use the -<b>maximum number of accounts that existed throughout the month</b>. So -if you create 10 accounts, but then delete 3 before the end of the month, - you will still be charged for 10 at the end of the month. Likewise, if - you create 10 accounts, delete them all, and create 10 new accounts, - you will be charged for 10 accounts.</p> - -<p>EtherPad lets you to collaborate with <b>guests</b> in -addition to account-holders. Guests are users who do not have accounts -but join you in public pads on your site. You can always have unlimited -guest collaborators, and you are not ever charged for guests. You are -only charged for account-holders.</p> - - - diff --git a/etherpad/src/templates/pro-help/essentials.ejs b/etherpad/src/templates/pro-help/essentials.ejs deleted file mode 100644 index a1bcc87..0000000 --- a/etherpad/src/templates/pro-help/essentials.ejs +++ /dev/null @@ -1,18 +0,0 @@ -<% /* 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. */ %> -<h1>EtherPad Professional Essentials</h1> - - - - diff --git a/etherpad/src/templates/pro/account/create-admin-account.ejs b/etherpad/src/templates/pro/account/create-admin-account.ejs deleted file mode 100644 index 2a6c9f8..0000000 --- a/etherpad/src/templates/pro/account/create-admin-account.ejs +++ /dev/null @@ -1,37 +0,0 @@ -<% /* 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/etherpad/src/templates/pro/account/global-multi-domain-recover-email.ejs b/etherpad/src/templates/pro/account/global-multi-domain-recover-email.ejs deleted file mode 100644 index d2eb4de..0000000 --- a/etherpad/src/templates/pro/account/global-multi-domain-recover-email.ejs +++ /dev/null @@ -1,27 +0,0 @@ -<% /* 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/etherpad/src/templates/pro/account/guest-knock.ejs b/etherpad/src/templates/pro/account/guest-knock.ejs deleted file mode 100644 index 44c69c0..0000000 --- a/etherpad/src/templates/pro/account/guest-knock.ejs +++ /dev/null @@ -1,27 +0,0 @@ -<% /* 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/etherpad/src/templates/pro/account/signin-guest.ejs b/etherpad/src/templates/pro/account/signin-guest.ejs deleted file mode 100644 index 621c381..0000000 --- a/etherpad/src/templates/pro/account/signin-guest.ejs +++ /dev/null @@ -1,51 +0,0 @@ -<% /* 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/etherpad/src/templates/pro/admin/admin.ejs b/etherpad/src/templates/pro/admin/admin.ejs deleted file mode 100644 index f8e1562..0000000 --- a/etherpad/src/templates/pro/admin/admin.ejs +++ /dev/null @@ -1,15 +0,0 @@ -<% /* 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/etherpad/src/templates/pro/admin/billing-invoices.ejs b/etherpad/src/templates/pro/admin/billing-invoices.ejs deleted file mode 100644 index a3a17d8..0000000 --- a/etherpad/src/templates/pro/admin/billing-invoices.ejs +++ /dev/null @@ -1,45 +0,0 @@ -<% /* Copyright 2009 Google Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS-IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. */ %><% - helpers.includeCss('store/ondemand-billing.css'); -%> - -<% -function displayInvoice(invoice) { %> - <tr> - <td><%= formatDate(invoice.time) %></td> - <td><%= invoice.id %></td> - <td><%= invoice.status == 'paid' ? "Paid" : (invoice.status == 'pending' ? "<strong>Pending</strong>" : (invoice.status == 'refunded' ? "<em>Refunded</em>" : invoice.status)) %></td> - <td><%= invoice.users %></td> - <td>US $<%= dollars(centsToDollars(invoice.amt)) %></td> - <td><a href="<%= request.path %>?id=<%= invoice.id %>">View</a></td> - </tr> -<% } %> - -<h3 class="top">Past Invoices</h3> - -<% if (invoices.length == 0) { %> - <p class="informational">No old invoices.</p> -<% } else { %> - <table class="invoicelist"> - <tr> - <th>Date</th> - <th>Invoice Number</th> - <th>Status</th> - <th>Number of users</th> - <th>Cost</th> - <th> </th> - </tr> - <% invoices.forEach(displayInvoice); %> - </table> -<% } %>
\ No newline at end of file diff --git a/etherpad/src/templates/pro/admin/manage-billing.ejs b/etherpad/src/templates/pro/admin/manage-billing.ejs deleted file mode 100644 index 8a7bd51..0000000 --- a/etherpad/src/templates/pro/admin/manage-billing.ejs +++ /dev/null @@ -1,35 +0,0 @@ -<% /* 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://etherpad.com<%= helpers.rafterBlogUrl() %>">Read more</a>.</p> diff --git a/etherpad/src/templates/pro/admin/pne-config.ejs b/etherpad/src/templates/pro/admin/pne-config.ejs deleted file mode 100644 index 56fe68d..0000000 --- a/etherpad/src/templates/pro/admin/pne-config.ejs +++ /dev/null @@ -1,33 +0,0 @@ -<% /* 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/etherpad/src/templates/pro/admin/pne-dashboard.ejs b/etherpad/src/templates/pro/admin/pne-dashboard.ejs deleted file mode 100644 index 6b9b456..0000000 --- a/etherpad/src/templates/pro/admin/pne-dashboard.ejs +++ /dev/null @@ -1,40 +0,0 @@ -<% /* 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/etherpad/src/templates/pro/admin/pne-license-manager.ejs b/etherpad/src/templates/pro/admin/pne-license-manager.ejs deleted file mode 100644 index f160be0..0000000 --- a/etherpad/src/templates/pro/admin/pne-license-manager.ejs +++ /dev/null @@ -1,132 +0,0 @@ -<% /* 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://etherpad.com/ep/about/pricing-eepnet">pricing page on etherpad.com</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://etherpad.com/ep/store/eepnet-download">downloading the latest version on - etherpad.com</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://etherpad.com/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/etherpad/src/templates/pro/admin/pne-shell.ejs b/etherpad/src/templates/pro/admin/pne-shell.ejs deleted file mode 100644 index f398b15..0000000 --- a/etherpad/src/templates/pro/admin/pne-shell.ejs +++ /dev/null @@ -1,33 +0,0 @@ -<% /* 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/etherpad/src/templates/pro/admin/pro-config.ejs b/etherpad/src/templates/pro/admin/pro-config.ejs deleted file mode 100644 index 32cb610..0000000 --- a/etherpad/src/templates/pro/admin/pro-config.ejs +++ /dev/null @@ -1,55 +0,0 @@ -<% /* 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/etherpad/src/templates/pro/admin/single-invoice.ejs b/etherpad/src/templates/pro/admin/single-invoice.ejs deleted file mode 100644 index aeab184..0000000 --- a/etherpad/src/templates/pro/admin/single-invoice.ejs +++ /dev/null @@ -1,47 +0,0 @@ -<% /* Copyright 2009 Google Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS-IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. */ %><% - helpers.includeCss('store/ondemand-billing.css'); -%> - -<h3 class="top">Past Invoices</h3> - -<p>Invoice #<%= invoice.id %>, dated <%= formatDate(invoice.time) %>.</p> - -<table class="billingsummary"> - <tr> - <th>Invoice status</th> - <td><%= invoice.status == 'paid' ? "Paid" : (invoice.status == 'pending' ? "<strong>Pending</strong>" : (invoice.status == 'refunded' ? "<em>Refunded</em>" : invoice.status)) %></td> - </tr> - <tr> - <th>Number of users</th> - <td><%= invoice.users %></td> - </tr> - <tr> - <th>Cost</th> - <td>US $<%= dollars(centsToDollars(invoice.amt)) %></td> - </tr> - <% if (transaction) { %> - <tr> - <th>Paid on</th> - <td><%= formatDate(transaction.time) %></td> - </tr> - <tr> - <th>Paid using</th> - <td><%= transaction.payInfo %></td> - </tr> - <% } %> -</table> - -<p class="returnlink"><a href="<%= request.path %>">« back to invoice list</a></p> - diff --git a/etherpad/src/templates/pro/pro-payment-required.ejs b/etherpad/src/templates/pro/pro-payment-required.ejs deleted file mode 100644 index 3649990..0000000 --- a/etherpad/src/templates/pro/pro-payment-required.ejs +++ /dev/null @@ -1,51 +0,0 @@ -<% /* 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 %> <<%= TT(a.email) - %>></li> - <% }); %> - </ul> - - <% } %> - - <br/><br/> - <p>Questions? Contact <%= helpers.oemail("support") %>.</p> - -</div> -</div> - - diff --git a/etherpad/src/templates/statistics/stat_page.ejs b/etherpad/src/templates/statistics/stat_page.ejs deleted file mode 100644 index 22277b3..0000000 --- a/etherpad/src/templates/statistics/stat_page.ejs +++ /dev/null @@ -1,89 +0,0 @@ -<% /* 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/">« 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> </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/etherpad/src/templates/store/csc-help.ejs b/etherpad/src/templates/store/csc-help.ejs deleted file mode 100644 index 3623fac..0000000 --- a/etherpad/src/templates/store/csc-help.ejs +++ /dev/null @@ -1,23 +0,0 @@ -<% /* 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/etherpad/src/templates/store/eepnet-checkout/billing-info.ejs b/etherpad/src/templates/store/eepnet-checkout/billing-info.ejs deleted file mode 100644 index 69e0ead..0000000 --- a/etherpad/src/templates/store/eepnet-checkout/billing-info.ejs +++ /dev/null @@ -1,183 +0,0 @@ -<% /* 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"> </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 || '') %>" /> - 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/etherpad/src/templates/store/eepnet-checkout/cart.ejs b/etherpad/src/templates/store/eepnet-checkout/cart.ejs deleted file mode 100644 index 147ff1b..0000000 --- a/etherpad/src/templates/store/eepnet-checkout/cart.ejs +++ /dev/null @@ -1,119 +0,0 @@ -<% /* 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> </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/etherpad/src/templates/store/eepnet-checkout/checkout-template.ejs b/etherpad/src/templates/store/eepnet-checkout/checkout-template.ejs deleted file mode 100644 index 817f0eb..0000000 --- a/etherpad/src/templates/store/eepnet-checkout/checkout-template.ejs +++ /dev/null @@ -1,38 +0,0 @@ -<% /* 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/etherpad/src/templates/store/eepnet-checkout/confirmation.ejs b/etherpad/src/templates/store/eepnet-checkout/confirmation.ejs deleted file mode 100644 index 3b38775..0000000 --- a/etherpad/src/templates/store/eepnet-checkout/confirmation.ejs +++ /dev/null @@ -1,33 +0,0 @@ -<% /* 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/etherpad/src/templates/store/eepnet-checkout/license-info.ejs b/etherpad/src/templates/store/eepnet-checkout/license-info.ejs deleted file mode 100644 index 4d710f2..0000000 --- a/etherpad/src/templates/store/eepnet-checkout/license-info.ejs +++ /dev/null @@ -1,40 +0,0 @@ -<% /* 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/etherpad/src/templates/store/eepnet-checkout/purchase.ejs b/etherpad/src/templates/store/eepnet-checkout/purchase.ejs deleted file mode 100644 index 49cb3bb..0000000 --- a/etherpad/src/templates/store/eepnet-checkout/purchase.ejs +++ /dev/null @@ -1,33 +0,0 @@ -<% /* 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/etherpad/src/templates/store/eepnet-checkout/receipt.ejs b/etherpad/src/templates/store/eepnet-checkout/receipt.ejs deleted file mode 100644 index 8d3a2a5..0000000 --- a/etherpad/src/templates/store/eepnet-checkout/receipt.ejs +++ /dev/null @@ -1,43 +0,0 @@ -<% /* 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/etherpad/src/templates/store/eepnet-checkout/summary.ejs b/etherpad/src/templates/store/eepnet-checkout/summary.ejs deleted file mode 100644 index 753873c..0000000 --- a/etherpad/src/templates/store/eepnet-checkout/summary.ejs +++ /dev/null @@ -1,91 +0,0 @@ -<% /* 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/etherpad/src/templates/store/eepnet-checkout/support-contract.ejs b/etherpad/src/templates/store/eepnet-checkout/support-contract.ejs deleted file mode 100644 index ff33fda..0000000 --- a/etherpad/src/templates/store/eepnet-checkout/support-contract.ejs +++ /dev/null @@ -1,41 +0,0 @@ -<% /* 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/etherpad/src/templates/store/eepnet_download.ejs b/etherpad/src/templates/store/eepnet_download.ejs deleted file mode 100644 index 42c89ee..0000000 --- a/etherpad/src/templates/store/eepnet_download.ejs +++ /dev/null @@ -1,43 +0,0 @@ -<% /* 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/etherpad/src/templates/store/eepnet_eval_nextsteps.ejs b/etherpad/src/templates/store/eepnet_eval_nextsteps.ejs deleted file mode 100644 index 4c4cec4..0000000 --- a/etherpad/src/templates/store/eepnet_eval_nextsteps.ejs +++ /dev/null @@ -1,40 +0,0 @@ -<% /* 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/etherpad/src/templates/store/eepnet_eval_signup.ejs b/etherpad/src/templates/store/eepnet_eval_signup.ejs deleted file mode 100644 index 5a1edf4..0000000 --- a/etherpad/src/templates/store/eepnet_eval_signup.ejs +++ /dev/null @@ -1,125 +0,0 @@ -<% /* 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"> </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 --></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> - |