[IMP] website: add name of connected user; move news menu
bzr revid: chm@openerp.com-20130923095052-bc966jpqv1zq5wl2
This commit is contained in:
parent
6788b91af4
commit
0f104a5aef
|
@ -74,8 +74,9 @@
|
|||
</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 href="/admin">Sign in</a></li>
|
||||
<li name="contactus"><a href="/page/website.contactus">Contact us</a></li>
|
||||
<li t-if="user_id.id == website.public_user.id"><a href="/admin">Sign in</a></li>
|
||||
<li t-if="user_id.id != website.public_user.id"><a href="/admin"><t t-field="user_id.name"/></a></li>
|
||||
<li t-if="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]"/>
|
||||
|
|
|
@ -91,6 +91,7 @@ class website(osv.osv):
|
|||
def render(self, cr, uid, ids, template, values=None):
|
||||
view = request.registry.get("ir.ui.view")
|
||||
IMD = request.registry.get("ir.model.data")
|
||||
user = request.registry.get("res.users")
|
||||
|
||||
qweb_context = request.context.copy()
|
||||
|
||||
|
@ -103,6 +104,7 @@ class website(osv.osv):
|
|||
'json': simplejson,
|
||||
'website': request.website,
|
||||
'res_company': request.website.company_id,
|
||||
'user_id': user.browse(cr, openerp.SUPERUSER_ID, uid),
|
||||
})
|
||||
|
||||
qweb_context.update(values)
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
<!-- Layout add nav and footer -->
|
||||
|
||||
<template id="header_footer_custom" inherit_id="website.layout">
|
||||
<xpath expr="//body/header//ul[@id='top_menu']/li[last()]" position="before">
|
||||
<xpath expr="//body/header//ul[@id='top_menu']/li[@name='contactus']" position="before">
|
||||
<li><a href="/blog/%(website_mail.website_mail_blog)d/">News</a></li>
|
||||
</xpath>
|
||||
<xpath expr="//body/footer//div[@name='info']/ul" position="inside">
|
||||
|
|
Loading…
Reference in New Issue