mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2024-11-27 12:01:14 +00:00
Save reading status update
This commit is contained in:
parent
2d20fa4146
commit
48c6a3923a
5 changed files with 6 additions and 1 deletions
|
@ -86,6 +86,7 @@ class CommentForm(CustomForm):
|
||||||
"privacy",
|
"privacy",
|
||||||
"progress",
|
"progress",
|
||||||
"progress_mode",
|
"progress_mode",
|
||||||
|
"reading_status",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -11,6 +11,7 @@ Finish "<em>{{ book_title }}</em>"
|
||||||
{% block modal-form-open %}
|
{% block modal-form-open %}
|
||||||
<form name="finish-reading" action="{% url 'reading-status' 'finish' book.id %}" method="post">
|
<form name="finish-reading" action="{% url 'reading-status' 'finish' book.id %}" method="post">
|
||||||
{% csrf_token %}
|
{% csrf_token %}
|
||||||
|
<input type="hidden" name="reading_status" value="read">
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block reading-dates %}
|
{% block reading-dates %}
|
||||||
|
|
|
@ -10,6 +10,7 @@ Start "<em>{{ book_title }}</em>"
|
||||||
|
|
||||||
{% block modal-form-open %}
|
{% block modal-form-open %}
|
||||||
<form name="start-reading" action="{% url 'reading-status' 'start' book.id %}" method="post">
|
<form name="start-reading" action="{% url 'reading-status' 'start' book.id %}" method="post">
|
||||||
|
<input type="hidden" name="reading_status" value="reading">
|
||||||
{% csrf_token %}
|
{% csrf_token %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
|
|
|
@ -10,5 +10,6 @@ Want to Read "<em>{{ book_title }}</em>"
|
||||||
|
|
||||||
{% block modal-form-open %}
|
{% block modal-form-open %}
|
||||||
<form name="shelve" action="{% url 'reading-status' 'want' book.id %}" method="post">
|
<form name="shelve" action="{% url 'reading-status' 'want' book.id %}" method="post">
|
||||||
|
<input type="hidden" name="reading_status" value="toRead">
|
||||||
{% csrf_token %}
|
{% csrf_token %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
|
@ -70,7 +70,8 @@ def get_header_template(status):
|
||||||
"""get the path for the status template"""
|
"""get the path for the status template"""
|
||||||
if isinstance(status, models.Boost):
|
if isinstance(status, models.Boost):
|
||||||
status = status.boosted_status
|
status = status.boosted_status
|
||||||
filename = "snippets/status/headers/{:s}.html".format(status.status_type.lower())
|
header_type = status.reading_status or status.status_type.lower()
|
||||||
|
filename = f"snippets/status/headers/{header_type}.html"
|
||||||
header_template = select_template([filename, "snippets/status/headers/note.html"])
|
header_template = select_template([filename, "snippets/status/headers/note.html"])
|
||||||
return header_template.render({"status": status})
|
return header_template.render({"status": status})
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue