From 27ac1524aa0dcc69812f72e781c1df7b985fa862 Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Wed, 8 May 2019 18:00:20 +0100 Subject: [PATCH] wiki: Remove author from search results This is not relevant here Signed-off-by: Michael Tremer --- src/templates/wiki/modules/list.html | 10 ++++++---- src/templates/wiki/search-results.html | 2 +- src/web/wiki.py | 6 ++++-- 3 files changed, 11 insertions(+), 7 deletions(-) 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): -- 2.39.2