From: Michael Tremer Date: Sat, 1 Jul 2023 10:33:50 +0000 (+0000) Subject: docs: Move watchlist X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=16619e57deea3793ba21b6818f664a647fa1fada;p=ipfire.org.git docs: Move watchlist Signed-off-by: Michael Tremer --- diff --git a/Makefile.am b/Makefile.am index 29f551d5..1dfc56ac 100644 --- a/Makefile.am +++ b/Makefile.am @@ -206,7 +206,8 @@ templates_docs_DATA = \ src/templates/docs/recent-changes.html \ src/templates/docs/revisions.html \ src/templates/docs/search-results.html \ - src/templates/docs/tree.html + src/templates/docs/tree.html \ + src/templates/docs/watchlist.html templates_docsdir = $(templatesdir)/docs @@ -347,8 +348,7 @@ templates_voip_modulesdir = $(templates_voipdir)/modules templates_wiki_DATA = \ src/templates/wiki/confirm-delete.html \ - src/templates/wiki/edit.html \ - src/templates/wiki/watchlist.html + src/templates/wiki/edit.html templates_wikidir = $(templatesdir)/wiki diff --git a/src/templates/wiki/watchlist.html b/src/templates/docs/watchlist.html similarity index 100% rename from src/templates/wiki/watchlist.html rename to src/templates/docs/watchlist.html diff --git a/src/web/__init__.py b/src/web/__init__.py index 0b9c59a8..f76d31d2 100644 --- a/src/web/__init__.py +++ b/src/web/__init__.py @@ -145,6 +145,7 @@ class Application(tornado.web.Application): (r"/docs/recent\-changes", docs.RecentChangesHandler), (r"/docs/search", docs.SearchHandler), (r"/docs/tree", docs.TreeHandler), + (r"/docs/watchlist", docs.WatchlistHandler), (r"/docs((?:[A-Za-z0-9\-_\/]+)?(?:.*)\.(?:\w+))$", docs.FileHandler), (r"/docs([A-Za-z0-9\-_\/]+)?", docs.PageHandler), @@ -352,9 +353,6 @@ class Application(tornado.web.Application): (r"/actions/restore", wiki.ActionRestoreHandler), (r"/actions/upload", wiki.ActionUploadHandler), - # Handlers - (r"/watchlist", wiki.WatchlistHandler), - # Media (r"([A-Za-z0-9\-_\/]+)?/_files", wiki.FilesHandler), diff --git a/src/web/docs.py b/src/web/docs.py index e56ee474..0a55fffa 100644 --- a/src/web/docs.py +++ b/src/web/docs.py @@ -162,6 +162,14 @@ class TreeHandler(base.BaseHandler): self.render("docs/tree.html", pages=self.backend.wiki) +class WatchlistHandler(base.BaseHandler): + @tornado.web.authenticated + def get(self): + pages = self.backend.wiki.get_watchlist(self.current_user) + + self.render("docs/watchlist.html", pages=pages) + + class HeaderModule(ui_modules.UIModule): @property def page(self): diff --git a/src/web/wiki.py b/src/web/wiki.py index b25e1507..52a04414 100644 --- a/src/web/wiki.py +++ b/src/web/wiki.py @@ -210,14 +210,6 @@ class FilesHandler(base.BaseHandler): self.render("wiki/files/index.html", path=path, files=files) -class WatchlistHandler(base.BaseHandler): - @tornado.web.authenticated - def get(self): - pages = self.backend.wiki.get_watchlist(self.current_user) - - self.render("wiki/watchlist.html", pages=pages) - - class WikiListModule(ui_modules.UIModule): def render(self, pages, link_revision=False, show_breadcrumbs=True, show_author=True, show_changes=False):