diff options
| author | qsm-odoo <qsm@odoo.com> | 2018-07-16 16:49:25 +0200 |
|---|---|---|
| committer | qsm-odoo <qsm@odoo.com> | 2018-07-27 12:36:54 +0200 |
| commit | 09f40036b9c14161db90c6128861369c91c8c64e (patch) | |
| tree | 08fd442d12641d11e2dc20b018d43d004ff264d7 /addons/website_customer/views | |
| parent | de214e37429213fe9f329ff3f11885fee3e271c4 (diff) | |
[REF] *: BS4, review the 'nav' and 'navbar' components
Now the nav structure is more declarative: the 'nav-item' and 'nav-link'
classes have to be put on related nav item and links. Also, the 'active'
class has to be put on links instead of items.
Same as for the navbar component:
- The navbar structure was simplified and meant to be more declarative.
- The navbar colors are also now handled by a different set of classes.
The 'nav-stacked' class was removed and replaced by flex utilities.
The set of classes for colors and nav styles also changed.
Diffstat (limited to 'addons/website_customer/views')
| -rw-r--r-- | addons/website_customer/views/website_customer_templates.xml | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/addons/website_customer/views/website_customer_templates.xml b/addons/website_customer/views/website_customer_templates.xml index da543a6ab83..58563e612f6 100644 --- a/addons/website_customer/views/website_customer_templates.xml +++ b/addons/website_customer/views/website_customer_templates.xml @@ -90,11 +90,12 @@ <template id="opt_industry_list" inherit_id="website_customer.index" customize_show="True" name="Filter on Industry" priority="20"> <xpath expr="//div[@id='ref_left_column']" position="inside"> <h3>References by Sectors of Activity</h3> - <ul class="nav nav-pills nav-stacked mt16 mb32"> + <ul class="nav nav-pills flex-column mt16 mb32"> <t t-foreach="industries" t-as="industry_dict"> <t t-if="industry_dict['industry_id']"> - <li t-att-class="industry_dict['industry_id'][0] == current_industry_id and 'active' or None"> - <a t-attf-href="/customers/#{ industry_dict['industry_id'][0] and 'industry/%s/' % slug(industry_dict['industry_id']) or '' }#{ current_country_id and 'country/%s' % current_country_id or '' }#{ search_path }"> + <li class="nav-item"> + <a t-attf-href="/customers/#{ industry_dict['industry_id'][0] and 'industry/%s/' % slug(industry_dict['industry_id']) or '' }#{ current_country_id and 'country/%s' % current_country_id or '' }#{ search_path }" + t-attf-class="nav-link#{industry_dict['industry_id'][0] == current_industry_id and ' active' or ''}"> <span class="badge pull-right" t-esc="industry_dict['industry_id_count'] or '0'"/> <t t-esc="industry_dict['industry_id'][1]"/> </a> @@ -108,11 +109,12 @@ <template id="opt_country_list" inherit_id="website_customer.index" customize_show="True" name="Filter on Countries" priority="30"> <xpath expr="//div[@id='ref_left_column']" position="inside"> <h3>References by Country</h3> - <ul class="nav nav-pills nav-stacked mt16 mb32"> + <ul class="nav nav-pills flex-column mt16 mb32"> <t t-foreach="countries" t-as="country_dict"> <t t-if="country_dict['country_id']"> - <li t-att-class="country_dict['country_id'][0] == current_country_id and 'active' or None"> - <a t-attf-href="/customers/#{ current_industry_id and 'industry/%s/' % slug(current_industry) or '' }#{ country_dict['country_id'][0] and 'country/%s' % slug(country_dict['country_id']) or '' }#{ search_path }"> + <li class="nav-item"> + <a t-attf-href="/customers/#{ current_industry_id and 'industry/%s/' % slug(current_industry) or '' }#{ country_dict['country_id'][0] and 'country/%s' % slug(country_dict['country_id']) or '' }#{ search_path }" + t-attf-class="nav-link#{country_dict['country_id'][0] == current_country_id and ' active' or ''}"> <span class="badge pull-right" t-esc="country_dict['country_id_count'] or '0'"/> <t t-esc="country_dict['country_id'][1]"/> </a> @@ -128,13 +130,13 @@ <xpath expr="//div[@id='ref_left_column']" position="inside"> <h3 t-if="len(tags)">References by Tag</h3> - <ul class="nav nav-pills nav-stacked mt16 mb32" t-if="len(tags)"> - <a class="mr8" t-attf-href="/customers/#{ current_industry_id and 'industry/%s/' % slug(current_industry) or '' }#{ current_country_id and 'country/%s' % slug(current_country) or '' }"> - <span class="fa fa-1x fa-tags"/> All </a> - <t t-foreach="tags" t-as="o_tag"> - <a t-attf-class="label label-#{o_tag.classname}" t-esc="o_tag.name" t-att-style="tag and tag.id==o_tag.id and 'text-decoration: underline'" + <ul class="nav nav-pills flex-column mt16 mb32" t-if="len(tags)"> + <li class="nav-item"><a class="nav-link mr8" t-attf-href="/customers/#{ current_industry_id and 'industry/%s/' % slug(current_industry) or '' }#{ current_country_id and 'country/%s' % slug(current_country) or '' }"> + <span class="fa fa-1x fa-tags"/> All </a></li> + <li t-foreach="tags" t-as="o_tag" class="nav-item"> + <a t-attf-class="nav-link label label-#{o_tag.classname}" t-esc="o_tag.name" t-att-style="tag and tag.id==o_tag.id and 'text-decoration: underline'" t-attf-href="/customers/#{ current_industry_id and 'industry/%s/' % slug(current_industry) or '' }#{ current_country_id and 'country/%s' % slug(current_country) or '' }?tag_id=#{slug(o_tag)}"/> - </t> + </li> </ul> </xpath> </template> |
