{% extends 'admin.html' %}
{% block title %}{% trans %}Plugins{% endtrans %}{% endblock %}
{% set admin_nav_active="plugins" %}
{% block content %}
<div class="panel panel-default">
    <div class="panel-heading clearfix">
        <div class="panel-title pull-left">
            {% trans %}Plugins{% endtrans %} ({{ plugins | length }})
        </div>
    </div>
    <ul class="list-group">
    	{# List filtered user by name. #}
        {% for plugin in plugins|sort(attribute='name') %}
        <li itemscope itemtype="https://schema.org/SoftwareApplication" 
            class="list-group-item clearfix">
            <h4 class="list-group-item-heading">
            <span itemprop="name">{{ plugin.name }}</span>
            v<span itemprop="softwareVersion">{{ plugin.version }}</span>
            {% if plugin.enabled %}
                <small><span class="label label-success"
                             itemprop="installed"
                             content="true">
                    {% trans %}Enabled{% endtrans %}</span></small>
            {% else %}
                <small><span class="label label-default"
                             itemprop="installed"
                             content="false">
                    {% trans %}Disabled{% endtrans %}</span></small>
            {% endif %}
            </h4>
			<dl class="dl-horizontal">
            {% if plugin.author %}
                <dt>{% trans %}Author{% endtrans %}</dt>
                <dd itemprop="author">
                {{ plugin.author }}
                </dd>
            {% endif %}
            {% if plugin.description %}
                <dt>{% trans %}Description{% endtrans %}</dt>
                <dd>
                <span itemprop="description">{{ plugin.description }}</span>
                <span itemprop="url">{{ plugin.website }}</span>
                </dd>
            {% endif %}
            {% if plugin.copyright %}
                <dt>{% trans %}Copyright{% endtrans %}</dt>
                <dd itemprop="license">
                {{ plugin.copyright }}
                </dd>
            {% endif %}
            <dt>{% trans %}Location{% endtrans %}</dt>
            <dd>
             {{ plugin.path }}
            </dd>
            </dl>
        </li>
        {% endfor %}
    </ul>
</div>
{% endblock %}