From 485243e1a0beba3b62d7ebba5a60ab70bab6772b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Laur=C3=A9line=20Gu=C3=A9rin?= {% endif %}
- {% if link_label and link_url %}
- {{ link_label }}
+ {% firstof item.link_field item.page item.url_template as link %}
+ {% if item.template and link %}
+ {% if not ul_display %} {% endif %}
+ {% with card.custom_fields|get:item.template|force_escape as link_label %}
+ {% if link_label %}
+ {% if item.link_field %}
+ {% with fields_by_varnames|get:item.link_field as field and card.fields|get:item.link_field as value %}
+ {% if field and value and field.type == 'file' %}
+ {{ link_label }}
+ {% endif %}
+ {% endwith %}
+ {% else %}
+ {% with item.page|default:item.url_template as url_key %}
+ {% with card.urls|get:url_key|force_escape as link_url %}
+ {% if link_url %}
+ {{ link_label }}
+ {% endif %}
+ {% endwith %}
+ {% endwith %}
{% endif %}
- {% if not ul_display %} {% endif %}
- {% endwith %}
+ {% endif %}
{% endwith %}
+ {% if not ul_display %}{% endif %}
{% endif %}
{% else %}
{% if item.varname %}
- {% with fields_by_varnames|get:item.varname as field %}
- {% if field %}
- {% with card.fields|get:item.varname as value %}
- {% if value %}
- {% if not ul_display %}{% endif %}{% include "combo/wcs/card-field-value.html" with mode='inline' %}{% if not ul_display %} {% endif %}
- {% else %}
- {% if not ul_display %}{% endif %}{% include "combo/wcs/card-field-value.html" with mode='inline' value=item.empty_value %}{% if not ul_display %} {% endif %}
- {% endif %}
- {% endwith %}
+ {% with fields_by_varnames|get:item.varname as field and card.fields|get:item.varname as value %}
+ {% if field and value %}
+ {% if not ul_display %}{% endif %}{% include "combo/wcs/card-field-value.html" with mode='inline' %}{% if not ul_display %} {% endif %}
+ {% elif field %}
+ {% if not ul_display %}{% endif %}{% include "combo/wcs/card-field-value.html" with mode='inline' value=item.empty_value %}{% if not ul_display %} {% endif %}
{% endif %}
{% endwith %}
{% endif %}
diff --git a/combo/apps/wcs/templates/combo/wcs/cards.html b/combo/apps/wcs/templates/combo/wcs/cards.html
index 36f69034..c8dd72a7 100644
--- a/combo/apps/wcs/templates/combo/wcs/cards.html
+++ b/combo/apps/wcs/templates/combo/wcs/cards.html
@@ -20,7 +20,8 @@
{{ item.header|default:"" }}
{% endif %}
{% elif item.varname == "@link@" %}
- {% if item.template and item.page|default:item.url_template %}
+ {% firstof item.link_field item.page item.url_template as link %}
+ {% if item.template and link %}
{{ item.header|default:"" }}
{% endif %}
{% else %}
diff --git a/combo/apps/wcs/templates/combo/wcs/manager/card-cell-form-display.html b/combo/apps/wcs/templates/combo/wcs/manager/card-cell-form-display.html
index 494719ec..244e72c5 100644
--- a/combo/apps/wcs/templates/combo/wcs/manager/card-cell-form-display.html
+++ b/combo/apps/wcs/templates/combo/wcs/manager/card-cell-form-display.html
@@ -127,12 +127,12 @@
@@ -166,7 +166,7 @@ - -