- {{ _("There's nothing here") }} -
-+ {{ _("Page not found") }} +
+ -{{ error_message }}
+ ++ {{ _("Error: {0}").format(http_status_code) }} +
+{{ error_message }}
+ + + + + +- {{ _("Error Code: {0}").format(http_status_code) }} -
-- If you don't know what just happened, and wish to file a ticket - please copy the error below and share it. -
-{{ error }}
-- - {{ title or _("Message") }} -
-{{ message }}
- {% endif %} - {% if primary_action %} - - {% endif %} - {% endblock %} +{{ title or _("Message") }}
+{{ message }}
+ {% if error_code %} +{{ _("Status: {0}").format(error_code) }}
+ {% endif %} + {% endif %} + {% if primary_action %} + + {% endif %} + {% endblock %} +{{ _("Status: {0}").format(error_code) }}
-{% endif %} -{% endblock %} diff --git a/frappe/www/search.py b/frappe/www/search.py deleted file mode 100644 index 9c2fa4a11c..0000000000 --- a/frappe/www/search.py +++ /dev/null @@ -1,63 +0,0 @@ -import markupsafe - -import frappe -from frappe import _ -from frappe.core.utils import html2text -from frappe.utils import sanitize_html -from frappe.utils.global_search import web_search - - -def get_context(context): - context.no_cache = 1 - if frappe.form_dict.q: - query = str(markupsafe.escape(sanitize_html(frappe.form_dict.q))) - context.title = _("Search Results for") - context.query = query - context.route = "/search" - context.update(get_search_results(query, frappe.utils.sanitize_html(frappe.form_dict.scope))) - else: - context.title = _("Search") - - -@frappe.whitelist(allow_guest=True) -def get_search_results(text: str, scope: str | None = None, start: int = 0, as_html: bool = False): - results = web_search(text, scope, start, limit=21) - out = frappe._dict() - - if len(results) == 21: - out.has_more = 1 - results = results[:20] - - for d in results: - try: - d.content = html2text(d.content) - index = d.content.lower().index(text.lower()) - d.content = ( - d.content[:index] - + "" - + d.content[index:][: len(text)] - + "" - + d.content[index + len(text) :] - ) - - if index < 40: - start = 0 - prefix = "" - else: - start = index - 40 - prefix = "..." - - suffix = "" - if (index + len(text) + 47) < len(d.content): - suffix = "..." - - d.preview = prefix + d.content[start : start + len(text) + 87] + suffix - except Exception: - d.preview = html2text(d.content)[:97] + "..." - - out.results = results - - if as_html: - out.results = frappe.render_template("templates/includes/search_result.html", out) - - return out diff --git a/frappe/www/unsubscribe.html b/frappe/www/unsubscribe.html index 09c9d49ab9..1a4ede3a55 100644 --- a/frappe/www/unsubscribe.html +++ b/frappe/www/unsubscribe.html @@ -2,93 +2,102 @@ {% block title %} Unsubscribe from Newsletter {% endblock %} +{% block navbar %}{% endblock %} +{% block footer %}{% endblock %} + {% block page_content %} + - + $("#unselect-all-btn").click(function() { + $(".group").prop('checked', false); + }); + }); + - {% if status == "waiting_for_confirmation" %} - -