From 4e7655bf467dfc9993a1eb5bf716647d530882c2 Mon Sep 17 00:00:00 2001 From: Stephan Kerkman Date: Mon, 1 Jun 2026 17:54:17 +0200 Subject: [PATCH] =?UTF-8?q?feat:=20restyle=20identify=5Fconfirm=20?= =?UTF-8?q?=E2=80=94=20match=20cards=20with=20confidence=20badges,=20locat?= =?UTF-8?q?ion=20chips?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plants/templates/plants/identify_confirm.html | 135 ++++++++++++------ plants/views/identify.py | 6 +- 2 files changed, 96 insertions(+), 45 deletions(-) diff --git a/plants/templates/plants/identify_confirm.html b/plants/templates/plants/identify_confirm.html index a64539a..c277c63 100644 --- a/plants/templates/plants/identify_confirm.html +++ b/plants/templates/plants/identify_confirm.html @@ -1,62 +1,109 @@ +{# plants/templates/plants/identify_confirm.html #} {% extends "plants/base.html" %} {% block title %}Confirm species — BloomBase{% endblock %} {% block content %} -
- -
Is this your plant?
-
+
-

Tap the correct species, then confirm.

+
+ +

Is this your plant?

+
+

+ Tap the correct species, then confirm. +

-
+ {% csrf_token %} -
- {% for m in matches %} -
- {% if m.image_url %} - {{ m.scientific_name }} - {% else %} -
- {% endif %} -
-
{{ m.scientific_name }}
- {% if m.common_names %} -
{{ m.common_names|join:", " }}
- {% endif %} -
{{ m.family }}
-
-
- - {% widthratio m.score 1 100 %}% - -
+
+ {% for m in matches %} +
+ {% if m.image_url %} + {{ m.scientific_name }} + {% else %} +
🌿
+ {% endif %} +
+
{{ m.scientific_name }}
+ {% if m.common_names %} +
+ {{ m.common_names|join:", " }} +
+ {% endif %} +
{{ m.family }}
- {% endfor %} + + {% widthratio m.score 1 100 %}% + +
+ {% endfor %}
- - + + +
{% endblock %} diff --git a/plants/views/identify.py b/plants/views/identify.py index 1b74fa9..7218830 100644 --- a/plants/views/identify.py +++ b/plants/views/identify.py @@ -100,7 +100,11 @@ def identify_confirm(request): return redirect('identify_fields') - return render(request, 'plants/identify_confirm.html', {'matches': matches}) + locations = list(Location.objects.all()) + return render(request, 'plants/identify_confirm.html', { + 'matches': matches, + 'locations': locations, + }) def _apply_vpc_care_fields(species, vpc_result):