From bc4e83d76a970b0e589c6a0becd2171e78fde682 Mon Sep 17 00:00:00 2001 From: rubenwardy Date: Tue, 19 Jul 2022 23:29:56 +0100 Subject: [PATCH] Add noindex to report page when given a URL --- app/blueprints/report/__init__.py | 2 +- app/templates/report/index.html | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/app/blueprints/report/__init__.py b/app/blueprints/report/__init__.py index 58b1b94..72bd7c5 100644 --- a/app/blueprints/report/__init__.py +++ b/app/blueprints/report/__init__.py @@ -64,4 +64,4 @@ def report(): return redirect(url_for("tasks.check", id=task.id, r=url_for("homepage.home"))) - return render_template("report/index.html", form=form, url=url, is_anon=is_anon) + return render_template("report/index.html", form=form, url=url, is_anon=is_anon, noindex=url is not None) diff --git a/app/templates/report/index.html b/app/templates/report/index.html index ea13e48..9c40bfe 100644 --- a/app/templates/report/index.html +++ b/app/templates/report/index.html @@ -4,6 +4,12 @@ {{ _("Report") }} {% endblock %} +{% block headextra %} + {% if noindex %} + + {% endif %} +{% endblock %} + {% block content %}

{{ _("Report") }}