1
0
Fork 0

Use reverse lookups for urls

This commit is contained in:
Mouse Reeve 2021-05-04 09:34:16 -07:00
parent 33ec315fbf
commit 748810cd41
18 changed files with 42 additions and 35 deletions

View file

@ -239,7 +239,7 @@
{% if not confirm_mode %}
<div class="block">
<button class="button is-primary" type="submit">{% trans "Save" %}</button>
<a class="button" href="/book/{{ book.id }}">{% trans "Cancel" %}</a>
<a class="button" href="{{ book.local_path}}">{% trans "Cancel" %}</a>
</div>
{% endif %}
</form>

View file

@ -15,14 +15,14 @@
{% for book in editions %}
<div class="columns is-gapless mb-6">
<div class="column is-cover">
<a href="/book/{{ book.id }}">
<a href="{{ book.local_path }}">
{% include 'snippets/book_cover.html' with book=book cover_class='is-w-m is-h-m align to-l-mobile' %}
</a>
</div>
<div class="column my-3-mobile ml-3-tablet mr-auto">
<h2 class="title is-5 mb-1">
<a href="/book/{{ book.id }}" class="has-text-black">
<a href="{{ book.local_path }}" class="has-text-black">
{{ book.title }}
</a>
</h2>