]> git.ipfire.org Git - ipfire.org.git/commitdiff
wiki: Remove author from search results
authorMichael Tremer <michael.tremer@ipfire.org>
Wed, 8 May 2019 17:00:20 +0000 (18:00 +0100)
committerMichael Tremer <michael.tremer@ipfire.org>
Wed, 8 May 2019 17:45:13 +0000 (18:45 +0100)
This is not relevant here

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/templates/wiki/modules/list.html
src/templates/wiki/search-results.html
src/web/wiki.py

index 9b2712cd1cc30dbe2c8f71d6b54063df4b7f7066..0663fd21a53c84dd206ed560955c099ca4eafeb2 100644 (file)
        </strong>
 
        <p class="text-muted small">
-               {{ 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") }}
-                       <a href="/users/{{ page.author.uid }}">{{ page.author }}</a>
+                       {% if page.author %}
+                               {{ _("by") }}
+                               <a href="/users/{{ page.author.uid }}">{{ page.author }}</a>
+                       {% end %}
                {% end %}
 
                {% if show_changes %}
index 5e514734c4ec281f94cb5c3a007be021d1d40d1d..8689b833ab7ab51b6205debce2aa6043c15d54a2 100644 (file)
@@ -7,7 +7,7 @@
                <div class="card-body">
                        <h5>{{ _("Search results for '%s'") % q }}</h5>
 
-                       {% module WikiList(pages) %}
+                       {% module WikiList(pages, show_author=False) %}
                </div>
        </div>
 {% end block %}
index bce58ca1e0e614443c73df4737bde3234f93c1f6..76433dc73dda3d4e6c76e98203f2b77164251baf 100644 (file)
@@ -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):