{% extends 'core/export.html' %}
{% load i18n %}

{% block body %}

    <h1>{% trans 'Option sets' %}</h1>

    <ul>

    {% for optionset in optionsets %}

    <li>

    <p>
        <strong>{% trans 'URI' %}:</strong> {{ optionset.uri }}
    </p>

    {% if optionset.comment %}

    <p>
        <strong>{% trans 'Comment' %}:</strong> {{ optionset.comment }}
    </p>

    {% endif %}

    {% if optionset.options.all %}

    <p>
        <strong>{% trans 'Options' %}:</strong>
    </p>

    <ul>
        {% for option in optionset.options.all %}
        <li>
            <p>
                <strong>{% trans 'URI' %}:</strong> {{ option.uri }}
            </p>
            <p>
                <strong>{% trans 'Text' %}:</strong> {{ option.text }}
            </p>
            <p>
                <strong>{% trans 'Additional input' %}:</strong> {{ option.additional_input }}
            </p>
        </li>
        {% endfor %}
    </ul>

    {% endif %}

    {% if optionset.provider_key %}

    <p>
        <strong>{% trans 'Provider' %}:</strong> {{ optionset.provider.label }}
    </p>

    {% endif %}

    {% if optionset.conditions.all %}

    <p>
        <strong>{% trans 'Conditions' %}:</strong>
    </p>

    <ul>
        {% for condition in optionset.conditions.all %}
        <li>
            {{ condition.source_label }} {{ condition.relation_label }} {{ condition.target_label }}
        </li>
        {% endfor %}
    </ul>

    {% endif %}

    </li>

    {% endfor %}

    </ul>

{% endblock %}
