[IMP] integrate login into the website.layout
bzr revid: fme@openerp.com-20140116181746-e2z9m4gym5kcdgmr
This commit is contained in:
parent
96c79572f8
commit
735c2b501b
|
@ -20,7 +20,7 @@ import openerp
|
|||
from openerp.osv import fields
|
||||
from openerp.addons.website.models import website
|
||||
from openerp.addons.web import http
|
||||
from openerp.addons.web.http import request
|
||||
from openerp.addons.web.http import request, LazyResponse
|
||||
|
||||
from ..utils import slugify
|
||||
|
||||
|
@ -41,6 +41,14 @@ class Website(openerp.addons.web.controllers.main.Home):
|
|||
pass
|
||||
return self.page("website.homepage")
|
||||
|
||||
@website.route('/web/login', type='http', auth="public", multilang=True)
|
||||
def web_login(self, *args, **kw):
|
||||
response = super(Website, self).web_login(*args, **kw)
|
||||
if isinstance(response, LazyResponse):
|
||||
values = dict(response.params['values'], disable_footer=True, redirect="/")
|
||||
response = request.website.render(response.params['template'], values)
|
||||
return response
|
||||
|
||||
@website.route('/pagenew/<path:path>', type='http', auth="user")
|
||||
def pagenew(self, path, noredirect=NOPE):
|
||||
web = request.registry['website']
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
@charset "utf-8";
|
||||
/* THIS CSS FILE IS FOR WEBSITE THEMING CUSTOMIZATION ONLY
|
||||
*
|
||||
* css for editor buttons, openerp widget included in the website and other
|
||||
|
@ -479,3 +478,8 @@ span[data-oe-type="monetary"] {
|
|||
-o-column-count: 3;
|
||||
column-count: 3;
|
||||
}
|
||||
|
||||
.oe_website_login_container {
|
||||
width: 400px;
|
||||
margin: 40px auto;
|
||||
}
|
||||
|
|
|
@ -378,3 +378,6 @@ span[data-oe-type="monetary"]
|
|||
.oe_template_fallback
|
||||
@include column-count(3)
|
||||
|
||||
.oe_website_login_container
|
||||
width: 400px
|
||||
margin: 40px auto
|
||||
|
|
|
@ -262,7 +262,7 @@
|
|||
dom_ready.then(function () {
|
||||
|
||||
/* ----- BOOTSTRAP STUFF ---- */
|
||||
$('.js_tooltip').bstooltip();
|
||||
// $('.js_tooltip').bstooltip();
|
||||
|
||||
/* ----- PUBLISHING STUFF ---- */
|
||||
$(document).on('click', '.js_publish_management .js_publish_btn', function () {
|
||||
|
|
|
@ -230,7 +230,13 @@
|
|||
</xpath>
|
||||
</template>
|
||||
|
||||
|
||||
<template id="login_layout" inherit_id="web.login_layout" name="Website Login Layout">
|
||||
<xpath expr="t" position="replace">
|
||||
<t t-call="website.layout">
|
||||
<div class="oe_website_login_container" t-raw="0"/>
|
||||
</t>
|
||||
</xpath>
|
||||
</template>
|
||||
|
||||
<template id="show_sign_in" inherit_option_id="website.layout" inherit_id="website.layout" name="Show Sign In">
|
||||
<xpath expr="//ul[@id='top_menu']" position="inside">
|
||||
|
|
Loading…
Reference in New Issue