[IMP] Use t-href in main template
bzr revid: fme@openerp.com-20130924095242-2fzuptg63h63t79y
This commit is contained in:
parent
5c3806d2f2
commit
f46550fa27
|
@ -107,7 +107,7 @@ class Website(openerp.addons.web.controllers.main.Home):
|
|||
|
||||
return request.website.render('website.themes', {'theme_changed': True})
|
||||
|
||||
@website.route('/page/<path:path>', type='http', auth="admin")
|
||||
@website.route('/page/<path:path>', type='http', auth="admin", multilang=True)
|
||||
def page(self, path, **kwargs):
|
||||
values = {
|
||||
'path': path,
|
||||
|
|
|
@ -80,13 +80,13 @@
|
|||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<a class="navbar-brand" href="/page/website.homepage"><em>Your</em><b>Company</b></a>
|
||||
<a class="navbar-brand" t-href="/page/website.homepage"><em>Your</em><b>Company</b></a>
|
||||
</div>
|
||||
<div class="collapse navbar-collapse navbar-top-collapse">
|
||||
<ul class="nav navbar-nav navbar-right" id="top_menu">
|
||||
<li><a href="/page/website.contactus">Contact us</a></li>
|
||||
<li><a t-href="/page/website.contactus">Contact us</a></li>
|
||||
<li><a href="/admin">Sign in</a></li>
|
||||
<li t-if="len(website.language_ids) > 1" class="dropdown">
|
||||
<li t-if="request.multilang and len(website.language_ids) > 1" class="dropdown">
|
||||
<!-- TODO: use flags for language selection -->
|
||||
<t t-set="lang_selected" t-value="[lg for lg in website.language_ids if lg.code == lang]"/>
|
||||
<a class="dropdown-toggle" data-toggle="dropdown" href="#">
|
||||
|
@ -94,7 +94,7 @@
|
|||
</a>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li t-foreach="website.language_ids" t-as="lg">
|
||||
<a href="#" role="menuitem">
|
||||
<a t-att-href="url_for('', lang=lg.code)" role="menuitem">
|
||||
<strong t-att-class="'icon-check' if lg.code == lang
|
||||
else 'icon-check-empty'"></strong>
|
||||
<t t-esc="lg.name"/>
|
||||
|
@ -114,13 +114,13 @@
|
|||
<div class="col-md-3" name="product">
|
||||
<h4>Our products & Services</h4>
|
||||
<ul class="list-unstyled" name="products">
|
||||
<li><a href="/">Home</a></li>
|
||||
<li><a t-href="/">Home</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="col-md-3" name="info">
|
||||
<h4 name="info_title">Connect with us</h4>
|
||||
<ul class="list-unstyled">
|
||||
<li><a href="/page/website.contactus">Contact us</a></li>
|
||||
<li><a t-href="/page/website.contactus">Contact us</a></li>
|
||||
</ul>
|
||||
<ul class="list-unstyled">
|
||||
<li><i class="icon-phone"></i> <span t-field="res_company.phone"></span></li>
|
||||
|
@ -135,7 +135,7 @@
|
|||
<div class="col-md-5 col-lg-offset-1" name="about_us">
|
||||
<h4>
|
||||
<span t-field="res_company.name">Your Company</span>
|
||||
<small> - <a href="/page/website.aboutus">About us</a></small>
|
||||
<small> - <a t-href="/page/website.aboutus">About us</a></small>
|
||||
</h4>
|
||||
<p>
|
||||
We are a team of passionated people whose goal is to improve everyone's
|
||||
|
@ -155,7 +155,7 @@
|
|||
<a class="label label-danger" href="https://openerp.com/apps/website">OpenERP</a>
|
||||
</div>
|
||||
<div class="pull-left text-muted">
|
||||
Copyright &copy; <span t-field="res_company.name">Company name</span> - <a href="/sitemap">Sitemap</a>
|
||||
Copyright &copy; <span t-field="res_company.name">Company name</span> - <a t-href="/sitemap">Sitemap</a>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
|
@ -171,7 +171,7 @@
|
|||
<div class="col-md-4">
|
||||
<h4 class="mt16">Subtitle</h4>
|
||||
<p>
|
||||
<a href="/">Homepage</a>
|
||||
<a t-href="/">Homepage</a>
|
||||
</p>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
|
@ -215,7 +215,7 @@
|
|||
<div class="well mt32">
|
||||
<p>This page does not exists, but you can create it as you are administrator of this site.</p>
|
||||
<a class="btn btn-primary" t-att-href="'/pagenew/'+path">Create Page</a>
|
||||
<span class="text-muted">or</span> <a href="/sitemap">Search a Page</a>
|
||||
<span class="text-muted">or</span> <a t-href="/sitemap">Search a Page</a>
|
||||
</div>
|
||||
<div class="text-center text-muted">Edit the content bellow this line to adapt the default "page not found" page.</div>
|
||||
</div>
|
||||
|
@ -230,8 +230,8 @@
|
|||
</p>
|
||||
<p>Maybe you were looking for one of these popular pages ?</p>
|
||||
<ul>
|
||||
<li><a href="/">Homepage</a></li>
|
||||
<li><a href="/">Contact Us</a></li>
|
||||
<li><a t-href="/">Homepage</a></li>
|
||||
<li><a t-href="/page/website.contactus/">Contact Us</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -264,8 +264,8 @@
|
|||
</p>
|
||||
<pre t-if="editable" t-esc="error"/>
|
||||
<ul>
|
||||
<li><a href="/">Homepage</a></li>
|
||||
<li><a href="/">Contact Us</a></li>
|
||||
<li><a t-href="/">Homepage</a></li>
|
||||
<li><a t-href="/page/website.contactus/">Contact Us</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -288,7 +288,7 @@
|
|||
<p>We'll do our best to get back to you as soon as possible.</p>
|
||||
</div>
|
||||
<div class="text-center mt64" name="mail_button">
|
||||
<a t-att-href="'mailto:'+res_company.email" class="btn btn-primary">Send us an email</a>
|
||||
<a t-attf-href="mailto:{{ res_company.email }}" class="btn btn-primary">Send us an email</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
|
|
Loading…
Reference in New Issue