{% load assets i18n static %}
{% block cell-content %}
<h2 id="category-{{cell.category_reference|slugify}}">
 <span>{{ title }}</span>
  {% if description %}
  <span class="description">{{ description|striptags|safe }}</span>
  {% endif %}
</h2>
<style>
div.cell.foldable h2#category-{{cell.category_reference|slugify}},
div.cell.foldable h2#category-{{cell.category_reference|slugify}}:hover {
  background-image: url({% asset_url "wcs:category:logo-active:"|add:cell.category_reference %});
}
div.foldable.folded h2#category-{{cell.category_reference|slugify}} {
  background-image: url({% asset_url "wcs:category:logo:"|add:cell.category_reference %});
}
</style>
<div class="forms links-list">
 {% regroup forms by keywords|first as sub_list %}
 {% for sub in sub_list %}
 <div class="subtitle"><span>{{ sub.grouper }}</span></div>
 <ul>
 {% for form in sub.list %}
 <li class="{% if form.authentication_required %}required-authentication{% endif %}
           {% for context in form.required_authentication_contexts %}required-{{context}}-authentication {% endfor %}
           {% for keyword in form.keywords %}keyword-{{keyword|slugify}}{% endfor %}
           {% if form.redirection %}is-redirection{% endif %}"
  ><a href="{{ form.url }}tryauth">{{ form.title }}</a>
  </li>
  {% endfor %}
  </ul>
 {% endfor %}
</div>
{% endblock %}
