Skip to content
Closed
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 36 additions & 3 deletions app/eventyay/control/templates/pretixcontrol/dashboard.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ <h1>{% trans "Tickets dashboard" %}</h1>
class="event-dropdown dropdown-menu">
</ul>
</div>
<h2>{% trans "Your upcoming events" %}</h2>
<!-- <h2>{% trans "Your upcoming events" %}</h2>
<div class="dashboard">
{% if can_create_event %}
<div class="widget-small widget-container">
Expand All @@ -32,7 +32,40 @@ <h2>{% trans "Your upcoming events" %}</h2>
</div>
</div>
{% endfor %}
</div>
</div> -->

<!-- this is the updated code -->
<h2>{% trans "Your upcoming events" %}</h2>
<div class="dashboard">
{% if can_create_event %}
<div class="widget-small widget-container">
<a href="{% url "eventyay_common:events.add" %}" class="widget">
<div class="newevent">
<span class="fa fa-plus-circle"></span>
{% trans "Create a new event" %}
</div>
</a>
</div>
{% endif %}

{% if upcoming %}
{% for w in upcoming %}
<div class="widget-{{ w.display_size|default:"small" }} {{ w.container_class|default:"widget-container" }} {% if w.lazy %}widget-lazy-loading{% endif %}" data-lazy-id="{{ w.lazy }}">
<div class="widget">
{% if w.lazy %}
<span class="fa fa-cog fa-4x"></span>
{% else %}
{{ w.content|safe }}
{% endif %}
</div>
</div>
{% endfor %}
{% else %}
<div class="alert alert-info">
{% trans "You don’t have any upcoming events yet." %}
</div>
{% endif %}
</div>
{% if upcoming %}
<p class="">
Comment on lines 69 to 70
Copy link

Copilot AI Dec 18, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This creates duplicate logic for checking the upcoming variable. Lines 51-62 check if upcoming to display events, and lines 70-76 also check if upcoming to show the "View all future events" link. This check should be consolidated to avoid redundant conditional logic.

Copilot uses AI. Check for mistakes.
<a href="{% url "control:events" %}?ordering=date_from&status=date_future" class="">
Expand Down Expand Up @@ -108,4 +141,4 @@ <h2>{% trans "Other features" %}</h2>
{% endfor %}
</div>
{% endif %}
{% endblock %}
{% endblock %}