# HG changeset patch # User Goffi # Date 1592582233 -7200 # Node ID 2b8d18a9df00727a2f468a9e631a159a77ebd849 # Parent bb5193cef770e5e77cac8a23c375a1b862887618 bulma (photo/album): change for dynamic content: - added drop zone and file selector to upload photos - moved item template to its own file, so it can be used for dynamic content - added delete button - changes to manage progression bar and other stuff diff -r bb5193cef770 -r 2b8d18a9df00 sat_templates/templates/bulma/photo/album.html --- a/sat_templates/templates/bulma/photo/album.html Fri Jun 19 17:57:13 2020 +0200 +++ b/sat_templates/templates/bulma/photo/album.html Fri Jun 19 17:57:13 2020 +0200 @@ -4,41 +4,41 @@ {% import 'blog/macros.html' as blog with context %} {% block body %} -{{ icon_defs('comment-empty') }} -
+{{ icon_defs('comment-empty', 'trash-empty') }} +
+ {% set ns_photos = namespace(empty=true) %} {% for file in files_data %} {% if file.type == C.FILE_TYPE_FILE %} -
-
-
- - {{file.name}} - -
-
-
-
-
-
- {% if file.comments_url is defined %} - {% if file.comments_count %} - {{file.comments_count}}  - {% endif %} - {{ icon('comment-empty', cls='icon is-small') }} - {% endif %} -
-
-
-
-
-
- {{ blog.show_items(file.comments, expanded=true, dates_fmt='relative') }} -
- {{- textbox.comment_or_login(service=file.comments_service, node=file.comments_node) -}} -
-
-
+ {% set ns_photos.empty = false %} + {% include 'photo/item.html' %} {% endif %} {% endfor %}
+{# {% if ns_photos.empty %} #} +{% if true %} +
+
+ {% trans %} + Drop photos here + {% endtrans %} +
+
+

OR

+
+ +
+
+{% endif %} {% endblock body %} diff -r bb5193cef770 -r 2b8d18a9df00 sat_templates/templates/bulma/photo/item.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/sat_templates/templates/bulma/photo/item.html Fri Jun 19 17:57:13 2020 +0200 @@ -0,0 +1,38 @@ +
+
+
+ + {{file.name}} + +
+
+
+
+
+ {{ icon('trash-empty', cls='icon is-small') }} +
+
+
+
+ {% if file.comments_url is defined %} + {% if file.comments_count %} + {{file.comments_count}}  + {% endif %} + {{ icon('comment-empty', cls='icon is-small') }} + {% endif %} +
+
+
+
+
+ {% if uploading %} + 0% + {% else %} +
+ {{ blog.show_items(file.comments, expanded=true, dates_fmt='relative') }} +
+ {{- textbox.comment_or_login(service=file.comments_service, node=file.comments_node) -}} +
+
+ {% endif %} +