# HG changeset patch
# User Goffi
# Date 1556920571 -7200
# Node ID 03c8fd941c0c0401cc506886422f23bd3b4a2150
# Parent bca0aa66294a0fa6df79667a323069c4a1dde336
event, photo, components: moved interests grid in a macro (in components/block)
diff -r bca0aa66294a -r 03c8fd941c0c sat_templates/templates/default/components/block.html
--- a/sat_templates/templates/default/components/block.html Fri May 03 20:55:49 2019 +0200
+++ b/sat_templates/templates/default/components/block.html Fri May 03 23:56:11 2019 +0200
@@ -32,3 +32,24 @@
{% endfor %}
{% endmacro %}
+
+{% macro interests_grid(interests, default_icon_name) %}
+{# display list of interests
+ @param interests: list of interests
+ @param default_icon_name: name of a defined icon to use when no thumb_url is available
+#}
+
+{% endmacro %}
diff -r bca0aa66294a -r 03c8fd941c0c sat_templates/templates/default/event/overview.html
--- a/sat_templates/templates/default/event/overview.html Fri May 03 20:55:49 2019 +0200
+++ b/sat_templates/templates/default/event/overview.html Fri May 03 23:56:11 2019 +0200
@@ -8,7 +8,10 @@
{% set category_menu = [('event_new', url_event_new)] %}
{% if not embedded %}{% extends 'base/base.html' %}{% endif %}
+{% import 'components/block.html' as block with context %}
+
{% block body %}
+{{ icon_defs('calendar') }}
{% trans %}There is not events discovery yet, this will come in the future.{% endtrans %}
@@ -20,17 +23,8 @@
You have currently {{nb_events}} events in your personal list
{% endtrans %}
-
+
+ {{block.interests_grid(events, 'calendar')}}
+
{% endif %}
{% endblock body %}
diff -r bca0aa66294a -r 03c8fd941c0c sat_templates/templates/default/photo/discover.html
--- a/sat_templates/templates/default/photo/discover.html Fri May 03 20:55:49 2019 +0200
+++ b/sat_templates/templates/default/photo/discover.html Fri May 03 23:56:11 2019 +0200
@@ -1,4 +1,5 @@
{% extends 'base/base.html' %}
+{% import 'components/block.html' as block with context %}
{% import 'input/form.html' as form with context %}
{% import 'input/field.html' as field with context %}
@@ -13,20 +14,8 @@
You have currently {{nb_interests}} albums in your personal list
{% endtrans %}
-
+
+ {{block.interests_grid(interests, 'file-image')}}
{% endif %}
{% call form.form(class="form--single") %}
{{ field.text("jid", _("device full jid"), required=true)}}