{% load gnm assets %}
{% with producer=cell.extra_css_class|as_producer:cell.formdef_reference %}
{% with producer_logo="logo:"|add:producer.slug picture="wcs:form:picture:"|add:cell.formdef_reference logo="wcs:form:logo:"|add:cell.formdef_reference %}
<a href="{{url}}" class="tile-link">
  <div class="tile {{producer.slug}}">
    <div class="tile-picture" style="background-image: {% asset_css_url picture size="300x300" crop="center" %}"></div>
    <div class="tile-head">
      <div class="tile-title">
        <h2>{{title}}</h2>
        <h3>{{ producer.label }}</h3>
        {% if description %}<div class="description">{{ description|safe }}</div>{% endif %}
        <span class="producer" style="background-image: {% asset_css_url logo producer_logo %}">{{ producer.label }}</span>
      </div>
    </div>
    <div class="tile-content">
      <div class="tile-actions">
        {% if cell.cached_json.authentication_required and not user.is_authenticated %}
        <span class="action-login">Me connecter</span>
        {% else %}
        <span class="action-more-info">Plus d’infos</span>
        {% endif %}
      </div>
    </div>
  </div>
</a>
{% endwith %}
{% endwith %}
