[IMP] Make homepage_editor_welcome_message compatible with Multi Website.

Domain information is added in welcome message for HomePage of Each Website.
This commit is contained in:
Siddharth Bhalgami 2018-02-15 18:23:08 +05:30
parent 117821f704
commit 8aa4ce5f6f
3 changed files with 6 additions and 2 deletions

View File

@ -41,7 +41,7 @@
<t name="Home" priority="29" t-name="website.homepage">
<t t-call="website.layout">
<t t-set="pageName" t-value="'homepage'"/>
<div id="wrap" class="oe_structure oe_empty"/>
<div id="wrap" t-att-data-website-domain="website.domain" class="oe_structure oe_empty"/>
</t>
</t>
</field>

View File

@ -45,7 +45,7 @@ var EditPageMenu = websiteNavbarData.WebsiteNavbarActionWidget.extend({
}
// If readonly empty page, show the welcome message
this.$welcomeMessage = $(core.qweb.render('website.homepage_editor_welcome_message'));
this.$welcomeMessage = $(core.qweb.render('website.homepage_editor_welcome_message', {'website_domain': $('#wrapwrap.homepage #wrap').attr('data-website-domain')}));
this.$welcomeMessage.css('min-height', $wrap.parent('main').height() - ($wrap.outerHeight(true) - $wrap.height()));
$wrap.empty().append(this.$welcomeMessage);

View File

@ -2,6 +2,10 @@
<templates id="template" xml:space="preserve">
<div t-name="website.homepage_editor_welcome_message" class="container text-center o_homepage_editor_welcome_message">
<h2 class="mt0">Welcome to your <b>Homepage</b>!</h2>
<t t-if="website_domain">
<h4>of</h4>
<h3 class="mt0"><u><t t-esc="website_domain"/></u></h3>
</t>
<p class="lead hidden-xs">Let's start designing.</p>
<div class="o_tooltip_container hidden-xs">Follow all the <div class="o_tooltip bottom"/> signs to get your website ready in no time.</div>
</div>