[FIX] website*: make custom footer independant of main layout

This commit is contained in:
Richard Mathot 2014-06-02 16:56:36 +02:00
parent 401607ed11
commit 8dc0503aa5
9 changed files with 96 additions and 96 deletions

View File

@ -137,7 +137,6 @@
</main>
<footer>
<div id="footer_container">
<t t-call="website.footer_default" />
</div>
<div class="container mt16 mb8">
<div class="pull-right" t-ignore="true" t-if="not editable">
@ -273,70 +272,7 @@
</xpath>
</template>
<template id="footer_default" name="Default Footer">
<div class="container hidden-print">
<div class="row">
<div class="col-md-3">
<h4>Our products &amp; Services</h4>
<ul class="list-unstyled" name="products">
<li><a href="/">Home</a></li>
</ul>
</div>
<div class="col-md-3" id="info">
<h4>Connect with us</h4>
<ul class="list-unstyled">
<li><a href="/page/website.contactus">Contact us</a></li>
</ul>
<ul class="list-unstyled">
<li t-ignore="true"><i class="fa fa-phone"></i> <span t-field="res_company.phone"></span></li>
<li t-ignore="true"><i class="fa fa-envelope"></i> <span t-field="res_company.email"></span></li>
</ul>
<h2>
<a t-att-href="website.social_facebook" t-if="website.social_facebook"><i class="fa fa-facebook-square"/></a>
<a t-att-href="website.social_twitter" t-if="website.social_twitter"><i class="fa fa-twitter"/></a>
<a t-att-href="website.social_linkedin" t-if="website.social_linkedin"><i class="fa fa-linkedin"/></a>
<a t-att-href="website.social_youtube" t-if="website.social_youtube"><i class="fa fa-youtube-play"/></a>
<a t-att-href="website.social_googleplus" t-if="website.social_googleplus"><i class="fa fa-google-plus-square"/></a>
<a t-att-href="website.social_github" t-if="website.social_github"><i class="fa fa-github"/></a>
</h2>
</div>
<div class="col-md-5 col-lg-offset-1">
<div>
<h4>
<span t-field="res_company.name">Your Company</span>
<small> - <a href="/page/website.aboutus">About us</a></small>
</h4>
<p>
We are a team of passionate people whose goal is to improve everyone's
life through disruptive products. We build great products to solve your
business problems.
</p>
<p>
Our products are designed for small to medium size companies willing to optimize
their performance.
</p>
</div>
<ul class="list-inline js_language_selector mt16" t-if="(request.website_multilang and len(languages) &gt; 1) or editable">
<li t-foreach="languages" t-as="lg">
<a t-att-href="url_for(request.httprequest.path + '?' + keep_query(), lang=lg[0])"
t-att-data-default-lang="editable and 'true' if lg[0] == website.default_lang_code else None">
<t t-esc="lg[1].split('/').pop()"/>
</a>
</li>
<li groups="base.group_website_publisher">
<t t-set="url_return" t-value="url_for('', '[lang]') + '?' + keep_query()"/>
<a t-attf-href="/web#action=base.action_view_base_language_install&amp;website_id=#{website.id}&amp;url_return=#{url_return}">
<i class="fa fa-plus-circle"/>
Add a language...
</a>
</li>
</ul>
</div>
</div>
</div>
</template>
<template id="footer_custom" inherit_id="website.layout" optional="disabled" name="Custom Footer">
<template id="footer_custom" inherit_id="website.layout" name="Footer">
<xpath expr="//div[@id='footer_container']" position="replace">
<div class="oe_structure">
<section data-snippet-id='three-columns' class="mt16 mb16">
@ -367,6 +303,70 @@
</xpath>
</template>
<template id="footer_default" inherit_id="website.footer_custom" optional="enabled" name="Automatic Footer">
<xpath expr="//div[@class='oe_structure']" position="replace">
<div class="container hidden-print">
<div class="row">
<div class="col-md-3">
<h4>Our products &amp; Services</h4>
<ul class="list-unstyled" id="products">
<li><a href="/">Home</a></li>
</ul>
</div>
<div class="col-md-3" id="info">
<h4>Connect with us</h4>
<ul class="list-unstyled">
<li><a href="/page/website.contactus">Contact us</a></li>
</ul>
<ul class="list-unstyled">
<li t-ignore="true"><i class="fa fa-phone"></i> <span t-field="res_company.phone"></span></li>
<li t-ignore="true"><i class="fa fa-envelope"></i> <span t-field="res_company.email"></span></li>
</ul>
<h2>
<a t-att-href="website.social_facebook" t-if="website.social_facebook"><i class="fa fa-facebook-square"/></a>
<a t-att-href="website.social_twitter" t-if="website.social_twitter"><i class="fa fa-twitter"/></a>
<a t-att-href="website.social_linkedin" t-if="website.social_linkedin"><i class="fa fa-linkedin"/></a>
<a t-att-href="website.social_youtube" t-if="website.social_youtube"><i class="fa fa-youtube-play"/></a>
<a t-att-href="website.social_googleplus" t-if="website.social_googleplus"><i class="fa fa-google-plus-square"/></a>
<a t-att-href="website.social_github" t-if="website.social_github"><i class="fa fa-github"/></a>
</h2>
</div>
<div class="col-md-5 col-lg-offset-1">
<div>
<h4>
<span t-field="res_company.name" />
<small> - <a href="/page/website.aboutus">About us</a></small>
</h4>
<p>
We are a team of passionate people whose goal is to improve everyone's
life through disruptive products. We build great products to solve your
business problems.
</p>
<p>
Our products are designed for small to medium size companies willing to optimize
their performance.
</p>
</div>
<ul class="list-inline js_language_selector mt16" t-if="(request.website_multilang and len(languages) &gt; 1) or editable">
<li t-foreach="languages" t-as="lg">
<a t-att-href="url_for(request.httprequest.path + '?' + keep_query(), lang=lg[0])"
t-att-data-default-lang="editable and 'true' if lg[0] == website.default_lang_code else None">
<t t-esc="lg[1].split('/').pop()"/></a>
</li>
<li groups="base.group_website_publisher">
<t t-set="url_return" t-value="url_for('', '[lang]') + '?' + keep_query()"/>
<a t-attf-href="/web#action=base.action_view_base_language_install&amp;website_id=#{website.id}&amp;url_return=#{url_return}">
<i class="fa fa-plus-circle"/>
Add a language...
</a>
</li>
</ul>
</div>
</div>
</div>
</xpath>
</template>
<template id="publish_management">
<div groups="base.group_website_publisher" t-ignore="true" class="pull-right css_editable_mode_hidden" t-att-style="style or ''">
<div t-attf-class="btn-group js_publish_management #{object.website_published and 'css_published' or 'css_unpublished'}" t-att-data-id="object.id" t-att-data-object="object._name" t-att-data-controller="publish_controller">

View File

@ -3,8 +3,8 @@
<data>
<!-- Layout add nav and footer -->
<template id="footer_custom" inherit_id="website.layout" name="Footer Partners Link">
<xpath expr="//footer//div[@name='info']/ul" position="inside">
<template id="footer_custom" inherit_id="website.footer_default" name="Footer Partners Link">
<xpath expr="//div[@id='info']/ul" position="inside">
<li><a href="/partners">Resellers</a></li>
</xpath>
</template>

View File

@ -3,8 +3,8 @@
<data>
<!-- Layout add nav and footer -->
<template id="footer_custom" inherit_id="website.layout" name="Footer Customer References Link">
<xpath expr="//footer//div[@name='info']/ul" position="inside">
<template id="footer_custom" inherit_id="website.footer_default" name="Footer Customer References Link">
<xpath expr="//div[@id='info']/ul" position="inside">
<li><a href="/customers">Our References</a></li>
</xpath>
</template>

View File

@ -16,8 +16,8 @@
</template>
<!-- Layout add nav and footer -->
<template id="header_footer_custom" inherit_id="website.layout" name="Footer Events Link">
<xpath expr="//footer//ul[@name='products']" position="inside">
<template id="header_footer_custom" inherit_id="website.footer_custom" name="Footer Events Link">
<xpath expr="//ul[@id='products']" position="inside">
<li><a href="/event">Events</a></li>
</xpath>
</template>

View File

@ -14,9 +14,9 @@
</template>
<!-- Layout add nav and footer -->
<template id="header_footer_custom" inherit_id="website.layout"
<template id="header_footer_custom" inherit_id="website.footer_custom"
name="Footer Questions Link">
<xpath expr="//footer//ul[@name='products']" position="inside">
<xpath expr="//ul[@id='products']" position="inside">
<li><a t-attf-href="/forum/%(website_forum.forum_help)d">Q&amp;A</a></li>
<li><a href="/forum">Forums</a></li>
</xpath>

View File

@ -3,9 +3,9 @@
<data>
<!-- Layout add nav and footer -->
<template id="header_footer_custom" inherit_id="website.layout"
<template id="header_footer_custom" inherit_id="website.footer_custom"
name="Footer Documentation Link">
<xpath expr="//footer//ul[@name='products']" position="inside">
<xpath expr="//ul[@id='products']" position="inside">
<li><a href="/forum/how-to">Documentation</a></li>
</xpath>
</template>

View File

@ -8,8 +8,8 @@
</xpath>
</template>
<template id="job_footer_custom" inherit_id="website.layout" name="Footer Job Link">
<xpath expr="//footer//div[@name='info']/ul" position="inside">
<template id="job_footer_custom" inherit_id="website.footer_default" name="Footer Job Link">
<xpath expr="//div[@id='info']/ul" position="inside">
<li><a href="/jobs">Jobs</a></li>
</xpath>
</template>

View File

@ -2,8 +2,8 @@
<openerp>
<data>
<template id="footer_mailing_list" inherit_id="website.layout" name="Footer Mailing List Link">
<xpath expr="//footer//div[@name='info']/ul" position="inside">
<template id="footer_mailing_list" inherit_id="website.footer_default" name="Footer Mailing List Link">
<xpath expr="//div[@id='info']/ul" position="inside">
<li><a t-attf-href="/groups">Mailing List</a></li>
</xpath>
</template>

View File

@ -3,8 +3,8 @@
<data>
<!-- Layout add nav and footer -->
<template id="footer_custom" inherit_id="website.layout" name="Footer Associations Link">
<xpath expr="//footer//div[@name='info']/ul" position="inside">
<template id="footer_custom" inherit_id="website.footer_default" name="Footer Associations Link">
<xpath expr="//div[@id='info']/ul" position="inside">
<li><a href="/members">Members</a></li>
</xpath>
</template>