Skip to content

Commit

Permalink
feat: Quality of Life on /../history
Browse files Browse the repository at this point in the history
- Now the current and previous revision are preselected to make
  comparison easier.
  • Loading branch information
redimp committed Aug 13, 2024
1 parent 521a8a4 commit 0f20d98
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion otterwiki/wiki.py
Original file line number Diff line number Diff line change
Expand Up @@ -782,7 +782,11 @@ def history(self, rev_a=None, rev_b=None):
return self.diff(rev_a=rev_a, rev_b=rev_b)

log = []
for orig_entry in orig_log:
for i,orig_entry in enumerate(orig_log):
if len(orig_log)>1 and i == 0 and rev_b is None:
rev_b = orig_entry['revision']
elif len(orig_log)>1 and i == 1 and rev_a is None:
rev_a = orig_entry['revision']
entry = dict(orig_entry)
entry["url"] = url_for(
"view", path=self.pagepath, revision=entry["revision"]
Expand Down

0 comments on commit 0f20d98

Please sign in to comment.