diff --git a/froide/helper/templates/helper/search/multi_search.html b/froide/helper/templates/helper/search/multi_search.html new file mode 100644 index 000000000..e6ac20a4d --- /dev/null +++ b/froide/helper/templates/helper/search/multi_search.html @@ -0,0 +1,23 @@ +{% load i18n %} + +
\ No newline at end of file diff --git a/froide/helper/templatetags/search_helper.py b/froide/helper/templatetags/search_helper.py index aca3a3eaf..34777ca82 100644 --- a/froide/helper/templatetags/search_helper.py +++ b/froide/helper/templatetags/search_helper.py @@ -14,3 +14,10 @@ def render_search_list(context, current, num_results=None, query=""): "searches": searches, "query": query, } + + +@register.inclusion_tag("helper/search/multi_search.html", takes_context=True) +def multi_search(context, small=False): + searches = search_registry.get_searches(context["request"]) + + return {"searches": searches, "small": small} diff --git a/froide/templates/400.html b/froide/templates/400.html index 3bb0bf8bc..5448c9fcb 100644 --- a/froide/templates/400.html +++ b/froide/templates/400.html @@ -1,6 +1,10 @@ -{% extends 'base.html' %} +{% extends "./error_base.html" %} {% load i18n %} -{% block app_body %} -{{ message }}
-{% else %} -{% blocktrans %}You tried to access a site that you are not authorized to access or you triggered a security warning.{% endblocktrans %}
-{% endif %} -{% endblock %} +{% block error %} +{% blocktrans %}403 - Forbidden{% endblocktrans %} +{% endblock error %} + +{% block error_description %} +{% blocktrans %}You tried to access a site that you are not authorized to access or you triggered a security warning.{% endblocktrans %} +{% endblock error_description %} diff --git a/froide/templates/404.html b/froide/templates/404.html index e3305671c..ea149ff07 100644 --- a/froide/templates/404.html +++ b/froide/templates/404.html @@ -1,9 +1,10 @@ -{% extends 'base.html' %} +{% extends "./error_base.html" %} {% load i18n %} -{% block app_body %} -{% blocktrans with ref=request.sentry.id %}If you need assistance, you may reference this error as {{ ref }}.{% endblocktrans %}
-{% endif %} -{% endblock %} +{% block error_description %} +{% blocktrans with ref=request.sentry.id %}We logged the error and are working on fixing it. If you need to contact us, please use the reference{{ ref }}
.{% endblocktrans %}
+{% endblock error_description %}
\ No newline at end of file
diff --git a/froide/templates/error_base.html b/froide/templates/error_base.html
new file mode 100644
index 000000000..ec1a641d4
--- /dev/null
+++ b/froide/templates/error_base.html
@@ -0,0 +1,34 @@
+{% extends "base.html" %}
+{% load i18n %}
+{% load search_helper %}
+
+{% block body %}
+ + {% blocktrans %}You can try searching or go back to the Home page.{% endblocktrans %} +
+ + {% multi_search %} +