{% extends 'group/group_base.html' %}

{% load seahub_tags avatar_tags i18n %}

{% block cur_library %}tab-cur{% endblock%}

{% block right_panel %}
<h3 class="hd">{% trans "Libraries" %}</h3>
{% if repos %}
<table>
    <tr>
        <th width="4%"><!--icon--></th>
        <th width="20%">{% trans "Name" %}</th>
        <th width="33%">{% trans "Description" %}</th>
        <th width="16%">{% trans "Last Update" %}</th>
        <th width="14%">{% trans "Shared By" %}</th>
        <th width="13%">{% trans "Operations" %}</th>
    </tr>

    {% for repo in repos %}
    <tr>
        <td>
            {% if repo.user_perm == 'rw' %}
            <img src="{{MEDIA_URL}}img/sync-folder-20.png?t=1387267140" title="{% trans "Read-Write" %}" alt="{% trans "directory icon" %}" />
            {% else %}
            <img src="{{MEDIA_URL}}img/folder-no-write-20.png?t=1387267140" title="{% trans "Read-Only" %}" alt="{% trans "directory icon" %}" />
            {% endif %}
        </td>
        <td><a href="{% url 'view_common_lib_dir' repo.id '' %}">{{ repo.props.name }}</a></td>
        <td>{{ repo.props.desc }}</td>
        <td>
        {% if repo.latest_modify %}
        {{ repo.latest_modify|translate_seahub_time }}
        {% else %}
        --
        {% endif %}
        </td>
        <td>{{ repo.owner|email2nickname }}</td>
        <td>
        </td>
    </tr>
    {% endfor %}
</table>
{% else %}
<div class="empty-tips">
  <h2 class="alc">{% trans "No public library is in this group" %}</h2>
  <p>{% blocktrans %}A library can be made public in its settings page.(Not implemented yet){% endblocktrans %}</p>
</div>
{% endif %}
{% endblock %}
