From c73da43b5d887db3c0334bcca5f28639a77cc9d2 Mon Sep 17 00:00:00 2001 From: Simon Conseil Date: Sun, 21 Nov 2021 19:37:30 +0100 Subject: [PATCH] Add common template for zip download --- sigal/themes/colorbox/templates/album.html | 15 +-------------- sigal/themes/default/templates/download_zip.html | 13 +++++++++++++ sigal/themes/galleria/templates/album_items.html | 14 +------------- sigal/themes/photoswipe/templates/album.html | 15 +-------------- 4 files changed, 16 insertions(+), 41 deletions(-) create mode 100644 sigal/themes/default/templates/download_zip.html diff --git a/sigal/themes/colorbox/templates/album.html b/sigal/themes/colorbox/templates/album.html index 3f6340e..296d3c3 100644 --- a/sigal/themes/colorbox/templates/album.html +++ b/sigal/themes/colorbox/templates/album.html @@ -61,20 +61,7 @@ {% endfor %} - {% if album.zip %} - {% if album.settings['zip_media_format'] == "orig" %} -
-

Download ZIP with original files

-
- {% else %} -
-

Download ZIP

-
- {% endif %} - {% endif %} - + {% include 'download_zip.html' %} {% endblock %} {% block footer %} diff --git a/sigal/themes/default/templates/download_zip.html b/sigal/themes/default/templates/download_zip.html new file mode 100644 index 0000000..b463648 --- /dev/null +++ b/sigal/themes/default/templates/download_zip.html @@ -0,0 +1,13 @@ +{% if album.zip %} + {% if album.settings['zip_media_format'] == "orig" %} +
+

Download ZIP with original files

+
+ {% else %} +
+

Download ZIP

+
+ {% endif %} +{% endif %} diff --git a/sigal/themes/galleria/templates/album_items.html b/sigal/themes/galleria/templates/album_items.html index 608aaff..730bb0f 100644 --- a/sigal/themes/galleria/templates/album_items.html +++ b/sigal/themes/galleria/templates/album_items.html @@ -5,19 +5,7 @@ {% include 'map.html' %} -{% if album.zip %} - {% if album.settings['zip_media_format'] == "orig" %} -
-

Download ZIP with original files

-
- {% else %} -
-

Download ZIP

-
- {% endif %} -{% endif %} +{% include 'download_zip.html' %} {% if album.description %}
diff --git a/sigal/themes/photoswipe/templates/album.html b/sigal/themes/photoswipe/templates/album.html index e850dcb..aac8578 100644 --- a/sigal/themes/photoswipe/templates/album.html +++ b/sigal/themes/photoswipe/templates/album.html @@ -9,20 +9,7 @@ {% endblock extra_head %} {% block content %} - {% if album.zip %} - {% if album.settings['zip_media_format'] == "orig" %} - - {% else %} - - {% endif %} - {% endif %} - + {% include 'download_zip.html' %} {% include 'map.html' %}