From 043820b563fde62379e0dfcf47b282d93b5b2c6f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=BD=D0=B0=D0=B1?= Date: Tue, 25 Aug 2020 19:00:32 +0200 Subject: [PATCH] Properly handle no commits in log.html Also make the Next link reassemble the path properly --- gitsrht/templates/log.html | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/gitsrht/templates/log.html b/gitsrht/templates/log.html index b78248f..b72427e 100644 --- a/gitsrht/templates/log.html +++ b/gitsrht/templates/log.html @@ -36,6 +36,7 @@
+ {% if commits %} {% if commits[-1].parents %} {% set show_commits = commits[:-1] %} {% else %} @@ -46,15 +47,20 @@ {{ utils.commit_event(repo, c, True, refs) }}
{% endfor %} + {% else %} +
+ No commits{% if path != [''] %} for this path{% endif %}. +
+ {% endif %}
- {% if commits[-1].parents %} + {% if commits and commits[-1].parents %} Next {{icon("caret-right")}} {% endif %} -- 2.38.4