1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-01 07:01:12 +00:00
Files
seahub/templates/view_shared_file.html

27 lines
949 B
HTML
Raw Normal View History

{% extends "myhome_base.html" %}
{% load seahub_tags %}
{% block main_panel %}
2012-07-14 15:19:09 +08:00
<h2>{{ file_name }}</h2>
2012-08-10 21:35:58 +08:00
<p class="file-share-from">共享者:{{ username }}</p>
<div id="file">
2012-08-15 10:44:15 +08:00
<div id="file-op">
2012-08-11 11:20:26 +08:00
<button data="{{ SITE_ROOT }}repo/{{ repo.id }}/{{ obj_id }}/?file_name={{ file_name }}&op=view&t={{ shared_token }}" id="view-original">原始文件</button>
2012-08-10 21:35:58 +08:00
<button data="{{ SITE_ROOT }}repo/{{ repo.id }}/{{ obj_id }}/?file_name={{ file_name }}&op=download&t={{ shared_token }}" id="download">下载</button>
</div>
<div id="file-view">
<p>文件内容读取中...</p>
2012-07-14 15:19:09 +08:00
</div>
</div>
{% endblock %}
{% block extra_script %}
2012-07-31 16:48:55 +08:00
{% include "snippets/file_view_js.html" %}
<script type="text/javascript">
2012-07-31 16:48:55 +08:00
{% include "snippets/repo_file_get.html" %}
2012-08-10 21:35:58 +08:00
$('#view-original, #download').click(function() {
window.open($(this).attr('data'));
});
</script>
{% endblock %}