home » zplus/dokk.org.git
ID: 4e8db502c5e707579a5eefb0b5f8b21ae622f69c
62 lines — 2K — View raw


{% extends "templates/base.tpl" %}

{% block title %}Library{% endblock %}

{% block body %}

<div class="library">

<details>
    <summary>Filters</summary>

    <form action="" method="post">
        <br />

        Author:
        <br />
        <select name="author" multiple size=10>
            {% for author in authors %}
                <option value="{{ author['name']['value'] }}" {{ 'selected' if author['name']['value'] in filters_author }}>{{ author['name']['value'] }}</option>
            {% endfor %}
        </select>

        <br /><br />

        License:
        <br />
        <select name="license" multiple size=10>
            {% for license in licenses %}
                <option value="{{ license['id']['value'] }}" {{ 'selected' if license['id']['value'] in filters_license }}>{{ license['id']['value'] }}</option>
            {% endfor %}
        </select>

        <br /><br />
        <input type="submit" value="Search" />
    </form>
</details>

{% for item in items["@graph"]|sort(attribute="library:title") %}
    <p>
        <div>
            <a href="/library/{{ item['@id'][8:] }}">{{ item['library:title'] }}</a>
        </div>

        <div>
            Authors:
            {% for author in item["library:author"]|sort() %}
                {{ author }}
            {% endfor%}
        </div>

        <div>
            License:
            {% for license in item["library:license"]|sort(attribute="license:id") %}
                {{ license['license:id'] }}
            {% endfor%}
        </div>
    </p>
    <br/><br/>
{% endfor %}
</div>

{% endblock %}