2012-07-11 22:39:36 +08:00
|
|
|
{% 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>
|
2012-07-11 22:39:36 +08:00
|
|
|
</div>
|
|
|
|
{% endblock %}
|
|
|
|
|
|
|
|
{% block extra_script %}
|
2012-07-31 16:48:55 +08:00
|
|
|
{% include "snippets/file_view_js.html" %}
|
2012-07-11 22:39:36 +08:00
|
|
|
<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'));
|
|
|
|
});
|
2012-07-11 22:39:36 +08:00
|
|
|
</script>
|
|
|
|
{% endblock %}
|