diff --git a/plants/templates/plants/plant_detail.html b/plants/templates/plants/plant_detail.html index 653415c..d8b56c4 100644 --- a/plants/templates/plants/plant_detail.html +++ b/plants/templates/plants/plant_detail.html @@ -1,109 +1,121 @@ +{# plants/templates/plants/plant_detail.html #} {% extends "plants/base.html" %} +{% load plant_extras %} {% block title %}{{ plant.name }} — BloomBase{% endblock %} {% block content %} -
- -
{{ plant.name }}
- ✏️ + +
+ {% if plant.species and plant.species.api_image_url %} + {{ plant.name }} + {% elif plant.thumbnail_url %} + {{ plant.name }} + {% else %} +
🌿
+ {% endif %} +
+ + ← Back + + Edit + +
-
-{% if plant.species and plant.species.api_image_url %} -{{ plant.species.common_name }} -{% elif plant.thumbnail_url %} -{{ plant.name }} -{% else %} -
🌿
-{% endif %} -
+
-
-
-
{{ plant.name }}
-
- {% if plant.species %}{{ plant.species.scientific_name }}{% endif %} - - - -
-
- - {% if plant.is_indoor %}Indoor{% else %}Outdoor{% endif %} - -
+ +

{{ plant.name }}

+ {% if plant.species %} +
+ {{ plant.species.scientific_name }} + + + +
+ {% endif %} -{% if plant.location %}

📍 {{ plant.location.name }}

{% endif %} + {% if plant.location %} +

+ 📍 {{ plant.location.name }} +

+ {% endif %} -{% if plant.watering or plant.sunlight or plant.species %} -
+ + {% if plant.watering or plant.sunlight or plant.species %} +
{% if plant.watering %} - {{ plant.get_watering_display }} - {% elif plant.species.watering %} - 💧 {{ plant.species.watering }} +
+ 💧 + {{ plant.get_watering_display }} +
+ {% elif plant.species and plant.species.watering %} +
+ 💧 + {{ plant.species.watering }} +
{% endif %} {% if plant.sunlight %} - {{ plant.get_sunlight_display }} - {% elif plant.species.sunlight %} - ☀️ {{ plant.species.sunlight }} - {% endif %} - {% if plant.species.max_height_cm %} - 📏 up to {{ plant.species.max_height_cm }} cm - {% endif %} - {% if plant.species.frost_hardiness_c is not None %} - ❄️ {{ plant.species.frost_hardiness_c }}°C - {% endif %} - {% if plant.species.planting_density_m2 %} - 🌿 {{ plant.species.planting_density_m2 }}/m² - {% endif %} - {% if plant.species.growth_rate %} - 🌱 {{ plant.species.growth_rate }} - {% endif %} -
-{% endif %} -{% if plant.species and plant.species.vpc_slug %} -
-
- {% csrf_token %} - - -
-
-{% endif %} - -{% load plant_extras %} -{% if plant.bloom_months %} -
- 🌸 Bloom -
{% month_strip plant.bloom_months %}
-
-{% endif %} - -{% if plant.notes %} -
-
- {{ plant.notes|linebreaksbr }} +
+ ☀️ + {{ plant.get_sunlight_display }} +
+ {% elif plant.species and plant.species.sunlight %} +
+ ☀️ + {{ plant.species.sunlight }}
-
-{% endif %} - -{% if plant.pruning_months %} -{% include "plants/partials/pruning_strip.html" %} -{% endif %} - - - -
- 🪧 Plant card - {% if plant.card_photos.all %} - ✂️ Crop thumbnail {% endif %} - Delete plant -
+ {% if plant.species and plant.species.frost_hardiness_c is not None %} +
+ 🌡️ + {{ plant.species.frost_hardiness_c }}°C min +
+ {% endif %} + {% if plant.species and plant.species.max_height_cm %} +
+ 📏 + {{ plant.species.max_height_cm }} cm +
+ {% endif %} +
+ {% endif %} + + {% if plant.bloom_months %} +
+

🌸 Bloom months

+ {% month_strip plant.bloom_months %} +
+ {% endif %} + + + {% if plant.notes %} +
+

{{ plant.notes|linebreaksbr }}

+
+ {% endif %} + + + {% if plant.pruning_months %} + {% include "plants/partials/pruning_strip.html" %} + {% endif %} + + + + + + + +
{% endblock %} diff --git a/plants/views/plants.py b/plants/views/plants.py index 1931250..5c793fc 100644 --- a/plants/views/plants.py +++ b/plants/views/plants.py @@ -42,6 +42,7 @@ def plant_detail(request, pk): 'pruning_status': pruning_status(plant, today), 'log_form': PruningLogForm(initial={'pruned_on': today}), 'today': today, + 'active_tab': 'garden', })