1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-08-28 11:41:18 +00:00
seahub/share/templates/repo/share_admin.html

92 lines
2.8 KiB
HTML
Raw Normal View History

2012-04-24 06:21:52 +00:00
{% extends "myhome_base.html" %}
2012-06-12 02:13:14 +00:00
{% load seahub_tags %}
2012-04-24 06:21:52 +00:00
{% block nav_shareadmin_class %}class="cur"{% endblock %}
{% block right_panel %}
<h3>我共享的同步目录</h3>
{% if out_repos %}
<table class="repo-list">
<tr>
<th width="20%">名字</th>
<th width="25%">共享给</th>
2012-05-31 11:21:07 +00:00
<th width="47%">描述</th>
<th width="8%">操作</th>
2012-04-24 06:21:52 +00:00
</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>
2012-05-22 05:41:41 +00:00
{% if repo.gid %}
<img src="{{ MEDIA_URL }}img/delete-20.png" data="{{ SITE_ROOT }}shareadmin/removeshare/?repo_id={{ repo.props.id }}&from={{ request.user }}&gid={{ repo.gid }}" class="cancel-share vh" alt="取消共享" title="取消共享" />
2012-05-22 05:41:41 +00:00
{% else %}
<img src="{{ MEDIA_URL }}img/delete-20.png" data="{{ SITE_ROOT }}shareadmin/removeshare/?repo_id={{ repo.props.id }}&from={{ request.user }}&to={{ repo.props.shared_email }}" class="cancel-share vh" alt="取消共享" title="取消共享" />
2012-05-22 05:41:41 +00:00
{% endif %}
2012-04-24 06:21:52 +00:00
</td>
</tr>
{% endfor %}
</table>
{% else %}
<p>暂无</p>
{% endif %}
2012-06-12 02:13:14 +00:00
<h3>我管理的共享链接</h3>
{% if out_links %}
<table class="link-list">
<tr>
<th width="20%">名字</th>
<th width="30%">共享给</th>
<th width="30%">有效期</th>
<th width="20%">操作</th>
</tr>
{% for link in out_links %}
<tr>
<td><a href="{{ SITE_ROOT }}repo/{{ repo.id }}">{{ link.repo_name }}</a></td>
<td>{{ link.anonymous_email }}</td>
{% if link.remain_time %}
<td>{{ link.remain_time|translate_remain_time }}</td>
{% else %}
<td>已过期</td>
{% endif %}
<td><a class="op" href="#" class="view-link" data="{{ link.token }}">查看链接</a>
<a class="op" href="{{ SITE_ROOT }}share/remove/{{ link.token }}/">删除</a></td>
</tr>
{% endfor %}
</table>
{% endif %}
<form id="view-link-form" name="view-link-form" class="hide">
<textarea id="share-link" name="share-link"></textarea>
</form>
2012-04-24 06:21:52 +00:00
{% endblock %}
{% block extra_script %}
<script type="text/javascript">
$('.cancel-share').click(function() {
location.href = $(this).attr('data');
});
$("table tr:gt(0)").hover(
function() {
$(this).find('img').css('cursor', 'pointer').removeClass('vh');
},
function() {
$(this).find('img').addClass('vh');
}
);
2012-06-12 02:13:14 +00:00
$(".view-link").click(function() {
var t = $(this).attr('data');
var l = '{{ protocol }}://' + '{{ domain }}{{ SITE_ROOT }}share/' + t + '/';
$('textarea[name="share-link"]').val(l);
$("#view-link-form").modal({appendTo: "#main", containerCss:{padding:18}});
return false;
});
2012-04-24 06:21:52 +00:00
</script>
{% endblock %}