summaryrefslogtreecommitdiffstats
path: root/templates/activities/compose.html
diff options
context:
space:
mode:
authorAndrew Godwin2022-12-01 18:46:49 -0700
committerAndrew Godwin2022-12-01 18:47:04 -0700
commit6f2f28a3a752cc47d9dc96bda862ed67cd75c9af (patch)
tree1165843b5c207d9e50028bf48db399df20cf7552 /templates/activities/compose.html
parenta826ae18ea41e44614ce20d5caad9425d76aa60d (diff)
downloadtakahe-6f2f28a3a752cc47d9dc96bda862ed67cd75c9af.tar.gz
takahe-6f2f28a3a752cc47d9dc96bda862ed67cd75c9af.tar.bz2
takahe-6f2f28a3a752cc47d9dc96bda862ed67cd75c9af.zip
Image attachment uploads
Diffstat (limited to 'templates/activities/compose.html')
-rw-r--r--templates/activities/compose.html18
1 files changed, 17 insertions, 1 deletions
diff --git a/templates/activities/compose.html b/templates/activities/compose.html
index 4809177..7065863 100644
--- a/templates/activities/compose.html
+++ b/templates/activities/compose.html
@@ -17,8 +17,24 @@
{% include "forms/_field.html" with field=form.content_warning %}
{% include "forms/_field.html" with field=form.visibility %}
</fieldset>
+ <fieldset>
+ <legend>Images</legend>
+ {% if post %}
+ {% for attachment in post.attachments.all %}
+ {% include "activities/_image_uploaded.html" %}
+ {% endfor %}
+ {% endif %}
+ {% if not post or post.attachments.count < 4 %}
+ <a class="button add-image"
+ hx-get='{% url "compose_image_upload" %}'
+ hx-target="this"
+ hx-swap="outerHTML">
+ Add Image
+ </a>
+ {% endif %}
+ </fieldset>
<div class="buttons">
- <button>{% if form.id.value %}Edit{% elif config_identity.toot_mode %}Toot!{% else %}Post{% endif %}</button>
+ <button>{% if post %}Save Edits{% elif config_identity.toot_mode %}Toot!{% else %}Post{% endif %}</button>
</div>
</form>
{% endblock %}