1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-08-16 14:08:12 +00:00
seahub/templates/shared_file_view.html
2013-03-01 14:23:46 +08:00

46 lines
1.4 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">
{% if zipped %}
{% trans "Current path: "%}
{% for name, link in zipped %}
{% if not forloop.last %}
<a href="{{ SITE_ROOT }}d/{{ token }}/?p={{ link|urlencode }}">{{ name }}</a> /
{% else %}
{{ name }}
{% endif %}
{% endfor %}
{% else %}
{% trans "Shared by: " %}{{ username|email2nickname }}
{% endif %}
</p>
<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 %}