{% load seahub_tags i18n %}
    {% if shared_repos %}
        {% for repo in shared_repos %}
        <tr data-repo_name="{{repo.repo_name}}" data-time="{% if repo.last_modified %}{{ repo.last_modified }}{% else %}0{% endif %}">
            <td>
              {% if repo.encrypted %}
                <img src="{{MEDIA_URL}}img/sync-folder-encrypt-20.png" title="{% trans "Read-Write" %}" alt="{% trans "directory icon" %}" />
              {% else %}
                {% 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 %}
              {% endif %}
            </td>
            <td><a href="{% url 'repo' repo.repo_id %}">{{ repo.repo_name }}</a></td>
            <td>{{ repo.repo_desc }}</td>
            {% if repo.last_modified %}
            <td>{{ repo.last_modified|translate_seahub_time }}</td>
            {% else %}
            <td>--</td>
            {% endif %}
            <td>{{ repo.user|email2nickname }}</td>
            <td>
                {% if show_repo_download_button %}
                <span data="{{ repo.repo_id }}" class="icon-cloud-download download-btn op-icon vh" title="{% trans "Download and Sync" %}"></span>
                {% endif %}
                {% if repo.share_type == 'personal' %}
                <span data-url="{% url 'repo_remove_share' %}?repo_id={{ repo.repo_id }}&from={{ repo.user|urlencode }}&to={{ request.user.username|urlencode }}" data-target="{{repo.repo_name}}" class="icon-trash unshare-btn op-icon vh" title="{% trans "Leave Share" %}"></span>
                {% endif %}
            </td>
        </tr>
        {% endfor %}

    {% else %}
    <div class="empty-tips">
        <h2 class="alc">{% trans "No library is shared to you" %}</h2>
    </div>
    {% endif %}
