summaryrefslogtreecommitdiff
path: root/addons/http_routing/views/http_routing_template.xml
diff options
context:
space:
mode:
authorstephanchrst <stephanchrst@gmail.com>2022-05-10 21:51:50 +0700
committerstephanchrst <stephanchrst@gmail.com>2022-05-10 21:51:50 +0700
commit3751379f1e9a4c215fb6eb898b4ccc67659b9ace (patch)
treea44932296ef4a9b71d5f010906253d8c53727726 /addons/http_routing/views/http_routing_template.xml
parent0a15094050bfde69a06d6eff798e9a8ddf2b8c21 (diff)
initial commit 2
Diffstat (limited to 'addons/http_routing/views/http_routing_template.xml')
-rw-r--r--addons/http_routing/views/http_routing_template.xml184
1 files changed, 184 insertions, 0 deletions
diff --git a/addons/http_routing/views/http_routing_template.xml b/addons/http_routing/views/http_routing_template.xml
new file mode 100644
index 00000000..09c5f748
--- /dev/null
+++ b/addons/http_routing/views/http_routing_template.xml
@@ -0,0 +1,184 @@
+<?xml version="1.0" encoding="utf-8"?>
+<odoo>
+ <template id="http_error">
+ <t t-call="web.frontend_layout">
+ <div id="wrap">
+ <div class="oe_structure">
+ <h1 class="container mt32"><t t-esc="status_code"/>: <t t-esc="status_message"/></h1>
+ </div>
+ <t t-if="editable or debug">
+ <t t-call="http_routing.http_error_debug"/>
+ </t>
+ </div>
+ </t>
+ </template>
+
+ <template id="error_message">
+ <p t-if="error_message">
+ <strong>Error message:</strong>
+ <pre t-esc="error_message"/>
+ </p>
+ </template>
+
+ <template id="http_error_debug">
+ <div class="container accordion mb32 mt32" id="debug_infos">
+ <div class="card" t-if="error_message">
+ <h4 class="card-header">
+ <a data-toggle="collapse" href="#error_main">Error</a>
+ </h4>
+ <div id="error_main" class="collapse show">
+ <div class="card-body">
+ <t t-call="http_routing.error_message"/>
+ </div>
+ </div>
+ </div>
+ <div class="card" t-if="qweb_exception">
+ <h4 class="card-header">
+ <a data-toggle="collapse" href="#error_qweb">QWeb</a>
+ </h4>
+ <div id="error_qweb" class="collapse show">
+ <div class="card-body">
+ <p t-if="exception.message">
+ <strong>Error message:</strong>
+ <pre t-esc="exception.message"/>
+ </p>
+ <p>
+ The error occured while rendering the template <code t-esc="qweb_exception.name"/>
+ <t t-if="qweb_exception.html">and evaluating the following expression: <code t-esc="qweb_exception.html"/></t>
+ </p>
+ </div>
+ </div>
+ </div>
+ <div class="card" t-if="traceback">
+ <h4 class="card-header">
+ <a data-toggle="collapse" href="#error_traceback">Traceback</a>
+ </h4>
+ <div id="error_traceback" t-attf-class="collapse #{not error_message and not qweb_exception and 'show'}">
+ <div class="card-body">
+ <pre id="exception_traceback" t-esc="traceback"/>
+ </div>
+ </div>
+ </div>
+ </div>
+ </template>
+
+ <template id="400">
+ <t t-call="web.frontend_layout">
+ <div id="wrap">
+ <div class="container">
+ <h1 class="mt-5">Oops! Something went wrong.</h1>
+ <p>Take a look at the error message below.</p>
+ </div>
+ <t t-if="editable or request.session.debug">
+ <t t-call="http_routing.http_error_debug"/>
+ </t>
+ <t t-else="">
+ <div class="container">
+ <t t-call="http_routing.error_message"/>
+ </div>
+ </t>
+ </div>
+ </t>
+ </template>
+
+ <template id="403">
+ <t t-call="web.frontend_layout">
+ <div id="wrap">
+ <div class="container">
+ <h1 class="mt-5">403: Forbidden</h1>
+ <p>The page you were looking for could not be authorized.</p>
+ </div>
+ <t t-if="editable or request.session.debug">
+ <t t-call="http_routing.http_error_debug"/>
+ </t>
+ <t t-else="">
+ <div class="container">
+ <t t-call="http_routing.error_message"/>
+ </div>
+ </t>
+ </div>
+ </t>
+ </template>
+
+ <template id="404" name="Page Not Found">
+ <t t-call="web.frontend_layout">
+ <div id="wrap">
+ <t t-raw="0"/>
+ <div class="oe_structure oe_empty">
+ <section class="pt128 pb104">
+ <div class="container">
+ <div class="row">
+ <div class="col-md-6 text-center text-md-right my-md-auto mb-5 mb-md-0">
+ <img class="img img-fluid" src="/http_routing/static/src/img/404.svg"/>
+ </div>
+ <div class="col-md-6 text-center text-md-left my-auto">
+ <h1 class="sr-only">Error 404</h1>
+ <h2 class="mb16">We couldn't find the page you're looking for!</h2>
+ <p><b>Don't panic.</b> If you think it's our mistake, please send us a message on <a href="/contactus">this page</a>.</p>
+ </div>
+ <div class="col-12 pt40 pb24">
+ <hr/>
+ </div>
+ <div class="col-12">
+ <p class="text-center pt24">Maybe you were looking for one of these <b>popular pages?</b></p>
+ <ul class="list-inline text-center">
+ <li class="list-inline-item mb-2"><a href="/" class="btn btn-secondary">Home</a></li>
+ </ul>
+ </div>
+ </div>
+ </div>
+ </section>
+ </div>
+ </div>
+ </t>
+ </template>
+
+ <template id="500">
+ <!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
+ <!-- This template should not use any variable except those provided by http_routing.ir_http._handle_exception -->
+ <!-- no request.crsf_token, no theme style, no assets, ... cursor can be broken during rendering ! -->
+ <!-- see test_05_reset_specific_view_controller_broken_request -->
+ <!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
+ <html>
+ <head>
+ <title t-esc="status_message">Internal Server Error</title>
+ <t t-set="debug" t-value="True"/>
+
+ <link rel="stylesheet" href="/web/static/lib/bootstrap/css/bootstrap.css"/>
+ <script src="/web/static/lib/jquery/jquery.js" type="text/javascript"/>
+ <script type="text/javascript" src="/web/static/lib/bootstrap/js/util.js"/>
+ <script type="text/javascript" src="/web/static/lib/bootstrap/js/collapse.js"/>
+ <style>
+ html {
+ font-size: 14px;
+ }
+ </style>
+ </head>
+ <body>
+ <div id="wrapwrap">
+ <header>
+ <div class="navbar navbar-expand-md navbar-light bg-light">
+ <div class="container">
+ <div class="collapse navbar-collapse navbar-top-collapse">
+ <ul class="navbar-nav ml-auto" id="top_menu">
+ <li class="nav-item"><a href="/" class="nav-link">Home</a></li>
+ <li class="nav-item"><a href="javascript: window.history.back()" class="nav-link">Back</a></li>
+ </ul>
+ </div>
+ </div>
+ </div>
+ </header>
+ <main>
+ <div id="error_message" class="oe_structure">
+ <h2 class="container mt32"><t t-esc="status_code"/>: <t t-esc="status_message"/></h2>
+ </div>
+
+ <t t-if="editable or debug">
+ <t t-call="http_routing.http_error_debug"/>
+ </t>
+ </main>
+ </div>
+ </body>
+ </html>
+ </template>
+</odoo>