Organizer plugins: Do not show plugins as active if they are inactive on org-level (#5396)

This commit is contained in:
luelista
2025-08-22 09:31:01 +02:00
committed by GitHub
parent fe9a7eaa24
commit 49c0f6b967

View File

@@ -69,34 +69,36 @@
{% if show_meta %} {% if show_meta %}
<span class="text-muted text-sm">{{ plugin.version }}</span> <span class="text-muted text-sm">{{ plugin.version }}</span>
{% endif %} {% endif %}
{% if is_active and level == "organizer" %} {% if is_active or plugin.level == "event" %}
<span class="label label-success" data-is-active> {% if plugin.level == "organizer" %}
<span class="fa fa-check" aria-hidden="true"></span> <span class="label label-success" data-is-active>
{% trans "Active" %} <span class="fa fa-check" aria-hidden="true"></span>
</span> {% trans "Active" %}
{% elif events_counter == events_total %} </span>
<span class="label label-success" data-is-active> {% elif events_total and events_counter == events_total %}
<span class="fa fa-check" aria-hidden="true"></span> <span class="label label-success" data-is-active>
{% trans "Active (all events)" %} <span class="fa fa-check" aria-hidden="true"></span>
</span> {% trans "Active (all events)" %}
{% elif events_counter %} </span>
<span class="label label-info" data-is-active> {% elif events_counter %}
<span class="fa fa-check" aria-hidden="true"></span> <span class="label label-info" data-is-active>
{% blocktrans trimmed count count=events_counter %} <span class="fa fa-check" aria-hidden="true"></span>
Active ({{ count }} event) {% blocktrans trimmed count count=events_counter %}
{% plural %} Active ({{ count }} event)
Active ({{ count }} events) {% plural %}
{% endblocktrans %} Active ({{ count }} events)
</span> {% endblocktrans %}
{% elif level == "event_organizer" %} </span>
<span class="label label-info" data-is-active> {% elif level == "event_organizer" %}
<span class="fa fa-check" aria-hidden="true"></span> <span class="label label-info" data-is-active>
{% blocktrans trimmed count count=0 %} <span class="fa fa-check" aria-hidden="true"></span>
Active ({{ count }} event) {% blocktrans trimmed count count=0 %}
{% plural %} Active ({{ count }} event)
Active ({{ count }} events) {% plural %}
{% endblocktrans %} Active ({{ count }} events)
</span> {% endblocktrans %}
</span>
{% endif %}
{% endif %} {% endif %}
</h4> </h4>
{% include "pretixcontrol/event/fragment_plugin_description.html" with plugin=plugin %} {% include "pretixcontrol/event/fragment_plugin_description.html" with plugin=plugin %}