]> git.ipfire.org Git - ipfire.org.git/commitdiff
wiki: Show diff link only when changes are shown
authorMichael Tremer <michael.tremer@ipfire.org>
Mon, 3 Dec 2018 18:45:13 +0000 (18:45 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Mon, 3 Dec 2018 18:45:13 +0000 (18:45 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/templates/wiki/modules/list.html

index 16bb15e775113f209c8b0d7f433a0261a613adf8..9b2712cd1cc30dbe2c8f71d6b54063df4b7f7066 100644 (file)
                        <a href="/users/{{ page.author.uid }}">{{ page.author }}</a>
                {% end %}
 
-               {% if page.previous_revision %}
-                       <a href="{{ page.url }}?action=diff&a={{ page.previous_revision.timestamp.isoformat() }}&b={{ page.timestamp.isoformat() }}">
-                               <span class="fas fa-exchange-alt"></span>
-                       </a>
-               {% end %}
+               {% if show_changes %}
+                       {% if page.changes %}
+                               &bull; {{ page.changes }}
+                       {% end %}
 
-               {% if show_changes and page.changes %}
-                       &bull; {{ page.changes }}
+                       {% if page.previous_revision %}
+                               <a href="{{ page.url }}?action=diff&a={{ page.previous_revision.timestamp.isoformat() }}&b={{ page.timestamp.isoformat() }}">
+                                       <span class="fas fa-exchange-alt ml-1"></span>
+                               </a>
+                       {% end %}
                {% end %}
        </p>
 {% end %}