summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authorJano Slota <jano@alokal.eu>2014-07-27 16:48:40 +0200
committerczaks <marcin@6irc.net>2014-08-08 21:52:19 +0200
commitd81a6c49e28133c65d237fc648be7fe323bfd54d (patch)
tree49203f6c8e506019da60d7dd49a26a5396efe4ed /templates
parent8d8f66c701c0d7577e429b182d520fd7f6c329e5 (diff)
Use a different way to show the original filename
Conflicts: templates/post/fileinfo.html
Diffstat (limited to 'templates')
-rw-r--r--templates/post/fileinfo.html24
1 files changed, 15 insertions, 9 deletions
diff --git a/templates/post/fileinfo.html b/templates/post/fileinfo.html
index f12857d2..7b7e278c 100644
--- a/templates/post/fileinfo.html
+++ b/templates/post/fileinfo.html
@@ -7,7 +7,21 @@
{% if file.file == 'deleted' %}
<img class="post-image deleted" src="{{ config.image_deleted }}" alt="" />
{% else %}
- <p class="fileinfo">File: <a href="{{ config.uri_img }}{{ file.file }}">{{ file.file }}</a> <span class="unimportant">
+ <p class="fileinfo">{% trans %}File:{% endtrans %} <a href="{{ config.uri_img }}{{ file.file }}"
+ {% if config.show_filename and file.filename %}
+ {% if config.download_filename %}
+ download="{{ file.filename|e|bidi_cleanup }}"
+ {% endif %}
+ {% if file.filename|length > config.max_filename_display %}
+ title="{{ file.filename|e|bidi_cleanup }}"
+ >{{ file.filename|truncate_filename(config.max_filename_display)|e|bidi_cleanup }}
+ {% else %}
+ >{{ file.filename|e|bidi_cleanup }}
+ {% endif %}
+ {% else %}
+ >{{ file.file }}
+ {% endif %}
+ </a> <span class="unimportant">
(
{% if file.thumb == 'spoiler' %}
{% trans %}Spoiler Image{% endtrans %},
@@ -19,14 +33,6 @@
, {{ ratio(file.width, file.height) }}
{% endif %}
{% endif %}
- {% if config.show_filename and file.filename %}
- ,
- {% if file.filename|length > config.max_filename_display %}
- <span class="postfilename" title="{{ file.filename|e|bidi_cleanup }}">{{ file.filename|truncate_filename(config.max_filename_display)|e|bidi_cleanup }}</span>
- {% else %}
- <span class="postfilename">{{ file.filename|e|bidi_cleanup }}</span>
- {% endif %}
- {% endif %}
{% include "post/image_identification.html" %}
)
</span> {% include "post/file_controls.html" %}</p>