added code to prevent diary nav from dipping under 0 and soaring over the total
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user