1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-02 15:38:15 +00:00

Clean up shared repo listing code and add permission for public repos.

This commit is contained in:
killing
2012-09-26 10:49:00 +08:00
parent 58efc80107
commit d30f7c4bbb
16 changed files with 263 additions and 156 deletions

View File

@@ -14,17 +14,19 @@
{% for repo in in_repos %}
<tr>
<td><img src="{{MEDIA_URL}}img/sync-folder-20.png" alt="目录icon" /></td>
<td><a href="{{ SITE_ROOT }}repo/{{ repo.props.id }}">{{ repo.props.name }}</a></td>
<td>{{ repo.props.desc }}</td>
{% if repo.latest_modify %}
<td>{{ repo.latest_modify|translate_commit_time }}</td>
<td><a href="{{ SITE_ROOT }}repo/{{ repo.props.repo_id }}">{{ repo.props.repo_name }}</a></td>
<td>{{ repo.props.repo_desc }}</td>
{% if repo.props.last_modified %}
<td>{{ repo.props.last_modified|translate_commit_time }}</td>
{% else %}
<td>--</td>
{% endif %}
<td>{{ repo.props.shared_email|email2nickname }}</td>
<td>{{ repo.props.user|email2nickname }}</td>
<td>
<img src="{{ MEDIA_URL }}img/download-20.png" data="{{ repo.props.id }}" class="download-btn op-icon vh" title="下载到本地" alt="下载" />
<img src="{{ MEDIA_URL }}img/delete-20.png" data="{{ SITE_ROOT }}shareadmin/removeshare/?repo_id={{ repo.id }}&from={{ repo.shared_email }}&to={{ request.user }}" class="unshare-btn op-icon vh" title="取消共享" alt="取消共享" />
{% if repo.user_perm == 'rw' %}
<img src="{{ MEDIA_URL }}img/download-20.png" data="{{ repo.props.repo_id }}" class="download-btn op-icon vh" title="下载到本地" alt="下载" />
{% endif %}
<img src="{{ MEDIA_URL }}img/delete-20.png" data="{{ SITE_ROOT }}shareadmin/removeshare/?repo_id={{ repo.props.repo_id }}&from={{ repo.props.user }}&to={{ request.user }}" class="unshare-btn op-icon vh" title="取消共享" alt="取消共享" />
</td>
</tr>
{% endfor %}