Compare commits

..

2 Commits

Author SHA1 Message Date
Raphael Michel
b580cadc48 Organizer plugins: Do not show plugins as active if they are not on org-level 2025-08-20 13:32:36 +02:00
Raphael Michel
7ecc64ec73 Bump version to 2025.8.0.dev0 2025-08-20 13:04:14 +02:00
4 changed files with 33 additions and 33 deletions

View File

@@ -42,7 +42,7 @@ dependencies = [
"django-filter==25.1",
"django-formset-js-improved==0.5.0.3",
"django-formtools==2.5.1",
"django-hierarkey==2.0.*,>=2.0.1",
"django-hierarkey==2.0.*",
"django-hijack==3.7.*",
"django-i18nfield==1.10.*",
"django-libsass==0.9",

View File

@@ -19,4 +19,4 @@
# You should have received a copy of the GNU Affero General Public License along with this program. If not, see
# <https://www.gnu.org/licenses/>.
#
__version__ = "2025.7.1"
__version__ = "2025.8.0.dev0"

View File

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

View File

@@ -638,10 +638,12 @@ class OrganizerPlugins(OrganizerDetailViewMixin, OrganizerPermissionRequiredMixi
active_counter = Counter()
events_total = 0
org_plugins = self.object.get_plugins()
for e in self.object.events.only("plugins").iterator():
events_total += 1
for p in e.get_plugins():
active_counter[p] += 1
if p in org_plugins:
active_counter[p] += 1
plugins_grouped = groupby(
sorted(
plugins,