Skip to content

Commit

Permalink
Remove and simplify file metadata display
Browse files Browse the repository at this point in the history
Remove the checksum and type, and unify the download and size
into one line.

Bug: GH#133
  • Loading branch information
samwilson authored Jan 9, 2023
1 parent ab8b209 commit 91365af
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 11 deletions.
17 changes: 6 additions & 11 deletions templates/post/view.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -126,17 +126,12 @@
<p>
<img src="{{ path('file', {id:post.id, size:'D', ext:'jpg'}) }}" alt="Image of the file attached to this post." />
</p>
<ul>
<li>
URL:
<a href="{{ url('file', {id:post.id, size:'F', ext:post.file.extension}) }}">
{{ url('file', {id:post.id, size:'F', ext:post.file.extension}) }}
</a>
</li>
<li>Size: {{ post.file.size|format_memory }}</li>
<li>SHA1 checksum: {{ post.file.checksum }}</li>
<li>Type: {{ post.file.mimeType }}</li>
</ul>
<p>
<a href="{{ url('file', {id:post.id, size:'F', ext:post.file.extension}) }}" title="{{'posts.save_tooltip'|trans}}" target="_base">
{{'posts.download_link'|trans}}
</a>
({{ post.file.size|format_memory }})
</p>
{% endif %}

{% if post.location %}
Expand Down
1 change: 1 addition & 0 deletions translations/messages.en.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ security:
remember_me: 'Remember me'
posts:
replies: 'Replies'
download_link: 'Download'
save_tooltip: 'Save the full version of this file'
delete:
gone-will-be-added: 'An HTTP status of "410 Gone" will be added for this post. See %redirects_link% for more information.'
Expand Down

0 comments on commit 91365af

Please sign in to comment.