Page templates (views/website_pages.xml): - Footer social icons pointed at facebook.com/youtube.com/instagram.com homepages; now TNCSC's own profiles. - "View Event" pointed at a static product mock-up; now /event. - Home "Book Now", Events "Register Event" and the picnic page's "Add To Cart" (which went to /contact) now open the real Summer Picnic registration, falling back to /event if that event is missing. - Home All/Event tabs were href="#"; now /event. - About "Learn More" went to the contact form; relabelled "Contact Us". - Benefits "Become A Member" now goes to /membership/registration. Stock Odoo chrome on built-in pages (login, event/school registration): - Footer replaced with a TNCSC footer (real links, company email, only configured social profiles) instead of demo content with info@yourcompany.example.com, a 555 number and dead "#" links. Priority 90 so it also wins over the website-specific footer copy on the server. - Header "Contact Us" now goes to /contact; the demo phone number is replaced by the company email. community_portal: /my and /my/home (the "Member Login" target) returned a 500 for anonymous visitors because of this Odoo build's auth='user' redirect bug; they now redirect to the login page. website_pages.xml is noupdate, so upgrades never applied template fixes. The 19.0.1.2.0 pre-migrate reloads it once in init mode (this overwrites website-editor edits to those pages; none exist on the server). Verified locally: upgrade of tncsc_site succeeds, every internal link on 16 pages resolves (200/30x), and a fresh install passes 34/34 tests for community_membership, community_portal and tncsc_deployment. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
213 lines
11 KiB
XML
213 lines
11 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<odoo>
|
|
<template id="website_member_login_button" name="TNCSC Member Login Button">
|
|
<a href="/web/login?redirect=/my" class="tncsc-member-login">
|
|
<i class="fa fa-user" aria-hidden="true"/> Member Login
|
|
</a>
|
|
</template>
|
|
|
|
<!-- These pages provide their own TNCSC header and navigation.
|
|
Keep overrides outside the noupdate page seeds so upgrades apply
|
|
the fix without replacing administrator-edited page content. -->
|
|
<template id="view_page_home_custom_header_only"
|
|
inherit_id="tncsc_deployment.view_page_home"
|
|
name="Use TNCSC navigation without the default website header">
|
|
<xpath expr="//t[@t-call='website.layout']" position="inside">
|
|
<t t-set="no_header" t-value="True"/>
|
|
</xpath>
|
|
<xpath expr="//div[hasclass('tncsc-hero-nav')]//a[@href='/contact']" position="after">
|
|
<t t-call="tncsc_deployment.website_member_login_button"/>
|
|
</xpath>
|
|
</template>
|
|
|
|
<template id="view_page_about_custom_header_only"
|
|
inherit_id="tncsc_deployment.view_page_about"
|
|
name="Use TNCSC navigation without the default website header">
|
|
<xpath expr="//t[@t-call='website.layout']" position="inside">
|
|
<t t-set="no_header" t-value="True"/>
|
|
</xpath>
|
|
<xpath expr="//div[hasclass('tncsc-hero-nav')]//a[@href='/contact']" position="after">
|
|
<t t-call="tncsc_deployment.website_member_login_button"/>
|
|
</xpath>
|
|
</template>
|
|
|
|
<template id="view_page_tamil_nadu_custom_header_only"
|
|
inherit_id="tncsc_deployment.view_page_tamil_nadu"
|
|
name="Use TNCSC navigation without the default website header">
|
|
<xpath expr="//t[@t-call='website.layout']" position="inside">
|
|
<t t-set="no_header" t-value="True"/>
|
|
</xpath>
|
|
<xpath expr="//div[hasclass('tncsc-hero-nav')]//a[@href='/contact']" position="after">
|
|
<t t-call="tncsc_deployment.website_member_login_button"/>
|
|
</xpath>
|
|
</template>
|
|
|
|
<template id="view_page_board_custom_header_only"
|
|
inherit_id="tncsc_deployment.view_page_board"
|
|
name="Use TNCSC navigation without the default website header">
|
|
<xpath expr="//t[@t-call='website.layout']" position="inside">
|
|
<t t-set="no_header" t-value="True"/>
|
|
</xpath>
|
|
<xpath expr="//div[hasclass('tncsc-hero-nav')]//a[@href='/contact']" position="after">
|
|
<t t-call="tncsc_deployment.website_member_login_button"/>
|
|
</xpath>
|
|
</template>
|
|
|
|
<template id="view_page_membership_custom_header_only"
|
|
inherit_id="tncsc_deployment.view_page_membership"
|
|
name="Use TNCSC navigation without the default website header">
|
|
<xpath expr="//t[@t-call='website.layout']" position="inside">
|
|
<t t-set="no_header" t-value="True"/>
|
|
</xpath>
|
|
<xpath expr="//div[hasclass('tncsc-hero-nav')]//a[@href='/contact']" position="after">
|
|
<t t-call="tncsc_deployment.website_member_login_button"/>
|
|
</xpath>
|
|
</template>
|
|
|
|
<template id="view_page_membership_benefits_custom_header_only"
|
|
inherit_id="tncsc_deployment.view_page_membership_benefits"
|
|
name="Use TNCSC navigation without the default website header">
|
|
<xpath expr="//t[@t-call='website.layout']" position="inside">
|
|
<t t-set="no_header" t-value="True"/>
|
|
</xpath>
|
|
<xpath expr="//div[hasclass('tncsc-hero-nav')]//a[@href='/contact']" position="after">
|
|
<t t-call="tncsc_deployment.website_member_login_button"/>
|
|
</xpath>
|
|
</template>
|
|
|
|
<template id="view_page_membership_registration_custom_header_only"
|
|
inherit_id="tncsc_deployment.view_page_membership_registration"
|
|
name="Use TNCSC navigation without the default website header">
|
|
<xpath expr="//t[@t-call='website.layout']" position="inside">
|
|
<t t-set="no_header" t-value="True"/>
|
|
</xpath>
|
|
<xpath expr="//div[hasclass('tncsc-hero-nav')]//a[@href='/contact']" position="after">
|
|
<t t-call="tncsc_deployment.website_member_login_button"/>
|
|
</xpath>
|
|
</template>
|
|
|
|
<template id="view_page_events_custom_header_only"
|
|
inherit_id="tncsc_deployment.view_page_events"
|
|
name="Use TNCSC navigation without the default website header">
|
|
<xpath expr="//t[@t-call='website.layout']" position="inside">
|
|
<t t-set="no_header" t-value="True"/>
|
|
</xpath>
|
|
<xpath expr="//div[hasclass('tncsc-hero-nav')]//a[@href='/contact']" position="after">
|
|
<t t-call="tncsc_deployment.website_member_login_button"/>
|
|
</xpath>
|
|
</template>
|
|
|
|
<template id="view_page_product_summer_picnic_custom_header_only"
|
|
inherit_id="tncsc_deployment.view_page_product_summer_picnic"
|
|
name="Use TNCSC navigation without the default website header">
|
|
<xpath expr="//t[@t-call='website.layout']" position="inside">
|
|
<t t-set="no_header" t-value="True"/>
|
|
</xpath>
|
|
<xpath expr="//div[hasclass('tncsc-hero-nav')]//a[@href='/contact']" position="after">
|
|
<t t-call="tncsc_deployment.website_member_login_button"/>
|
|
</xpath>
|
|
</template>
|
|
|
|
<template id="view_page_tamil_school_custom_header_only"
|
|
inherit_id="tncsc_deployment.view_page_tamil_school"
|
|
name="Use TNCSC navigation without the default website header">
|
|
<xpath expr="//t[@t-call='website.layout']" position="inside">
|
|
<t t-set="no_header" t-value="True"/>
|
|
</xpath>
|
|
<xpath expr="//div[hasclass('tncsc-hero-nav')]//a[@href='/contact']" position="after">
|
|
<t t-call="tncsc_deployment.website_member_login_button"/>
|
|
</xpath>
|
|
</template>
|
|
|
|
<template id="view_page_contact_custom_header_only"
|
|
inherit_id="tncsc_deployment.view_page_contact"
|
|
name="Use TNCSC navigation without the default website header">
|
|
<xpath expr="//t[@t-call='website.layout']" position="inside">
|
|
<t t-set="no_header" t-value="True"/>
|
|
</xpath>
|
|
<xpath expr="//div[hasclass('tncsc-hero-nav')]//a[@href='/contact']" position="after">
|
|
<t t-call="tncsc_deployment.website_member_login_button"/>
|
|
</xpath>
|
|
</template>
|
|
<!-- Odoo's stock footer (shown on built-in pages such as event
|
|
registration, login and school registration) ships demo content:
|
|
dead "#" links, info@yourcompany.example.com, a 555 phone number and
|
|
X/LinkedIn icons TNCSC has no profiles for. A higher priority than
|
|
website.footer_custom (16) makes this replace it even where the
|
|
website editor has made a website-specific copy of that view. -->
|
|
<template id="tncsc_footer" inherit_id="website.layout" name="TNCSC Footer" priority="90">
|
|
<xpath expr="//div[@id='footer']" position="replace">
|
|
<div id="footer" class="oe_structure oe_structure_solo text-break" t-if="not no_footer">
|
|
<section class="pt40 pb16">
|
|
<div class="container">
|
|
<div class="row">
|
|
<div class="col-lg-3 pt24 pb24">
|
|
<h5>Useful Links</h5>
|
|
<ul class="list-unstyled">
|
|
<li><a href="/">Home</a></li>
|
|
<li><a href="/about">About Us</a></li>
|
|
<li><a href="/event">Events</a></li>
|
|
<li><a href="/membership/registration">Membership</a></li>
|
|
<li><a href="/tamil-school">Tamil Class</a></li>
|
|
<li><a href="/contact">Contact</a></li>
|
|
</ul>
|
|
</div>
|
|
<div class="col-lg-5 pt24 pb24">
|
|
<h5>About TNCSC</h5>
|
|
<p>A not-for-profit Ontario corporation serving Tamils of Indian origin in Canada
|
|
since 1997, preserving and promoting our language, heritage and culture.</p>
|
|
</div>
|
|
<div class="col-lg-3 offset-lg-1 pt24 pb24">
|
|
<h5>Connect with us</h5>
|
|
<ul class="list-unstyled">
|
|
<li><i class="fa fa-comment fa-fw me-2"/><a href="/contact">Contact us</a></li>
|
|
<li t-if="res_company.email">
|
|
<i class="fa fa-envelope fa-fw me-2"/><a t-attf-href="mailto:#{res_company.email}" t-out="res_company.email"/>
|
|
</li>
|
|
<li t-if="res_company.phone">
|
|
<i class="fa fa-phone fa-fw me-2"/><a t-attf-href="tel:#{res_company.phone}" t-out="res_company.phone"/>
|
|
</li>
|
|
</ul>
|
|
<div class="s_social_media text-start">
|
|
<a t-if="website.social_facebook" href="/website/social/facebook" target="_blank" rel="noopener" aria-label="Facebook">
|
|
<i class="fa fa-facebook rounded-circle shadow-sm"/>
|
|
</a>
|
|
<a t-if="website.social_youtube" href="/website/social/youtube" target="_blank" rel="noopener" aria-label="YouTube">
|
|
<i class="fa fa-youtube-play rounded-circle shadow-sm"/>
|
|
</a>
|
|
<a t-if="website.social_instagram" href="/website/social/instagram" target="_blank" rel="noopener" aria-label="Instagram">
|
|
<i class="fa fa-instagram rounded-circle shadow-sm"/>
|
|
</a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
</div>
|
|
</xpath>
|
|
</template>
|
|
|
|
<!-- Odoo's stock header (on built-in pages such as login, event and
|
|
school registration) links its button to the stock /contactus page
|
|
and shows a demo phone number. TNCSC publishes no phone number, so
|
|
show the company email instead. -->
|
|
<template id="tncsc_header_call_to_action" inherit_id="website.header_call_to_action" name="TNCSC Header Call to Action">
|
|
<xpath expr="//a[hasclass('btn_cta')]" position="attributes">
|
|
<attribute name="href">/contact</attribute>
|
|
</xpath>
|
|
</template>
|
|
|
|
<template id="tncsc_header_text_element" inherit_id="website.header_text_element" name="TNCSC Header Text element">
|
|
<xpath expr="//li" position="replace">
|
|
<li t-if="res_company.email" t-attf-class="#{_item_class}">
|
|
<div t-attf-class="s_text_block #{_div_class}" data-name="Text">
|
|
<a t-attf-href="mailto:#{res_company.email}" class="nav-link o_nav-link_secondary p-2">
|
|
<i class="fa fa-1x fa-fw fa-envelope me-1"/>
|
|
<small t-out="res_company.email"/>
|
|
</a>
|
|
</div>
|
|
</li>
|
|
</xpath>
|
|
</template>
|
|
</odoo>
|