2 # GNU MediaGoblin -- federated, autonomous media hosting
3 # Copyright (C)
2011,
2012 MediaGoblin contributors. See AUTHORS.
5 # This program is free software: you can redistribute it and/or modify
6 # it under the terms of the GNU Affero General Public License as published by
7 # the Free Software Foundation, either version
3 of the License, or
8 # (at your option) any later version.
10 # This program is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 # GNU Affero General Public License for more details.
15 # You should have received a copy of the GNU Affero General Public License
16 # along with this program. If not, see
<http://www.gnu.org/licenses
/>.
19 {% extends 'mediagoblin/user_pages/media.html' %}
21 {% set medium_view = request.app.public_store.file_url(
22 media.media_files['medium']) %}
24 {% if 'pdf' in media.media_files %}
25 {% set pdf_view = request.app.public_store.file_url(
26 media.media_files['pdf']) %}
28 {% set pdf_view = request.app.public_store.file_url(
29 media.media_files['original']) %}
32 {% set pdf_js = global_config['plugins'].get('mediagoblin.media_types.pdf', {}).get('pdf_js', False) %}
35 {% block mediagoblin_html_tag %}
36 dir=
"ltr" mozdisallowselectionprint moznomarginboxes
37 {% endblock mediagoblin_html_tag %}
40 {% block mediagoblin_head -%}
43 <meta charset=
"utf-8">
44 <meta name=
"viewport" content=
"width=device-width, initial-scale=1, maximum-scale=1">
48 {% block mediagoblin_media %}
49 <div class=
"media_other_container">
51 <iframe width=
"640px" height=
"480px"
52 src=
"{{ request.staticdirect('/extlib/pdf.js/web/viewer.html') }}?file={{ pdf_view }} ">
55 <a href=
"{{ pdf_view }}">
58 src=
"{{ medium_view }}"
60 {%- trans media_title=media.title -%}
61 Image for {{ media_title}}
68 {% block mediagoblin_sidebar %}
69 <h3>{% trans %}Download{% endtrans %}
</h3>
71 {% if 'original' in media.media_files %}
73 <a href=
"{{ request.app.public_store.file_url(
74 media.media_files.original) }}">
75 {%- trans %}Original file{% endtrans -%}
79 {% if 'pdf' in media.media_files %}
81 <a href=
"{{ request.app.public_store.file_url(
82 media.media_files.pdf) }}">
83 {%- trans %}PDF file{% endtrans -%}