[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,13 +3,13 @@
<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>
<!-- Page -->
<!-- Page -->
<template id="layout" name="Partners Layout">
<t t-call="website.layout">
<t t-set="additional_title">Resellers</t>
@ -44,7 +44,7 @@
<li t-att-class="grade['active'] and 'active' or ''">
<a t-attf-href="/partners#{ grade['grade_id'][0] and '/grade/%s' % grade['grade_id'][0] or '' }#{ current_country and '/country/%s' % slug(current_country) or '' }#{ '?' + (search_path or '') }">
<span class="badge pull-right" t-esc="grade['grade_id_count'] or ''"/>
<t t-esc="grade['grade_id'][1]"/>
<t t-esc="grade['grade_id'][1]"/>
</a>
</li>
</t>
@ -56,14 +56,14 @@
<li t-if="country['country_id']" t-att-class="country['active'] and 'active' or ''">
<a t-attf-href="/partners#{ current_grade and '/grade/%s' % slug(current_grade) or ''}#{country['country_id'][0] and '/country/%s' % country['country_id'][0] or '' }#{ '?' + (search_path or '') + (country['country_id'][0] == 0 and 'country_all=True' or '')}">
<span class="badge pull-right" t-esc="country['country_id_count'] or ''"/>
<t t-esc="country['country_id'][1]"/>
<t t-esc="country['country_id'][1]"/>
</a>
</li>
</t>
</ul>
</div>
<div class="col-md-8 col-md-offset-1" id="ref_content">
<div class='navbar'>
<div>

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>
@ -346,7 +346,7 @@
<div t-if="event.twitter_hashtag" class="mt16">
<p><strong>Participate on Twitter</strong></p>
<p class="text-muted">
Find out what people see and say about this event,
Find out what people see and say about this event,
and join the conversation.
</p>
<p><strong>Use this tag:

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>
@ -134,7 +134,7 @@
<div class="panel-heading text-center">
<h3 class="panel-title ">Stats</h3>
</div>
<div class="panel-body">
<div class="panel-body">
<table class="table">
<thead><tr><td> Asked: <strong><span t-field="question.create_date" t-field-options='{"format":"short"}'/></strong></td></tr></thead>
<tr><td> Seen: <strong><t t-raw="question.views"/></strong>
@ -181,7 +181,7 @@
style="display: inline-block;"/>
on <span t-field="question.write_date" t-field-options='{"format":"short"}'/>
with <b t-field="question.views"/> views
<span t-if="question.vote_count&gt;0"> and
<span t-if="question.vote_count&gt;0"> and
<b t-esc="question.vote_count or 0"/>
<t t-if="question.vote_count&gt;1">votes</t>
<t t-if="question.vote_count==1">vote</t>
@ -414,10 +414,10 @@
<template id="vote">
<div t-attf-class="box oe_grey">
<a t-attf-class="vote_up fa fa-thumbs-up no-decoration #{post.user_vote == 1 and 'text-success' or ''}"
<a t-attf-class="vote_up fa fa-thumbs-up no-decoration #{post.user_vote == 1 and 'text-success' or ''}"
t-attf-data-href="/forum/#{slug(post.forum_id)}/post/#{slug(post)}/upvote"/>
<span id="vote_count" t-esc="post.vote_count"/>
<a t-attf-class="vote_down fa fa-thumbs-down no-decoration #{post.user_vote == -1 and 'text-warning' or ''}"
<a t-attf-class="vote_down fa fa-thumbs-down no-decoration #{post.user_vote == -1 and 'text-warning' or ''}"
t-attf-data-href="/forum/#{slug(post.forum_id)}/post/#{slug(post)}/downvote"/>
<div t-if="vote_count &gt; 1" class="subtitle">
votes
@ -654,7 +654,7 @@
<a t-attf-href="/forum/#{ slug(forum) }/tag/#{ slug(tag) }/questions?{{ keep_query( filters='tag') }}" class="badge">
<span t-field="tag.name"/>
</a>
<span>
<span>
X <t t-esc="tag.posts_count"/>
</span>
</div>
@ -694,7 +694,7 @@
<template id="badge_user">
<t t-call="website_forum.header">
<h3 class="mt32 mb32">
<h3 class="mt32 mb32">
<b>Badge "<span t-field="badge.name"/>"</b>
</h3>
<div>
@ -765,7 +765,7 @@
<label class="col-md-2 control-label mb16" for="user.name">Real name</label>
<div class="col-md-7 mb16">
<input type="text" class="col-md-7 mb16 form-control" name="name" required="True" t-attf-value="#{user.name}"/>
</div>
</div>
<label class="col-md-2 control-label mb16" for="user.partner_id.website">Website</label>
<div class="col-md-7 mb16">
<input type="text" class="form-control" name="website" t-attf-value="#{user.partner_id.website or ''}"/>
@ -790,7 +790,7 @@
<!--Note: using website_description fiels instead of using commnt firld of partner-->
<label class="col-md-4 control-label mb16" for="user.partner_id.website_description">Biography</label>
<div class="col-md-7 mb16">
<textarea name="description" style="min-height: 120px" required="True"
<textarea name="description" style="min-height: 120px" required="True"
class="form-control"><t t-esc="user.partner_id.website_description"/></textarea>
</div>
<div class="col-sm-offset-4 col-md-4 mb16">
@ -835,7 +835,7 @@
<span t-if="user.city and user.country_id">, </span>
<span t-field="user.country_id"/>
<t t-if="user.country_id"> <span t-field="user.country_id.image" t-field-options='{"widget": "image", "class": "country_flag"}'/></t>
</td>
</tr>
<tr>
@ -919,7 +919,7 @@
<span t-field="activity.date" t-field-options='{"format": "short"}'/>
<span t-esc="activity.subtype_id.name" class="label label-info"/>
<t t-set="post" t-value="posts[activity.res_id]"/>
<span t-if="post[1]">
<span t-if="post[1]">
<a t-attf-href="/forum/#{ slug(forum) }/question/#{ slug(post[0]) }#answer-#{ str(post[1].id) }">
<span t-esc="post[0].name"/>
</a>

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>