summaryrefslogtreecommitdiffstats
path: root/etherpad/src/plugins
diff options
context:
space:
mode:
authorPeter Martischka <petermartischka@googlemail.com>2010-04-04 03:44:37 +0200
committerPeter Martischka <pita@pitapoison.de>2010-04-04 03:44:37 +0200
commitf5f400aa103ce7c0436fc6352bf540ed4c6274ef (patch)
tree97eaf86f813891e74c778d3e0f6810ee13fa46e3 /etherpad/src/plugins
parent4b76ba7a6cbcb31ac5c9d0ec2d60e997f2dac6d1 (diff)
downloadetherpad-f5f400aa103ce7c0436fc6352bf540ed4c6274ef.tar.gz
etherpad-f5f400aa103ce7c0436fc6352bf540ed4c6274ef.tar.bz2
etherpad-f5f400aa103ce7c0436fc6352bf540ed4c6274ef.zip
Opportunity to enable/disable the Pro Feature with a config flag
Diffstat (limited to 'etherpad/src/plugins')
-rw-r--r--etherpad/src/plugins/twitterStyleTags/controllers/tagBrowser.js6
-rw-r--r--etherpad/src/plugins/twitterStyleTags/static/css/tagBrowser.css2
-rw-r--r--etherpad/src/plugins/twitterStyleTags/templates/tagBrowser.ejs19
3 files changed, 21 insertions, 6 deletions
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>