{% extends "lfc/manage/base.html" %}
{% load i18n %}

{% block left-slot-wrapper %}{% endblock %}

{% block content %}

    <div style="margin:20px 10px 0 20px">

        <h1>{% trans "Install Applications" %}</h1>

        <table class="lfs-manage-table"
               style="width:100%">
            <tr>
                <th class"middle">
                    {% trans "Application" %}
                </th>
                <th>
                    {% trans "Description" %}
                </th>
                <th class="middle">
                    {% trans "Status" %}
                </th>
                <th class="middle">
                    {% trans "Manage" %}
                </th>
            </tr>
            {% for application in applications %}
                <tr>
                    <td>
                        {% trans application.pretty_name %}
                    </td>
                    <td>
                        {% if application.description %}
                            {% trans application.description %}
                        {% endif %}
                    </td>
                    <td>
                        {% if application.installed %}
                            {% trans "Installed" %}
                        {% else %}
                            {% trans "Not Installed" %}
                        {% endif %}
                    </td>
                    <td>
                        {% if application.installed %}
                            <a href="{% url 'lfc_uninstall_application' name=application.name %}">{% trans "Uninstall" %}</a> |
                            <a href="{% url 'lfc_reinstall_application' name=application.name %}">{% trans "Reinstall" %}</a>
                        {% else %}
                            <a href="{% url 'lfc_install_application' name=application.name %}">{% trans "Install" %}</a>
                        {% endif %}
                    </td>
                </tr>
            {% endfor %}
        </table>
    </div>
{% endblock %}
