mirror of
https://github.com/haiwen/seahub.git
synced 2025-08-28 11:41:18 +00:00
92 lines
2.8 KiB
HTML
92 lines
2.8 KiB
HTML
{% extends base_template %}
|
|
{% load seahub_tags %}
|
|
|
|
{% block nav_shareadmin_class %}class="cur"{% endblock %}
|
|
|
|
{% block right_panel %}
|
|
{% if messages %}
|
|
{% autoescape off %}
|
|
<ul class="messages hide">
|
|
{% for message in messages %}
|
|
<li class="info">{{ message }}</li>
|
|
{% endfor %}
|
|
</ul>
|
|
{% endautoescape %}
|
|
{% endif %}
|
|
|
|
<h3>我共享的同步目录</h3>
|
|
{% if out_repos %}
|
|
<table class="repo-list">
|
|
<tr>
|
|
<th width="20%">名字</th>
|
|
<th width="25%">共享给</th>
|
|
<th width="47%">描述</th>
|
|
<th width="8%">操作</th>
|
|
</tr>
|
|
{% for repo in out_repos %}
|
|
<tr>
|
|
<td><a href="{{ SITE_ROOT }}repo/{{ repo.props.id }}">{{ repo.props.name }}</a></td>
|
|
<td>{{ repo.props.shared_email }}</td>
|
|
<td>{{ repo.props.desc }}</td>
|
|
<td>
|
|
{% if repo.gid %}
|
|
<a href="#" data="{{ SITE_ROOT }}shareadmin/removeshare/?repo_id={{ repo.props.id }}&from={{ request.user }}&gid={{ repo.gid }}" class="cancel-share op">删除</a>
|
|
{% else %}
|
|
<a href="#" data="{{ SITE_ROOT }}shareadmin/removeshare/?repo_id={{ repo.props.id }}&from={{ request.user }}&to={{ repo.props.shared_email }}" class="cancel-share op">删除</a>
|
|
{% endif %}
|
|
</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</table>
|
|
{% else %}
|
|
<p>暂无</p>
|
|
{% endif %}
|
|
|
|
<h3>我管理的文件外链</h3>
|
|
{% if fileshares %}
|
|
<table class="sharelink-list">
|
|
<tr>
|
|
<th width="45%">文件名</th>
|
|
<th width="30%">所属目录</th>
|
|
<th width="10%">查看次数</th>
|
|
<th width="15%">操作</th>
|
|
</tr>
|
|
{% for fs in fileshares %}
|
|
<tr>
|
|
<td><a href="{{ SITE_ROOT }}repo/{{ fs.repo.id }}/files/?p={{ fs.path|urlencode }}">{{ fs.filename }}</a></td>
|
|
<td><a href="{{ SITE_ROOT }}repo/{{ fs.repo.id }}/">{{ fs.repo.name }}</a></td>
|
|
<td>{{ fs.view_cnt }}</td>
|
|
<td>
|
|
<a href="#" class="op view-link" data="{{ fs.token }}">查看链接</a>
|
|
<a class="op" href="{{ SITE_ROOT }}sharedlink/remove/?t={{ fs.token }}">删除</a>
|
|
</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</table>
|
|
{% else %}
|
|
<p>暂无</p>
|
|
{% endif %}
|
|
<p id="link" class="hide">该文件外链为:<input type="text" readonly="readonly" value="" id="shared-link" /></p>
|
|
{% endblock %}
|
|
|
|
{% block extra_script %}
|
|
<script type="text/javascript">
|
|
$('.cancel-share').click(function() {
|
|
location.href = $(this).attr('data');
|
|
});
|
|
|
|
$(".view-link").click(function() {
|
|
var token = $(this).attr('data'),
|
|
link = '{{ protocol }}://' + '{{ domain }}{{ SITE_ROOT }}f/' + token + '/';
|
|
$('#link').before('<p class="hide">' + link + '</p>');
|
|
$('#shared-link').val(link).css('width', $('#link').prev().width() + 2);
|
|
$("#link").modal({appendTo:'#main'});
|
|
$('#link').prev().remove();
|
|
return false;
|
|
});
|
|
$('#shared-link').click(function() {
|
|
$(this).select();
|
|
});
|
|
</script>
|
|
{% endblock %}
|