Use local key instead of openlibrary key in urls
but uh maybe the local key shouldn't look so gnarly?
This commit is contained in:
@ -1 +1 @@
|
||||
<a href="/author/{{ book.authors.first.openlibrary_key }}" class="author">{{ book.authors.first.name }}</a>
|
||||
<a href="/author/{{ book.authors.first.local_key }}" class="author">{{ book.authors.first.name }}</a>
|
||||
|
@ -1,7 +1,7 @@
|
||||
{% load fr_display %}
|
||||
{% include 'snippets/book_cover.html' with book=book %}
|
||||
<p class="title">
|
||||
<a href="/book/{{ book.openlibrary_key }}">{{ book.title }}</a>
|
||||
<a href="/book/{{ book.local_key }}">{{ book.title }}</a>
|
||||
</p>
|
||||
<p>
|
||||
by {% include 'snippets/authors.html' with book=book %}
|
||||
|
@ -4,7 +4,7 @@
|
||||
<h2>
|
||||
{% include 'snippets/avatar.html' with user=user %}
|
||||
Your thoughts on
|
||||
<a href="/book/{{ book.openlibrary_key }}">{{ book.title }}</a>
|
||||
<a href="/book/{{ book.local_key }}">{{ book.title }}</a>
|
||||
by {% include 'snippets/authors.html' with book=book %}
|
||||
</h2>
|
||||
|
||||
@ -24,16 +24,14 @@
|
||||
{% include 'snippets/book_cover.html' with book=book %}
|
||||
<form class="tab-option-{{ book.id }} review-form" name="review" action="/review/" method="post" id="tab-review-{{ book.id }}">
|
||||
{% csrf_token %}
|
||||
{# todo: this shouldn't use the openlibrary key #}
|
||||
<input type="hidden" name="book" value="{{ book.openlibrary_key }}"></input>
|
||||
<input type="hidden" name="book" value="{{ book.local_key }}"></input>
|
||||
{{ review_form.as_p }}
|
||||
<button type="submit">post review</button>
|
||||
</form>
|
||||
|
||||
<form class="hidden tab-option-{{ book.id }} review-form" name="comment" action="/comment/" method="post" id="tab-comment-{{ book.id }}">
|
||||
{% csrf_token %}
|
||||
{# todo: this shouldn't use the openlibrary key #}
|
||||
<input type="hidden" name="book" value="{{ book.openlibrary_key }}"></input>
|
||||
<input type="hidden" name="book" value="{{ book.local_key }}"></input>
|
||||
{{ comment_form.as_p }}
|
||||
<button type="submit">post comment</button>
|
||||
</form>
|
||||
|
@ -33,7 +33,7 @@
|
||||
{% include 'snippets/book_cover.html' with book=book size="small" %}
|
||||
</td>
|
||||
<td>
|
||||
<a href="/book/{{ book.openlibrary_key }}">{{ book.title }}</a>
|
||||
<a href="/book/{{ book.local_key }}">{{ book.title }}</a>
|
||||
</td>
|
||||
<td>
|
||||
{{ book.authors.first.name }}
|
||||
@ -45,7 +45,7 @@
|
||||
{{ book.created_date | naturalday }}
|
||||
</td>
|
||||
<td>
|
||||
<a href="https://openlibrary.org{{ book.key }}" target="_blank">OpenLibrary</a>
|
||||
<a href="https://openlibrary.org/book/{{ book.openlibrary_key }}" target="_blank">OpenLibrary</a>
|
||||
</td>
|
||||
{% if ratings %}
|
||||
<td>
|
||||
|
@ -3,14 +3,14 @@
|
||||
{% if tag.identifier in user_tags %}
|
||||
<form class="tag-form" name="tag" action="/untag/" method="post">
|
||||
{% csrf_token %}
|
||||
<input type="hidden" name="book" value="{{ book.openlibrary_key }}"></input>
|
||||
<input type="hidden" name="book" value="{{ book.local_key }}"></input>
|
||||
<input type="hidden" name="name" value="{{ tag.name }}"></input>
|
||||
<button type="submit">x</button>
|
||||
</form>
|
||||
{% else %}
|
||||
<form class="tag-form" name="tag" action="/tag/" method="post">
|
||||
{% csrf_token %}
|
||||
<input type="hidden" name="book" value="{{ book.openlibrary_key }}"></input>
|
||||
<input type="hidden" name="book" value="{{ book.local_key }}"></input>
|
||||
<input type="hidden" name="name" value="{{ tag.name }}"></input>
|
||||
<button type="submit">+</button>
|
||||
</form>
|
||||
|
Reference in New Issue
Block a user