mirror of
https://github.com/pretix/pretix.git
synced 2026-05-07 15:34:02 +00:00
Add meta_noindex setting on organizer level
This commit is contained in:
@@ -7,6 +7,13 @@
|
||||
{% block thetitle %}
|
||||
{% block title %}{% endblock %}{% if url_name != "organizer.index" %} :: {% endif %}{{ organizer.name }}
|
||||
{% endblock %}
|
||||
{% block custom_header %}
|
||||
{% if organizer.settings.meta_noindex %}
|
||||
<meta name="robots" content="noindex, nofollow">
|
||||
{% endif %}
|
||||
<meta property="og:type" content="website" />
|
||||
{{ block.super }}
|
||||
{% endblock %}
|
||||
{% block above %}
|
||||
{% if organizer.settings.locales|length > 1 or request.organizer.settings.customer_accounts %}
|
||||
{% if organizer.settings.theme_color_background|upper != "#FFFFFF" or organizer.settings.organizer_logo_image_large %}
|
||||
|
||||
@@ -635,6 +635,8 @@ class EventIcalDownload(EventViewMixin, View):
|
||||
resp['Content-Disposition'] = 'attachment; filename="{}-{}-{}.ics"'.format(
|
||||
event.organizer.slug, event.slug, subevent.pk if subevent else '0',
|
||||
)
|
||||
if event.settings.meta_noindex:
|
||||
resp['X-Robots-Tag'] = 'noindex'
|
||||
return resp
|
||||
|
||||
|
||||
|
||||
@@ -765,4 +765,6 @@ class OrganizerIcalDownload(OrganizerViewMixin, View):
|
||||
resp['Content-Disposition'] = 'attachment; filename="{}.ics"'.format(
|
||||
request.organizer.slug
|
||||
)
|
||||
if request.organizer.settings.meta_noindex:
|
||||
resp['X-Robots-Tag'] = 'noindex'
|
||||
return resp
|
||||
|
||||
Reference in New Issue
Block a user