est-ensemble: allow picture for form link cell (#77991) #289

Merged
smihai merged 1 commits from wip/77991-est-ensemble-allow-picture-for-form-cell into main 2023-05-31 09:42:29 +02:00
3 changed files with 40 additions and 0 deletions

View File

@ -50,6 +50,27 @@ div.gru-nav {
}
}
div.wcsformcell.has-asset-picture {
a {
text-decoration: none;
&:hover {
color: $cell-entry-hover-color;
}
}
img {
padding: $cell-image-padding;
}
span.form--title {
display: block;
padding: 0 $cell-image-padding;
font-weight: 600;
}
div.description {
padding: 0 1rem;
font-size: 0.9em;
}
}
/* custom est-ensemble menu entry */
li.menu-est-ensemble a {
background: $ee-red;

View File

@ -10,6 +10,11 @@
"header:background": {"label": "Têtière : image de fond"},
"header:logo": {"label": "Têtière : logo"},
"emails:logo": {"label": "Emails : logo"}
},
"COMBO_CELL_ASSET_SLOTS.update": {
"wcs_wcsformcell": {
"picture": {"prefix": "Image"}
}
}
}
}

View File

@ -0,0 +1,14 @@
{% extends "combo/wcs/form_link_fragment.html" %}
{% load assets %}
{% block form-link-title %}
{% get_asset cell=cell type='picture' as asset %}
{% if asset.asset.url %}
{% include "combo/asset_picture_fragment.html" %}
{% endif %}
<span class="form--title">{{ title }}</span>
{% endblock %}
{% block form-link-description %}
{{ description|safe }}
{% endblock %}