diff --git a/plants/templates/plants/partials/photo_gallery.html b/plants/templates/plants/partials/photo_gallery.html index 7bcae6f..0a41fee 100644 --- a/plants/templates/plants/partials/photo_gallery.html +++ b/plants/templates/plants/partials/photo_gallery.html @@ -35,12 +35,30 @@
+ hx-encoding="multipart/form-data" hx-indicator="#photo-upload-spinner" + id="photo-upload-form"> {% csrf_token %} +
- - + + Uploading…
+ +{% if request.htmx %} +
+{% if plant.species and plant.species.api_image_url %} +{{ plant.species.common_name }} +{% elif plant.thumbnail_url %} +{{ plant.name }} +{% else %} +
🌿
+{% endif %} +
+{% endif %} diff --git a/plants/templates/plants/plant_detail.html b/plants/templates/plants/plant_detail.html index eff6f5a..97085b4 100644 --- a/plants/templates/plants/plant_detail.html +++ b/plants/templates/plants/plant_detail.html @@ -8,6 +8,7 @@ ✏️ +
{% if plant.species and plant.species.api_image_url %} {{ plant.species.common_name }} {% elif plant.thumbnail_url %} @@ -15,6 +16,7 @@ {% else %}
🌿
{% endif %} +