1
0
Fork 0

Merge pull request #2007 from viviicat/url-names

Add names of books/lists/authors/etc as slugs, redirect to slugified version of the page
This commit is contained in:
Mouse Reeve 2022-05-16 08:04:58 -07:00 committed by GitHub
commit 241169650d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
15 changed files with 106 additions and 23 deletions

View file

@ -284,7 +284,7 @@
{% if user_statuses.review_count or user_statuses.comment_count or user_statuses.quotation_count %}
<nav class="tabs">
<ul>
{% url 'book' book.id as tab_url %}
{% url 'book' book.id book.name|slugify as tab_url %}
<li {% if tab_url == request.path %}class="is-active"{% endif %}>
<a href="{{ tab_url }}#reviews">{% trans "Reviews" %} ({{ review_count }})</a>
</li>

View file

@ -15,7 +15,7 @@
<nav class="breadcrumb subtitle" aria-label="breadcrumbs">
<ul>
<li><a href="{% url 'book' book.id %}">{{ book|book_title }}</a></li>
<li><a href="{% url 'book' book.id book.name|slugify %}">{{ book|book_title }}</a></li>
<li class="is-active">
<a href="#" aria-current="page">
{% trans "Edit links" %}