{% extends 'groups/layout.html' %} {% load i18n %} {% load bookwyrm_group_tags %} {% load markdown %} {% block panel %}
{% block searchresults %} {% endblock %}
{% include "groups/members.html" with group=group %}

{% trans "Lists" %}

{% trans "Members of this group can create group-curated lists." %}

{% if request.user.is_authenticated and group|is_member:request.user %}
{% trans "Create List" as button_text %} {% include 'snippets/toggle/open_button.html' with controls_text="create_list" icon_with_text="plus" text=button_text focus="create_list_header" %}
{% endif %}
{% if request.user.is_authenticated and group|is_member:request.user %}
{% include 'lists/create_form.html' with controls_text="create_list" curation_group=group %}
{% endif %}
{% if not lists %}

{% trans "This group has no lists" %}

{% else %}
{% for list in lists %}

{{ list.name }} {% include 'snippets/privacy-icons.html' with item=list %}

{% with list_books=list.listitem_set.all|slice:5 %} {% if list_books %} {% endif %} {% endwith %}
{% if list.description %} {{ list.description|to_markdown|safe|truncatechars_html:30 }} {% else %}   {% endif %}

{% include 'lists/created_text.html' with list=list %}

{% endfor %}
{% endif %}
{% endblock %}