aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--etherpad/src/plugins/twitterStyleTags/hooks.js11
-rw-r--r--etherpad/src/plugins/twitterStyleTags/main.js4
-rw-r--r--etherpad/src/plugins/twitterStyleTags/templates/tagBrowser.ejs7
-rw-r--r--etherpad/src/plugins/urlIndexer/hooks.js7
-rw-r--r--etherpad/src/plugins/urlIndexer/main.js3
5 files changed, 28 insertions, 4 deletions
diff --git a/etherpad/src/plugins/twitterStyleTags/hooks.js b/etherpad/src/plugins/twitterStyleTags/hooks.js
index 9465ccc..1072579 100644
--- a/etherpad/src/plugins/twitterStyleTags/hooks.js
+++ b/etherpad/src/plugins/twitterStyleTags/hooks.js
@@ -44,4 +44,13 @@ function padModelWriteToDB(args) {
sqlobj.insert("PAD_TAG", {PAD_ID: args.padId, TAG_ID: tag_row['ID']});
}
}
-} \ No newline at end of file
+}
+
+function docbarItemsAll() {
+ return ["<td class='docbarbutton'><a href='/ep/tag/'>Home</a></td>"];
+}
+
+function docbarItemsTagBrowser() {
+ return ["<td class='docbarbutton'><a href='/ep/tag/'>Pads</a></td>"];
+}
+
diff --git a/etherpad/src/plugins/twitterStyleTags/main.js b/etherpad/src/plugins/twitterStyleTags/main.js
index 34d5d85..d64abff 100644
--- a/etherpad/src/plugins/twitterStyleTags/main.js
+++ b/etherpad/src/plugins/twitterStyleTags/main.js
@@ -5,13 +5,15 @@ import("sqlbase.sqlobj");
import("sqlbase.sqlcommon");
function init() {
- this.hooks = ['handlePath', 'aceGetFilterStack', 'aceCreateDomLine', 'padModelWriteToDB'];
+ this.hooks = ['handlePath', 'aceGetFilterStack', 'aceCreateDomLine', 'padModelWriteToDB', 'docbarItemsAll', 'docbarItemsTagBrowser'];
this.client = new main.init();
this.description = 'Twitter-style tags allows the user to tag pads by writing #tagname anywhere in the pad text. Tags are automatically linked to searches for that tag in other pads. This plugin also provides an alternative home-page for Etherpad with a display of the last changed public pads as well as that information available as an RSS stream.';
this.handlePath = hooks.handlePath;
this.aceGetFilterStack = main.aceGetFilterStack;
this.aceCreateDomLine = main.aceCreateDomLine;
this.padModelWriteToDB = hooks.padModelWriteToDB;
+ this.docbarItemsAll = hooks.docbarItemsAll;
+ this.docbarItemsTagBrowser = hooks.docbarItemsTagBrowser;
this.install = install;
this.uninstall = uninstall;
diff --git a/etherpad/src/plugins/twitterStyleTags/templates/tagBrowser.ejs b/etherpad/src/plugins/twitterStyleTags/templates/tagBrowser.ejs
index ea1076e..e101196 100644
--- a/etherpad/src/plugins/twitterStyleTags/templates/tagBrowser.ejs
+++ b/etherpad/src/plugins/twitterStyleTags/templates/tagBrowser.ejs
@@ -31,6 +31,13 @@ limitations under the License. */ %>
<td id="docbarpadtitle"><span>Browse Tags</span></td>
<% return ejs_data; }); %>
+<%
+ template.define('docBarItems', function() {
+ return plugins.callHookStr('docbarItemsTagBrowserPad', {}, '', '', '') +
+ plugins.callHookStr('docbarItemsTagBrowser', {}, '', '', '');
+ });
+%>
+
<% template.define('sideBar', function() { var ejs_data=''; %>
<div id="padusers">
<% if (isProAccountEnabled()) { %>
diff --git a/etherpad/src/plugins/urlIndexer/hooks.js b/etherpad/src/plugins/urlIndexer/hooks.js
index 45d37f1..e0ff050 100644
--- a/etherpad/src/plugins/urlIndexer/hooks.js
+++ b/etherpad/src/plugins/urlIndexer/hooks.js
@@ -41,4 +41,9 @@ function padModelWriteToDB(args) {
sqlobj.insert("PAD_URL", {PAD_ID: args.padId, URL: new_urls[i]});
}
}
-} \ No newline at end of file
+}
+
+function docbarItemsTagBrowser() {
+ return ["<td class='docbarbutton'><a href='/ep/url/'>URLs</a></td>"];
+}
+
diff --git a/etherpad/src/plugins/urlIndexer/main.js b/etherpad/src/plugins/urlIndexer/main.js
index 0b2847f..18bdef1 100644
--- a/etherpad/src/plugins/urlIndexer/main.js
+++ b/etherpad/src/plugins/urlIndexer/main.js
@@ -4,10 +4,11 @@ import("sqlbase.sqlobj");
import("sqlbase.sqlcommon");
function init() {
- this.hooks = ['padModelWriteToDB', 'handlePath'];
+ this.hooks = ['padModelWriteToDB', 'handlePath', 'docbarItemsTagBrowser'];
this.description = 'Indexes URLs linked to in pads so that they can be displayed outside pads, searched for etc.';
this.padModelWriteToDB = hooks.padModelWriteToDB;
this.handlePath = hooks.handlePath;
+ this.docbarItemsTagBrowser = hooks.docbarItemsTagBrowser;
this.install = install;
this.uninstall = uninstall;