mirror of
https://github.com/haiwen/seahub.git
synced 2025-08-29 04:01:24 +00:00
37 lines
1.3 KiB
HTML
37 lines
1.3 KiB
HTML
{% extends "myhome_base.html" %}
|
|
{% load seahub_tags i18n %}
|
|
|
|
{% block extra_style %}
|
|
{% include 'snippets/file_view_style.html' %}
|
|
<style type="text/css">
|
|
.CodeMirror { margin-bottom:0; }
|
|
#footer { display:block; }
|
|
</style>
|
|
{% endblock %}
|
|
|
|
{% block main_panel %}
|
|
<h2 id="view-hd">{{ file_name }}</h2>
|
|
<div id="file">
|
|
<div id="file-op">
|
|
<p class="fleft">{% trans "Shared by: " %}{{ username|email2nickname }}</p>
|
|
|
|
{% if filetype == 'Text' or filetype == 'Image' or filetype == 'SVG' or filetype == 'Markdown' %}
|
|
<button data="{{ SITE_ROOT }}repo/{{ repo.id }}/{{ obj_id }}/?file_name={{ file_name }}&op=view&t={{ shared_token }}" id="view-original">{% trans "Raw" %}</button>
|
|
{% endif %}
|
|
|
|
<button data="{{ SITE_ROOT }}repo/{{ repo.id }}/{{ obj_id }}/?file_name={{ file_name }}&op=download&t={{ shared_token }}" id="download">{% trans "Download" %}</button>
|
|
</div>
|
|
{% include 'snippets/file_content_html.html' %}
|
|
</div>
|
|
{% endblock %}
|
|
|
|
{% block extra_script %}
|
|
{% include "snippets/file_view_js.html" %}
|
|
<script type="text/javascript">
|
|
$('#view-original, #download').click(function() {
|
|
window.open($(this).attr('data'));
|
|
});
|
|
{% include "snippets/file_content_js.html" %}
|
|
</script>
|
|
{% endblock %}
|