diff options
| author | Cocographique <nmi@odoo.com> | 2020-07-30 15:34:59 +0000 |
|---|---|---|
| committer | Xavier-Do <xdo@odoo.com> | 2020-08-27 17:07:34 +0000 |
| commit | b4866d192e6f4fdfba15b65fa2c209b35b7eb8c0 (patch) | |
| tree | 42bd8a29d4cb3de59c6ee046d6309348081e8d01 /addons/portal/views | |
| parent | c93bd93014685dd532d2244aece6bfeec9562b7a (diff) | |
[IMP] portal, website: review sign in templates
Move it in an external view to be able to place it at a different
location depending on the header template.
Part of https://github.com/odoo/odoo/pull/56427
task-2264627
Diffstat (limited to 'addons/portal/views')
| -rw-r--r-- | addons/portal/views/portal_templates.xml | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/addons/portal/views/portal_templates.xml b/addons/portal/views/portal_templates.xml index 1cb3f1d2c40..72d8516c2be 100644 --- a/addons/portal/views/portal_templates.xml +++ b/addons/portal/views/portal_templates.xml @@ -16,6 +16,10 @@ </button> <div class="collapse navbar-collapse" id="top_menu_collapse"> <ul class="nav navbar-nav ml-auto text-right" id="top_menu"> + <t t-call="portal.placeholder_user_sign_in"> + <t t-set="_item_class" t-value="'nav-item'"/> + <t t-set="_link_class" t-value="'nav-link'"/> + </t> <t t-call="portal.user_dropdown"> <t t-set="_user_name" t-value="true"/> <t t-set="_item_class" t-value="'nav-item dropdown'"/> @@ -145,13 +149,12 @@ </t> </template> - <template id="portal_show_sign_in" inherit_id="portal.frontend_layout" name="Show Sign In"> - <xpath expr="//ul[@id='top_menu']" position="inside"> - <li class="nav-item divider" groups="base.group_public"/> - <li groups="base.group_public" class="nav-item"> - <a t-attf-href="/web/login" class="nav-link"> - <b>Sign in</b> - </a> + <template id="placeholder_user_sign_in" name="User Sign In Placeholder"/> + + <template id="user_sign_in" name="User Sign In" inherit_id="portal.placeholder_user_sign_in"> + <xpath expr="." position="inside"> + <li groups="base.group_public" t-attf-class="#{_item_class}"> + <a t-attf-href="/web/login" t-attf-class="#{_link_class}">Sign in</a> </li> </xpath> </template> |
