]> git.ipfire.org Git - ipfire.org.git/commitdiff
docs: Move watchlist
authorMichael Tremer <michael.tremer@ipfire.org>
Sat, 1 Jul 2023 10:33:50 +0000 (10:33 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Sat, 1 Jul 2023 10:33:50 +0000 (10:33 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Makefile.am
src/templates/docs/watchlist.html [moved from src/templates/wiki/watchlist.html with 100% similarity]
src/web/__init__.py
src/web/docs.py
src/web/wiki.py

index 29f551d594b0b9026eec35528d7488aaa0b6eef9..1dfc56ac5f9c364272a2d358bc0e98fe47d0b0fe 100644 (file)
@@ -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
 
index 0b9c59a8a81fab093b33cc2fc4e2c631477aec6b..f76d31d2653a5d303472dec8f01b5ba5441865d2 100644 (file)
@@ -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),
 
index e56ee4743ea0863bfb52c5f548ce48d5a87b5752..0a55fffa54e8f3d27dd2db4608e96d483e49d1fd 100644 (file)
@@ -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):
index b25e1507bc0bfe0d87ea28504f48a84ec537b53b..52a044143632d6f238e490958ba30e6a0b1b7be8 100644 (file)
@@ -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):