diff --git a/indico/modules/events/registration/templates/display/_registration_summary_blocks.html b/indico/modules/events/registration/templates/display/_registration_summary_blocks.html index eff3e76360a..c9daa91dd4a 100644 --- a/indico/modules/events/registration/templates/display/_registration_summary_blocks.html +++ b/indico/modules/events/registration/templates/display/_registration_summary_blocks.html @@ -143,19 +143,15 @@ {% macro render_receipts_list(registration, from_management=false) %} {% set receipts = registration.receipt_files if from_management else registration.published_receipts %} - {% set can_get_document = registration.registration_form.has_templates() %} + {% set can_get_document = from_management and registration.registration_form.has_templates() %} + {% if receipts or can_get_document %}
- {% if receipts %} -
- {% trans %}Documents{% endtrans %} -
- {% endif %} +
+ {% trans %}Documents{% endtrans %} +
{% if can_get_document %} -
- {% trans %}There are no documents yet{% endtrans %} -
- - {% for receipt in receipts | sort(attribute='file.filename') %} - {% set filename = receipt.file.filename %} - - - - {% if from_management -%} - + {% endif %} + + {% endfor %} +
{{ receipt.template.type.title if receipt.template.type else '' }} - - {{ filename }} - - {% if not receipt.is_published -%} - ({% trans %}not published{% endtrans %}) - {% endif %} - -
- {% if receipt.is_published %} - - {% else %} - - {% endif %} - -
+ {%- if receipts %} + + {% for receipt in receipts | sort(attribute='file.filename') %} + {% set filename = receipt.file.filename %} + + + - {% endif %} - - {% endfor %} -
{{ receipt.template.type.title if receipt.template.type else '' }} + + {{ filename }} + + {% if not receipt.is_published -%} + ({% trans %}not published{% endtrans %}) + {% endif %}
+ {% if from_management -%} +
+
+ {% if receipt.is_published %} + + {% else %} + + {% endif %} + +
+
+ {%- else -%} +
+ + + {% trans %}There are no documents yet.{% endtrans %} + +
+ {%- endif %}
{% endif %} diff --git a/indico/web/client/styles/modules/_registrationform.scss b/indico/web/client/styles/modules/_registrationform.scss index db0242e9033..947b45687d4 100644 --- a/indico/web/client/styles/modules/_registrationform.scss +++ b/indico/web/client/styles/modules/_registrationform.scss @@ -641,3 +641,21 @@ max-width: 100%; max-height: 450px; } + +.no-data-message { + display: flex; + align-items: center; + flex-direction: column; + gap: 15px; + padding: 10px; + + i { + font-size: 3em; + color: $dark-gray; + } + + span { + font-size: 1.5em; + color: $dark-gray; + } +}