Browse Source

Merge pull request #298 from towards-a-new-leftypol/revert-289-download_filename

Revert "Filename clickable to download"
pull/40/head
nonmakina 12 months ago
committed by GitHub
parent
commit
e872b9ceaa
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      inc/instance-config.php
  2. 5
      templates/post/fileinfo.html

1
inc/instance-config.php

@ -399,6 +399,7 @@ $config['additional_javascript'][] = 'js/file-selector.js';
$config['additional_javascript'][] = 'js/save-user_flag.js';
$config['additional_javascript'][] = 'js/webm-settings.js';
$config['additional_javascript'][] = 'js/expand-video.js';
$config['additional_javascript'][] = 'js/download-original.js';
$config['flag_preview'] = true;

5
templates/post/fileinfo.html

@ -22,9 +22,9 @@
{% if config.show_filename and file.filename %}
,
{% if file.filename|length > config.max_filename_display %}
<a href="{{ config.uri_img }}{{ file.file }}" download="{{ file.filename }}" title="Save as original filename">{{ file.filename|truncate_filename(config.max_filename_display)|e|bidi_cleanup }}</a>
<span class="postfilename" title="{{ file.filename|e|bidi_cleanup }}">{{ file.filename|truncate_filename(config.max_filename_display)|e|bidi_cleanup }}</span>
{% else %}
<a href="{{ config.uri_img }}{{ file.file }}" download="{{ file.filename }}" title="Save as original filename">{{ file.filename|e|bidi_cleanup }}</a>
<span class="postfilename">{{ file.filename|e|bidi_cleanup }}</span>
{% endif %}
{% endif %}
)
@ -36,4 +36,3 @@
{% endfor %}
</div>
{% endif %}

Loading…
Cancel
Save