mirror of
https://github.com/haiwen/seahub.git
synced 2025-08-31 22:54:11 +00:00
27 lines
949 B
HTML
27 lines
949 B
HTML
{% extends "myhome_base.html" %}
|
|
{% load seahub_tags %}
|
|
|
|
{% block main_panel %}
|
|
<h2>{{ file_name }}</h2>
|
|
<p class="file-share-from">共享者:{{ username }}</p>
|
|
<div id="file">
|
|
<div id="file-op">
|
|
<button data="{{ SITE_ROOT }}repo/{{ repo.id }}/{{ obj_id }}/?file_name={{ file_name }}&op=view&t={{ shared_token }}" id="view-original">原始文件</button>
|
|
<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>
|
|
</div>
|
|
</div>
|
|
{% endblock %}
|
|
|
|
{% block extra_script %}
|
|
{% include "snippets/file_view_js.html" %}
|
|
<script type="text/javascript">
|
|
{% include "snippets/repo_file_get.html" %}
|
|
$('#view-original, #download').click(function() {
|
|
window.open($(this).attr('data'));
|
|
});
|
|
</script>
|
|
{% endblock %}
|