diff --git a/plants/templates/plants/base.html b/plants/templates/plants/base.html index a425f10..656d7fd 100644 --- a/plants/templates/plants/base.html +++ b/plants/templates/plants/base.html @@ -31,7 +31,7 @@
Plants 📷 - + + +
diff --git a/plants/templates/plants/partials/species_results.html b/plants/templates/plants/partials/species_results.html index cf08276..e414be3 100644 --- a/plants/templates/plants/partials/species_results.html +++ b/plants/templates/plants/partials/species_results.html @@ -1,35 +1,3 @@ -{% if error %} -

⚠️ Perenual: {{ error }}

-{% endif %} - -{% for result in perenual_results %} -
-
- {% if result.default_image and result.default_image.thumbnail %} - - {% else %} -
🌿
- {% endif %} -
-
{{ result.common_name }}
- {{ result.scientific_name|join:", " }} -
- Perenual -
-
- {% csrf_token %} - - - - - - - - -
-
-{% endfor %} - {% for result in vpc_results %}
@@ -52,6 +20,6 @@
{% endfor %} -{% if not perenual_results and not vpc_results and not error and q %} -

No results for "{{ q }}"

+{% if not vpc_results and not error and q %} +

No VPC results for "{{ q }}"

{% endif %} diff --git a/plants/templates/plants/plant_detail.html b/plants/templates/plants/plant_detail.html index 68dc3c9..eff6f5a 100644 --- a/plants/templates/plants/plant_detail.html +++ b/plants/templates/plants/plant_detail.html @@ -87,11 +87,12 @@ {% include "plants/partials/photo_gallery.html" %}
-🪧 Plant card -{% if plant.card_photos.all %} -✂️ Crop thumbnail -{% endif %} - -Delete plant +
+ 🪧 Plant card + {% if plant.card_photos.all %} + ✂️ Crop thumbnail + {% endif %} + Delete plant +
{% endblock %} diff --git a/plants/tests/test_views.py b/plants/tests/test_views.py index 1e87813..c49fdb2 100644 --- a/plants/tests/test_views.py +++ b/plants/tests/test_views.py @@ -92,12 +92,12 @@ class TestPlantDetail: plant = Plant.objects.create(name='Fern') PlantCardPhoto.objects.create(plant=plant, image='plants/cards/card.jpg') resp = client.get(reverse('plant_detail', args=[plant.pk])) - assert 'View plant card' in resp.content.decode() + assert 'crop-thumbnail' in resp.content.decode() def test_card_button_hidden_when_no_card_photos(self, client): plant = Plant.objects.create(name='Fern') resp = client.get(reverse('plant_detail', args=[plant.pk])) - assert 'View plant card' not in resp.content.decode() + assert 'crop-thumbnail' not in resp.content.decode() @pytest.mark.django_db