1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-08-29 12:04:02 +00:00
seahub/share/templates/repo/share_admin.html

100 lines
3.0 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 %}
2012-09-03 04:03:06 +00:00
{% if messages %}
{% autoescape off %}
<ul class="messages hide">
{% for message in messages %}
<li class="info">{{ message }}</li>
{% endfor %}
</ul>
{% endautoescape %}
{% endif %}
2012-04-24 06:21:52 +00:00
<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 fileshares %}
<table class="sharelink-list">
<tr>
<th width="25%">文件名</th>
<th width="35%">所属目录</th>
<th width="20%">查看次数</th>
<th width="20%">操作</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-file-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 %}
2012-06-20 13:38:07 +00:00
<div id="view-link" name="view-link" class="hide">
<span class="view-link-alert" style="float:left; "></span>
2012-06-20 13:38:07 +00:00
</div>
2012-06-12 02:13:14 +00:00
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-file-link").click(function() {
var t = $(this).attr('data');
var l = '{{ protocol }}://' + '{{ domain }}{{ SITE_ROOT }}f/' + t + '/';
$('.view-link-alert').html("该文件外链为:<p>" + l + "</p>");
$("#view-link").modal({appendTo: "#main", containerCss:{padding:18}});
return false;
});
2012-04-24 06:21:52 +00:00
</script>
{% endblock %}