Skip to content

Commit bc38ec3

Browse files
committed
fix: correct blame link to historic revision
- fix typo `resivion` -> `revision` in the blame dropdown link - pass `revision` to the blame template render context - link the revision breadcrumb to `view` instead of `history` This was brought up in #484.
1 parent e15dbef commit bc38ec3

3 files changed

Lines changed: 3 additions & 2 deletions

File tree

otterwiki/templates/page.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
</span>
3333
History
3434
</a>
35-
<a href="{{ url_for('blame', path=pagepath, revision=resivion) if revision else url_for('blame', path=pagepath) }}" class="dropdown-item-with-icon">
35+
<a href="{{ url_for('blame', path=pagepath, revision=revision) if revision else url_for('blame', path=pagepath) }}" class="dropdown-item-with-icon">
3636
<span class="dropdown-icon">
3737
<i class="fas fa-people-arrows"></i>
3838
</span>

otterwiki/templates/snippets/breadcrumbs.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<li class="breadcrumb-item"><a href="{{ url_for('view', path=bpath) }}">{{bname}}</a></li>
88
{% endfor %}
99
{%if revision %}
10-
<li class="breadcrumb-item"><a href="{{ url_for('history', path=pagepath, revision=revision ) }}"><span class="revision-small">{{revision}}</span></a></li>
10+
<li class="breadcrumb-item"><a href="{{ url_for('view', path=pagepath, revision=revision ) }}"><span class="revision-small">{{revision}}</span></a></li>
1111
{% endif %}
1212
</li>
1313
</ul>

otterwiki/wiki.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -908,6 +908,7 @@ def blame(self):
908908
menutree=menutree.query(),
909909
custom_menu=SidebarMenu().query(),
910910
breadcrumbs=self.breadcrumbs(),
911+
revision=self.revision,
911912
)
912913

913914
def diff(self, rev_a=None, rev_b=None):

0 commit comments

Comments
 (0)