added code to prevent diary nav from dipping under 0 and soaring over the total

This commit is contained in:
chimchooree
2020-10-01 19:13:03 -05:00
parent 3a08c07f92
commit 013ad596f4
2 changed files with 11 additions and 1 deletions
+9
View File
@@ -2,6 +2,15 @@
<div class="dir-row"> </div>
<div class="diary-dir">
<%
if page < 0:
page = 0
end
if page > total:
page = total
end
%>
% for i in range(max(0,page - limit), min(total,page + limit)):
% if i == page:
<b>{{i}}</b>