mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-28 08:06:56 +00:00
51 lines
2.3 KiB
HTML
51 lines
2.3 KiB
HTML
{% load seahub_tags i18n %}
|
|
{% if shared_repos %}
|
|
<table>
|
|
<tr>
|
|
<th width="4%"><!--icon--></th>
|
|
<th width="20%">{% trans "Name" %}</th>
|
|
<th width="33%">{% trans "Description" %}</th>
|
|
<th width="15%">{% trans "Last Update" %}</th>
|
|
<th width="15%">{% trans "Shared By" %}</th>
|
|
<th width="13%">{% trans "Operations" %}</th>
|
|
</tr>
|
|
|
|
{% for repo in shared_repos %}
|
|
<tr>
|
|
<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 %}
|
|
|
|
</table>
|
|
{% else %}
|
|
<div class="empty-tips">
|
|
<h2 class="alc">{% trans "No library is shared to you" %}</h2>
|
|
</div>
|
|
{% endif %}
|