]> git.ipfire.org Git - ipfire.org.git/commitdiff
docs: Move list module
authorMichael Tremer <michael.tremer@ipfire.org>
Sat, 1 Jul 2023 10:59:25 +0000 (10:59 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Sat, 1 Jul 2023 10:59:25 +0000 (10:59 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Makefile.am
src/templates/docs/modules/list.html [moved from src/templates/wiki/modules/list.html with 100% similarity]
src/templates/docs/recent-changes.html
src/templates/docs/revisions.html
src/templates/docs/search-results.html
src/templates/docs/watchlist.html
src/web/__init__.py
src/web/docs.py
src/web/wiki.py [deleted file]

index 8fd73cabda513193bfc41b12a365bdde02e50d4c..2aea8a0380dd822a42c610ceda133f2d43e0ca4c 100644 (file)
@@ -97,8 +97,7 @@ web_PYTHON = \
        src/web/people.py \
        src/web/ui_modules.py \
        src/web/users.py \
-       src/web/voip.py \
-       src/web/wiki.py
+       src/web/voip.py
 
 webdir = $(backenddir)/web
 
@@ -221,7 +220,8 @@ templates_docs_filesdir = $(templates_docsdir)/files
 
 templates_docs_modules_DATA = \
        src/templates/docs/modules/diff.html \
-       src/templates/docs/modules/header.html
+       src/templates/docs/modules/header.html \
+       src/templates/docs/modules/list.html
 
 templates_docs_modulesdir = $(templates_docsdir)/modules
 
@@ -356,11 +356,6 @@ templates_wiki_messages_DATA = \
 
 templates_wiki_messagesdir = $(templates_wikidir)/messages
 
-templates_wiki_modules_DATA = \
-       src/templates/wiki/modules/list.html
-
-templates_wiki_modulesdir = $(templates_wikidir)/modules
-
 # ------------------------------------------------------------------------------
 
 SASS_FILES = \
index 9cb939b112e4d116ca889199ef4292d400a9b18e..8b75883f9fe6e2cc6c8d7021d7a7e9cb7daa58bb 100644 (file)
@@ -15,7 +15,7 @@
 
        <div class="card">
                <div class="card-body">
-                       {% module WikiList(recent_changes, show_changes=True) %}
+                       {% module DocsList(recent_changes, show_changes=True) %}
                </div>
        </div>
 {% end block %}
index 5b80d31c88ad66c84f0f65d198105a17b022c476..7f9befc493725feead19a3da91a0a72181a48672 100644 (file)
@@ -7,7 +7,7 @@
                <div class="card-body">
             <h4 class="card-title">{{ _("Revisions of %s") % page.title }}</h4>
 
-                       {% module WikiList(page.get_revisions(), show_breadcrumbs=False, link_revision=True, show_changes=True) %}
+                       {% module DocsList(page.get_revisions(), show_breadcrumbs=False, link_revision=True, show_changes=True) %}
                </div>
        </div>
 {% end block %}
index 8689b833ab7ab51b6205debce2aa6043c15d54a2..1d45a662e57a2f451067147265b8f195d7fe0174 100644 (file)
@@ -7,7 +7,7 @@
                <div class="card-body">
                        <h5>{{ _("Search results for '%s'") % q }}</h5>
 
-                       {% module WikiList(pages, show_author=False) %}
+                       {% module DocsList(pages, show_author=False) %}
                </div>
        </div>
 {% end block %}
index 2234fecb9ae378e0391187b763231bb952b8c0b5..4a4aee6dd890ee79b7e3d5a1bb78b016b5b1d791 100644 (file)
@@ -16,7 +16,7 @@
                        <h5>{{ _("Your Watchlist") }}</h5>
 
                        {% if pages %}
-                               {% module WikiList(pages) %}
+                               {% module DocsList(pages) %}
                        {% else %}
                                <div class="alert alert-light mb-0">
                                        {{ _("You do not have any pages on your watchlist") }}
index 1bf9e69a6bc98dfd85ed51936daa32a15afa2870..cae5bc012765eda73283e7e2a4f9144f93c1fe45 100644 (file)
@@ -28,7 +28,6 @@ from . import people
 from . import ui_modules
 from . import users
 from . import voip
-from . import wiki
 
 class Application(tornado.web.Application):
        def __init__(self, config, **kwargs):
@@ -77,6 +76,7 @@ class Application(tornado.web.Application):
                                # Docs
                                "DocsDiff"             : docs.DiffModule,
                                "DocsHeader"           : docs.HeaderModule,
+                               "DocsList"             : docs.ListModule,
 
                                # Nopaste
                                "Code"                 : nopaste.CodeModule,
@@ -96,9 +96,6 @@ class Application(tornado.web.Application):
                                "VoIPQueues"           : voip.QueuesModule,
                                "VoIPRegistrations"    : voip.RegistrationsModule,
 
-                               # Wiki
-                               "WikiList"             : wiki.WikiListModule,
-
                                # Misc
                                "ChristmasBanner"      : ui_modules.ChristmasBannerModule,
                                "Markdown"             : ui_modules.MarkdownModule,
index 77add707b3e952eae287fb887285335c34759680..c4b77ba30e7cec1bc61af5f67c48ec04ec44bf74 100644 (file)
@@ -375,6 +375,14 @@ class WatchlistHandler(base.BaseHandler):
                self.render("docs/watchlist.html", pages=pages)
 
 
+class ListModule(ui_modules.UIModule):
+       def render(self, pages, link_revision=False, show_breadcrumbs=True,
+                       show_author=True, show_changes=False):
+               return self.render_string("docs/modules/list.html", link_revision=link_revision,
+                       pages=pages, show_breadcrumbs=show_breadcrumbs,
+                       show_author=show_author, show_changes=show_changes)
+
+
 class HeaderModule(ui_modules.UIModule):
        @property
        def page(self):
diff --git a/src/web/wiki.py b/src/web/wiki.py
deleted file mode 100644 (file)
index 1eb4a0c..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-#!/usr/bin/python3
-
-from . import ui_modules
-
-class WikiListModule(ui_modules.UIModule):
-       def render(self, pages, link_revision=False, show_breadcrumbs=True,
-                       show_author=True, show_changes=False):
-               return self.render_string("wiki/modules/list.html", link_revision=link_revision,
-                       pages=pages, show_breadcrumbs=show_breadcrumbs,
-                       show_author=show_author, show_changes=show_changes)