Skip to content

Commit

Permalink
Embed in img tags svg only
Browse files Browse the repository at this point in the history
  • Loading branch information
fsbraun committed Sep 28, 2023
1 parent c3282bb commit c79a487
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion filer/templates/admin/filer/image/expand.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<html>
<body>
<body style="margin: 0;">
<img style="max-width: 100%" src="{{ original_url }}" />
</body>
</html>
11 changes: 6 additions & 5 deletions filer/templates/admin/filer/tools/detail_info.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,12 @@
<span class="icon fa fa-download filer-icon filer-icon-download"></span>&nbsp;
<span>{% translate "Download" %}</span>
</a>
{% if original.mime_maintype == 'image' or True %}
<a href="{% url 'admin:filer_image_expand_view' original.pk %}" target="_blank" rel="noopener noreferrer" class="button">
<span>{% translate "Expand" %}</span>&nbsp;
<span class="icon filer-icon filer-icon-expand fa fa-expand"></span>
</a>
{% if original.mime_maintype == 'image' %}
<a href="{% if 'svg' in original.mime_type %}{% url 'admin:filer_image_expand_view' original.pk %}{% else %}{{ original.file.url }}{% endif %}"
target="_blank" rel="noopener noreferrer" class="button">
<span>{% translate "Expand" %}</span>&nbsp;
<span class="icon filer-icon filer-icon-expand fa fa-expand"></span>
</a>
{% endif %}
{% else %}
<span class="warning">{% translate "File is missing" %}</span>
Expand Down

0 comments on commit c79a487

Please sign in to comment.