From: Michael Tremer Date: Wed, 8 May 2019 17:00:20 +0000 (+0100) Subject: wiki: Remove author from search results X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=27ac1524aa0dcc69812f72e781c1df7b985fa862;p=ipfire.org.git wiki: Remove author from search results This is not relevant here Signed-off-by: Michael Tremer --- diff --git a/src/templates/wiki/modules/list.html b/src/templates/wiki/modules/list.html index 9b2712cd..0663fd21 100644 --- a/src/templates/wiki/modules/list.html +++ b/src/templates/wiki/modules/list.html @@ -10,11 +10,13 @@

- {{ locale.format_date(page.timestamp, shorter=True, relative=False) }} + {% if show_author %} + {{ _("Last edited %s") % locale.format_date(page.timestamp, shorter=True, relative=False) }} - {% if page.author %} - {{ _("by") }} - {{ page.author }} + {% if page.author %} + {{ _("by") }} + {{ page.author }} + {% end %} {% end %} {% if show_changes %} diff --git a/src/templates/wiki/search-results.html b/src/templates/wiki/search-results.html index 5e514734..8689b833 100644 --- a/src/templates/wiki/search-results.html +++ b/src/templates/wiki/search-results.html @@ -7,7 +7,7 @@

{{ _("Search results for '%s'") % q }}
- {% module WikiList(pages) %} + {% module WikiList(pages, show_author=False) %}
{% end block %} diff --git a/src/web/wiki.py b/src/web/wiki.py index bce58ca1..76433dc7 100644 --- a/src/web/wiki.py +++ b/src/web/wiki.py @@ -259,9 +259,11 @@ class WikiDiffModule(ui_modules.UIModule): class WikiListModule(ui_modules.UIModule): - def render(self, pages, link_revision=False, show_breadcrumbs=True, show_changes=False): + 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_changes=show_changes) + pages=pages, show_breadcrumbs=show_breadcrumbs, + show_author=show_author, show_changes=show_changes) class WikiNavbarModule(ui_modules.UIModule):