From: Michael Tremer Date: Sat, 1 Jul 2023 10:31:18 +0000 (+0000) Subject: docs: Move tree X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=350f391e4f48a7d12b0d33e52c66b46b962d41d0;p=ipfire.org.git docs: Move tree Signed-off-by: Michael Tremer --- diff --git a/Makefile.am b/Makefile.am index 55e17005..29f551d5 100644 --- a/Makefile.am +++ b/Makefile.am @@ -205,7 +205,8 @@ templates_docs_DATA = \ src/templates/docs/page.html \ src/templates/docs/recent-changes.html \ src/templates/docs/revisions.html \ - src/templates/docs/search-results.html + src/templates/docs/search-results.html \ + src/templates/docs/tree.html templates_docsdir = $(templatesdir)/docs @@ -347,7 +348,6 @@ templates_voip_modulesdir = $(templates_voipdir)/modules templates_wiki_DATA = \ src/templates/wiki/confirm-delete.html \ src/templates/wiki/edit.html \ - src/templates/wiki/tree.html \ src/templates/wiki/watchlist.html templates_wikidir = $(templatesdir)/wiki diff --git a/src/templates/wiki/tree.html b/src/templates/docs/tree.html similarity index 100% rename from src/templates/wiki/tree.html rename to src/templates/docs/tree.html diff --git a/src/web/__init__.py b/src/web/__init__.py index c8caa6be..0b9c59a8 100644 --- a/src/web/__init__.py +++ b/src/web/__init__.py @@ -144,6 +144,7 @@ class Application(tornado.web.Application): # Docs (r"/docs/recent\-changes", docs.RecentChangesHandler), (r"/docs/search", docs.SearchHandler), + (r"/docs/tree", docs.TreeHandler), (r"/docs((?:[A-Za-z0-9\-_\/]+)?(?:.*)\.(?:\w+))$", docs.FileHandler), (r"/docs([A-Za-z0-9\-_\/]+)?", docs.PageHandler), @@ -352,7 +353,6 @@ class Application(tornado.web.Application): (r"/actions/upload", wiki.ActionUploadHandler), # Handlers - (r"/tree", wiki.TreeHandler), (r"/watchlist", wiki.WatchlistHandler), # Media diff --git a/src/web/docs.py b/src/web/docs.py index 9c00d40b..e56ee474 100644 --- a/src/web/docs.py +++ b/src/web/docs.py @@ -157,6 +157,11 @@ class RecentChangesHandler(base.BaseHandler): self.render("docs/recent-changes.html", recent_changes=recent_changes) +class TreeHandler(base.BaseHandler): + def get(self): + self.render("docs/tree.html", pages=self.backend.wiki) + + class HeaderModule(ui_modules.UIModule): @property def page(self): diff --git a/src/web/wiki.py b/src/web/wiki.py index 5a0d7813..b25e1507 100644 --- a/src/web/wiki.py +++ b/src/web/wiki.py @@ -210,11 +210,6 @@ class FilesHandler(base.BaseHandler): self.render("wiki/files/index.html", path=path, files=files) -class TreeHandler(base.BaseHandler): - def get(self): - self.render("wiki/tree.html", pages=self.backend.wiki) - - class WatchlistHandler(base.BaseHandler): @tornado.web.authenticated def get(self):