From 8c485c9ea596c9a72a3bdc74ace22212d3a5cfec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20P=C3=A9ters?= Date: Sun, 21 Oct 2018 12:42:40 +0200 Subject: [PATCH] wcs: add generic support for a picture in forms of a category cell (#27972) --- .../wcs/templates/combo/wcs/forms_of_category.html | 10 +++++++++- combo/settings.py | 7 ++++++- tests/test_wcs.py | 5 +++-- 3 files changed, 18 insertions(+), 4 deletions(-) diff --git a/combo/apps/wcs/templates/combo/wcs/forms_of_category.html b/combo/apps/wcs/templates/combo/wcs/forms_of_category.html index 367638c5..927e04cc 100644 --- a/combo/apps/wcs/templates/combo/wcs/forms_of_category.html +++ b/combo/apps/wcs/templates/combo/wcs/forms_of_category.html @@ -1,12 +1,20 @@ -{% load i18n %} +{% load assets i18n %} {% block cell-content %}
+{% block cell-header %}

{{ title }}

+{% get_asset "wcs:category:picture:"|add:cell.category_reference as asset %} +{% if asset %} + + + +{% endif %} {% if description %}
{{ description|safe }}
{% endif %} +{% endblock %}