2021-02-28 02:48:10 +00:00
|
|
|
{% load i18n %}
|
2021-01-20 07:04:08 +00:00
|
|
|
<form class="field is-grouped is-small" action="/edit-readthrough" method="POST">
|
2020-11-26 06:37:18 +00:00
|
|
|
{% csrf_token %}
|
|
|
|
<input type="hidden" name="id" value="{{ readthrough.id }}"/>
|
2021-01-22 17:19:02 +00:00
|
|
|
<div class="field">
|
2021-02-28 02:48:10 +00:00
|
|
|
<label class="label is-align-self-center mb-0 pr-2" for="progress">{% trans "Progress:" %}</label>
|
2021-01-22 17:19:02 +00:00
|
|
|
<div class="field has-addons mb-0">
|
2021-01-20 07:04:08 +00:00
|
|
|
<div class="control">
|
|
|
|
<input
|
2021-03-04 18:42:23 +00:00
|
|
|
class="input is-small"
|
|
|
|
type="number"
|
|
|
|
name="progress"
|
|
|
|
value="{{ readthrough.progress|default:'' }}"
|
|
|
|
min="0"
|
|
|
|
size="3"
|
|
|
|
aria-label="{% if readthrough.progress_mode == 'PG' %}Current page{% else %}Percent read{% endif %}"
|
|
|
|
/>
|
2021-01-20 07:04:08 +00:00
|
|
|
</div>
|
2021-01-22 17:19:02 +00:00
|
|
|
<div class="control select is-small">
|
|
|
|
<select name="progress_mode" aria-label="Progress mode">
|
2021-02-28 02:48:10 +00:00
|
|
|
<option value="PG" {% if readthrough.progress_mode == 'PG' %}selected{% endif %}>{% trans "pages" %}</option>
|
|
|
|
<option value="PCT" {% if readthrough.progress_mode == 'PCT' %}selected{% endif %}>{% trans "percent" %}</option>
|
2021-01-22 17:19:02 +00:00
|
|
|
</select>
|
|
|
|
</div>
|
2021-01-20 07:04:08 +00:00
|
|
|
<div class="control">
|
2021-02-28 02:48:10 +00:00
|
|
|
<button class="button is-small px-2 is-primary" type="submit">{% trans "Save" %}</button>
|
2021-01-20 07:04:08 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
2021-01-22 17:19:02 +00:00
|
|
|
{% if readthrough.progress_mode == 'PG' and book.pages %}
|
2021-03-19 18:58:27 +00:00
|
|
|
<p class="help">{% blocktrans with pages=book.pages %}of {{ pages }} pages{% endblocktrans %}</p>
|
2021-01-22 17:19:02 +00:00
|
|
|
{% endif %}
|
2020-11-26 06:37:18 +00:00
|
|
|
</div>
|
|
|
|
</form>
|