Commit 9ba87c92 authored by Tristan Cavelier's avatar Tristan Cavelier

erp5_xhtml_style: show different message on NotFound error rendering

parent 9db00ea6
......@@ -3,15 +3,25 @@
xmlns:metal="http://xml.zope.org/namespaces/metal"
xmlns:i18n="http://xml.zope.org/namespaces/i18n"
metal:define-macro="standard_error_message_render"
tal:define="is_not_found_error python: options.get('error_type') == 'NotFound';
use_error_message python: not is_not_found_error and options.get('error_message')"
>
<div tal:condition="options/error_message" tal:content="structure options/error_message" />
<div tal:condition="not: options/error_message">
<div tal:condition="use_error_message" tal:content="structure options/error_message" />
<div tal:condition="not: use_error_message">
<h2 i18n:translate="">Site Error</h2>
<p i18n:translate="">An error was encountered while publishing this resource.</p>
<p>
<strong i18n:translate="">Error Type: <span tal:replace="options/error_type" i18n:name="error_type" /></strong><br />
<strong i18n:translate="">Error Value: <span tal:replace="options/error_value" i18n:name="error_value" /></strong><br />
</p>
<tal:block tal:condition="is_not_found_error">
<p><strong i18n:translate="">Resource not found</strong></p>
<p i18n:translate="">Sorry, the requested resource does not exist.</p>
<p i18n:translate="">Check the URL and try again.</p>
<p><strong i18n:translate="">Resource:</strong> <span tal:replace="request/URL" /></p>
</tal:block>
<tal:block tal:condition="not: is_not_found_error">
<p>
<strong i18n:translate="">Error Type: <span tal:replace="options/error_type" i18n:name="error_type" /></strong><br />
<strong i18n:translate="">Error Value: <span tal:replace="options/error_value" i18n:name="error_value" /></strong><br />
</p>
</tal:block>
<hr noshade="noshade" />
<p i18n:translate="">Troubleshooting Suggestions</p>
<ul>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment