Event list: Move empty message inside panel (Z#23185800) (#4910)

* Event list: Move empty message inside panel (Z#23185800)

* Review notes and adjust some margins
This commit is contained in:
Raphael Michel
2025-03-18 14:22:34 +01:00
committed by GitHub
parent 745929b625
commit 4740291e43
3 changed files with 32 additions and 25 deletions

View File

@@ -30,24 +30,24 @@
</div> </div>
</div> </div>
</div> </div>
{% if events %} <div class="panel panel-default">
<div class="panel panel-default"> <div class="panel-heading">
<div class="panel-heading"> <h2 class="panel-title">
<h2 class="panel-title"> <b>
<b> {% if "old" in request.GET %}
{% if "old" in request.GET %} {% trans "Past events" %}
{% trans "Past events" %} {% else %}
{% else %} {% trans "Upcoming events" %}
{% trans "Upcoming events" %} {% endif %}
{% endif %} </b>
</b> </h2>
</h2> </div>
</div> {% if filter_form.fields %}
{% if filter_form.fields %} <div class="panel-subhead">
<div class="panel-subhead"> {% include "pretixpresale/fragment_event_list_filter.html" with request=request %}
{% include "pretixpresale/fragment_event_list_filter.html" with request=request %} </div>
</div> {% endif %}
{% endif %} {% if events %}
<div class="panel-body"> <div class="panel-body">
<dl class="full-width-list alternating-rows"> <dl class="full-width-list alternating-rows">
{% for e in events %}{% eventurl e "presale:event.index" as url %} {% for e in events %}{% eventurl e "presale:event.index" as url %}
@@ -99,12 +99,15 @@
{% endfor %} {% endfor %}
</dl> </dl>
</div> </div>
<hr>
{% endif %}
<div class="panel-body">
{% if "old" in request.GET %}
<p><em>{% if not events %}{% trans "No archived events found." %} {% endif %}<a href="?{% url_replace request "old" "" %}">{% trans "Show upcoming" %}</a></em></p>
{% else %}
<p><em>{% if not events %}{% trans "No public upcoming events found." %} {% endif %}<a href="?{% url_replace request "old" "1" %}">{% trans "Show past events" %}</a></em></p>
{% endif %}
</div> </div>
{% endif %} </div>
{% if "old" in request.GET %}
<p><em>{% if not events %}{% trans "No archived events found." %} {% endif %}<a href="?{% url_replace request "old" "" %}">{% trans "Show upcoming" %}</a></em></p>
{% else %}
<p><em>{% if not events %}{% trans "No public upcoming events found." %} {% endif %}<a href="?{% url_replace request "old" "1" %}">{% trans "Show past events" %}</a></em></p>
{% endif %}
{% include "pretixpresale/pagination.html" %} {% include "pretixpresale/pagination.html" %}
{% endblock %} {% endblock %}

View File

@@ -145,6 +145,11 @@ article.item-with-variations .product-row:last-child:after {
margin-bottom: 0; margin-bottom: 0;
} }
.panel > hr {
margin: 0;
border-top: 1px solid $table-border-color;
}
.product-row { .product-row {
padding: 1.25*$line-height-computed 0; padding: 1.25*$line-height-computed 0;

View File

@@ -413,7 +413,6 @@ details.details-open .panel-title::before {
} }
.panel-subhead { .panel-subhead {
margin-bottom: 15px;
padding: 15px; padding: 15px;
background: $table-bg-accent; background: $table-bg-accent;
border-bottom: 1px solid $table-border-color; border-bottom: 1px solid $table-border-color;