Handle stopped reading special case in javascript
This should be refactored, but maybe not today
This commit is contained in:
parent
4c5d2570ab
commit
4905652e22
3 changed files with 12 additions and 3 deletions
|
@ -14,8 +14,8 @@
|
|||
</div>
|
||||
|
||||
<div
|
||||
class="{% if next_shelf_identifier != 'stopped-reading' %}is-hidden{% endif %}"
|
||||
data-shelf-identifier="stopped-reading"
|
||||
class="{% if next_shelf_identifier != 'stopped-reading-complete' %}is-hidden{% endif %}"
|
||||
data-shelf-identifier="stopped-reading-complete"
|
||||
>
|
||||
<button type="button" class="button {{ class }}" disabled>
|
||||
<span>{% trans "Stopped reading" %}</span>
|
||||
|
@ -42,6 +42,14 @@
|
|||
{% join "finish_reading" button_uuid as modal_id %}
|
||||
{% include 'snippets/shelve_button/modal_button.html' with class=class fallback_url=fallback_url %}
|
||||
|
||||
|
||||
{% elif shelf.identifier == 'stopped-reading' %}
|
||||
|
||||
{% trans "Stop reading" as button_text %}
|
||||
{% url 'reading-status' 'finish' book.id as fallback_url %}
|
||||
{% join "stop_reading" button_uuid as modal_id %}
|
||||
{% include 'snippets/shelve_button/modal_button.html' with class=class fallback_url=fallback_url %}
|
||||
|
||||
{% elif shelf.identifier == 'to-read' %}
|
||||
|
||||
{% trans "Want to read" as button_text %}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue