Files
slump-x-land-studio/templates/admin/chapter-bulk-pages.html
T

31 lines
2.4 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
{% extends 'admin/base_site.html' %}
{% block content %}
<p><a href="{{ chapter_url }}">{{ chapter }}</a></p>
{% if chapter.cover %}<div class="studio-fixed-cover"><img src="{{ chapter.cover.url }}" alt="Separate chapter cover"><span>Cover · edit in chapter details</span></div>{% endif %}
<section class="traffic-panel"><h2>Saved pages</h2>
{% if pages %}
<p>Drag a thumbnail or use Earlier and Later. Select <strong>Save page changes</strong> to apply. Spread settings stay with their artwork.</p>
<form method="post" data-saved-art>
{% csrf_token %}
<input type="hidden" name="action" value="reorder">
<input type="hidden" name="deleted_pages">
<input type="hidden" name="original_order" value="{% for page in pages %}{{ page.pk }}{% if not forloop.last %},{% endif %}{% endfor %}">
<input type="hidden" name="page_order" value="{% for page in pages %}{{ page.pk }}{% if not forloop.last %},{% endif %}{% endfor %}">
<ol class="art-board" {% if can_reorder %}data-sort-art{% endif %}>
{% for page in pages %}<li data-art-id="{{ page.pk }}"><img src="{{ page.art.url }}" alt="Original page {{ page.number }}" loading="lazy" decoding="async">{% if can_remove %}<button type="button" class="art-remove" data-art-remove aria-label="Remove page {{ page.number }}">×</button><button type="button" class="art-undo" data-art-undo hidden>Undo removal</button>{% endif %}<strong>Page <span data-art-position>{{ forloop.counter }}</span></strong><small>{{ page.get_layout_display }}</small>
{% if can_reorder %}<div data-art-controls hidden><button type="button" data-shift="-1">Earlier</button><button type="button" data-shift="1">Later</button></div>{% endif %}</li>{% endfor %}
</ol>
{% if can_reorder %}<button class="studio-button studio-primary" type="submit">Save page changes</button>{% endif %}
</form>
{% else %}<p>No inside pages yet.</p>{% endif %}
</section>
{% if can_upload %}<section class="traffic-panel art-upload"><h2>Add pages</h2>
<p>Up to 24 JPG, PNG, or WebP images, 48 MB per batch and 12 MB per file. Drag to arrange the files or select × to leave a file out before saving. They will be converted to WebP and appended in this order.</p>
<form method="post" enctype="multipart/form-data" data-staged-art>
{% csrf_token %}{{ form.as_p }}
<ol class="art-board" data-sort-art></ol>
<div class="submit-row"><button class="studio-button studio-primary" type="submit">Convert and add pages</button></div>
</form>
</section>{% endif %}
{% endblock %}