<table class="table table-striped table-condensed table-updates">
  <thead>
    <tr>
        <th>{{ _t('AU_NAME') }}</th>
        <th>{{ _t('AU_INSTALLED_REVISION') }}</th>
        <th>{{ _t('AU_AVAILABLE_REVISION') }}</th>
        <th></th>
        <th></th>
    </tr>
  </thead>
  <tbody>
      {% for ext in exts %}
        <tr>
            <td>
                <strong>{{ ext.name }}</strong>
                <a class="small" href="{{ ext.documentation }}">
                    ({{ _t('AU_DOCUMENTATION_LINK') }})
                </a>
                <br />
                <small>{{ ext.description }}</small>
            </td>
            <td>
                {% if ext.installed %}
                    {{ ext.localRelease }}
                {% else %}
                    {{ _t('AU_ABSENT') }}
                {% endif %}
            </td>
            <td>
                {{ ext.release }}
            </td>
            <td>
                {% if isAdmin and ext.updateAvailable and ext.installed %}
                    {% if not isHibernated %}
                        <a  href="{{ url({ params: { action: 'upgrade', package: ext.updateLink } }) }}"
                            class="btn btn-xs btn-primary"
                            title="{{ _t('AU_UPDATE') }}"
                        >
                            {{ _t('AU_UPDATE') }}
                        </a>
                    {% else %}
                        <button disabled
                            class="btn btn-xs btn-primary"
                            title="{{ _t('WIKI_IN_HIBERNATION') }}"
                            data-toggle="tooltip"
                            data-placement="bottom"
                        >
                            {{ _t('AU_UPDATE') }}
                        </button>
                    {% endif %}
                {% endif %}


            </td>
            <td>
                {% if isAdmin and not ext.installed %}
                    {% if not isHibernated %}
                        <a  href="{{ url({ params: { action: 'upgrade', package: ext.updateLink } }) }}"
                            class="btn btn-xs btn-primary"
                            title="{{ _t('AU_INSTALL') }}"
                        >
                            {{ _t('AU_INSTALL') }}
                        </a>
                    {% else %}
                        <button disabled
                            class="btn btn-xs btn-primary"
                            title="{{ _t('WIKI_IN_HIBERNATION') }}"
                            data-toggle="tooltip"
                            data-placement="bottom"
                        >
                            {{ _t('AU_INSTALL') }}
                        </button>
                    {% endif %}
                {% endif %}

                {% if isAdmin and ext.installed and ext.name != 'autoupdate' %}
                    {% if not isHibernated %}
                        <a  href="{{ url({params:{ action: 'delete', package: ext.deleteLink|split('delete=')|slice(1,1)|first}}) }}"
                            class="btn btn-xs btn-danger"
                            title="{{ _t('AU_DELETE_EXT') }}"
                        >
                            {{ _t('AU_DELETE_EXT') }}
                        </a>
                    {% else %}
                        <button disabled
                            class="btn btn-xs btn-danger"
                            title="{{ _t('WIKI_IN_HIBERNATION') }}"
                            data-toggle="tooltip"
                            data-placement="bottom"
                        >
                            {{ _t('AU_DELETE_EXT') }}
                        </button>
                    {% endif %}
                {% endif %}
            </td>
        </tr>
    {% endfor %}
    </tbody>
</table>
