Files
odoo_source/addons/website_partner/views/website_partner_templates.xml
T
rde 4ecbacaf59 [ADD] website: add new page management
website.page = old ir.ui.view with page=True
website.redirect is a new mechanism to replace in the futur the ir.attachment
mechanism of redirect.

From now, we don't have a specific /page controller to serve 'page'.

We use a new model website.page which is rendered if none route matches the url
 and that the field 'url' on website.page matches the request.httprequest.path.

The order to serve a path is:
    - Routes defines in controllers (/shop, /blog, ...)
    - ir.attachment with name matching the path
    - website.page with url matching the path
    - website.redirect with url_from matching the path
    - 404

To improve:
    - allow regexp in website.redirect model
    - allow to edit the view_arch from the page.management via redirect backend
      (needed when traceback in the page, or when modifying a js/css/less/...)
2017-09-15 15:29:37 +02:00

41 lines
1.4 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<odoo>
<template id="partner_page" name="Partner Page">
<t t-call="website.layout">
<div id="wrap">
<div class="oe_structure"/>
<div class="container">
<div class="row">
<t t-call="website_partner.partner_detail"></t>
</div>
</div>
<div class="oe_structure"/>
</div>
</t>
</template>
<template id="partner_detail" name="Partner Details">
<h1 class="col-md-12 text-center" id="partner_name" t-field="partner.display_name"/>
<div class="col-md-4">
<div t-field="partner.image" t-options='{"widget": "image", "class": "center-block mb16"}'/>
<address class="well">
<div t-field="partner.self" t-options='{
"widget": "contact",
"fields": ["address", "website", "phone", "email"]
}'/>
</address>
<t t-raw="left_column or ''"/>
</div>
<div class="col-md-8 mt32">
<t t-if="partner">
<div t-field="partner.website_description"/>
<t groups="website.group_website_publisher">
<h2 class="css_non_editable_mode_hidden o_not_editable">Short Description for List View</h2>
<div class="css_non_editable_mode_hidden" t-field="partner.website_short_description"/>
</t>
</t>
<t t-raw="right_column or ''"/>
</div>
</template>
</odoo>