2021-08-09 01:40:47 +00:00
|
|
|
{% extends "snippets/create_status/layout.html" %}
|
|
|
|
{% load bookwyrm_tags %}
|
|
|
|
{% load utilities %}
|
|
|
|
{% load status_display %}
|
|
|
|
{% load i18n %}
|
|
|
|
|
|
|
|
{% comment %}
|
|
|
|
----- Variables
|
|
|
|
book: the Edition object this status is related to. Required unless the status is a reply
|
|
|
|
draft: the content of an existing Status object to be edited (used in delete and redraft)
|
|
|
|
uuid: a unique identifier used to make html "id" attributes unique and clarify javascript controls
|
|
|
|
{% endcomment %}
|
|
|
|
|
|
|
|
{% block pre_content_additions %}
|
|
|
|
<div class="field">
|
|
|
|
<label class="label" for="id_quote_{{ book.id }}_{{ type }}">
|
|
|
|
{% trans "Quote:" %}
|
|
|
|
</label>
|
|
|
|
|
|
|
|
<div class="control">
|
|
|
|
<textarea
|
|
|
|
name="quote"
|
|
|
|
class="textarea"
|
|
|
|
id="id_quote_{{ book.id }}_{{ type }}"
|
|
|
|
placeholder="{% blocktrans with book_title=book.title %}An excerpt from '{{ book_title }}'{% endblocktrans %}"
|
|
|
|
required
|
2021-10-14 23:53:46 +00:00
|
|
|
{% if not draft %}data-cache-draft="id_quote_{{ book.id }}_{{ type }}"{% endif %}
|
2021-08-09 01:40:47 +00:00
|
|
|
>{{ draft.quote|default:'' }}</textarea>
|
|
|
|
</div>
|
|
|
|
</div>
|
2021-09-05 23:00:40 +00:00
|
|
|
<div class="field">
|
|
|
|
<label class="label" for="position_{{ uuid }}">{% trans "Position:" %}</label>
|
|
|
|
<div class="field has-addons mb-0">
|
|
|
|
<div class="control">
|
|
|
|
<div class="select">
|
2021-09-09 02:30:24 +00:00
|
|
|
<select
|
|
|
|
name="position_mode"
|
|
|
|
aria-label="Position mode"
|
2021-10-14 23:53:46 +00:00
|
|
|
{% if not draft %}data-cache-draft="id_position_mode_{{ book.id }}_{{ type }}"{% endif %}
|
2021-09-09 02:30:24 +00:00
|
|
|
>
|
2021-09-05 23:00:40 +00:00
|
|
|
<option
|
|
|
|
value="PG"
|
|
|
|
{% if draft.position_mode == 'PG' or not draft %}selected{% endif %}
|
|
|
|
>
|
|
|
|
{% trans "On page:" %}
|
|
|
|
</option>
|
|
|
|
<option
|
|
|
|
value="PCT"
|
|
|
|
{% if draft.position_mode == 'PCT' %}selected{% endif %}
|
|
|
|
>
|
|
|
|
{% trans "At percent:" %}
|
|
|
|
</option>
|
|
|
|
</select>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="control">
|
|
|
|
<input
|
|
|
|
aria-label="{% if draft.position_mode == 'PG' %}Page{% else %}Percent{% endif %}"
|
|
|
|
class="input"
|
|
|
|
type="number"
|
|
|
|
min="0"
|
|
|
|
name="position"
|
|
|
|
size="3"
|
|
|
|
value="{% firstof draft.position '' %}"
|
|
|
|
id="position_{{ uuid }}"
|
2021-10-14 23:53:46 +00:00
|
|
|
{% if not draft %}data-cache-draft="id_position_{{ book.id }}_{{ type }}"{% endif %}
|
2021-09-05 23:00:40 +00:00
|
|
|
>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2021-08-09 01:40:47 +00:00
|
|
|
{% endblock %}
|