M gitsrht/templates/log.html => gitsrht/templates/log.html +3 -2
@@ 36,9 36,10 @@
<div class="row">
<div class="col-md-12">
<div class="event-list">
+ {% set full_path = path_join(*path) %}
{% for c in commits %}
<div class="event">
- {{ utils.commit_event(repo, c, True, refs) }}
+ {{ utils.commit_event(repo, c, True, refs, path=full_path) }}
</div>
{% else %}
<div class="event">
@@ 53,7 54,7 @@
owner=owner.canonical_name,
repo=repo.name,
ref=ref,
- path=path_join(*path),
+ path=full_path,
)}}?from={{commits[-1].id}}"
>Next {{icon("caret-right")}}</a>
{% endif %}
M gitsrht/templates/utils.html => gitsrht/templates/utils.html +2 -2
@@ 72,7 72,7 @@ endif %}{% endfor %}
{% macro commit_event(repo, c,
full_body=False, refs={}, full_id=False, diff=None, href=None,
- parents=False, skip_body=False, target_blank=False) %}
+ parents=False, skip_body=False, target_blank=False, path=None) %}
<div>
{% if full_id %}
{{c.id.hex}}
@@ 82,7 82,7 @@ endif %}{% endfor %}
href="{{href}}"
{% else %}
href="{{url_for("repo.commit", owner=repo.owner.canonical_name,
- repo=repo.name, ref=c.id.hex)}}"
+ repo=repo.name, ref=c.id.hex)}}{% if path %}#{{path}}{% endif %}"
{% endif %}
title="{{c.id.hex}}"
{% if target_blank %}