<commit_before><?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>

<!-- Layout add nav and footer -->
<template id="footer_custom" inherit_id="website.layout" name="Footer Associations Link">
    <xpath expr="//footer//div[@name='info']/ul" position="inside">
        <li><a href="/members/">Members</a></li>
    </xpath>
</template>

<template id="index" name="Members">
    <t t-call="website.layout">
        <t t-set="additional_title">Members</t>
        <div id="wrap">
            <div class="oe_structure">
                <section data-snippet-id="title">
                    <div class="container">
                        <div class="row">
                            <div class="col-md-12">
                                <h1 class="text-center">Our Members Directory</h1>
                                <h3 class="text-muted text-center">Find a business partner</h3>
                            </div>
                        </div>
                    </div>
                </section>
            </div>
            <div class="container">
                <div class="row">

            <div class="col-md-4" id="left_column">
                <ul class="nav nav-pills nav-stacked mt16">
                    <li class="nav-header"><h3>Associations</h3></li>
                    <li t-att-class="'' if membership else 'active'"><a href="/members/">All</a></li>
                    <t t-foreach="memberships" t-as="membership_id">
                        <li t-att-class="membership and membership_id.id == membership.id and 'active' or ''">
                            <a t-attf-href="/members/association/#{ membership_id.id }"><t t-esc="membership_id.name"/></a>
                        </li>
                    </t>
                </ul>
            </div>
            <div class="col-md-8" id="ref_content">
                <div class='navbar'>
                    <t t-call="website.pager">
                       <t t-set="classname">pull-left</t>
                    </t>
                    <form action="/members/" method="get" class="navbar-search pull-right pagination form-inline">
                        <div class="form-group">
                            <input type="text" name="name" class="search-query col-md-2 mt4 form-control" placeholder="Search" t-att-value="post.get('name', '')"/>
                        </div>
                    </form>
                </div>
                <div>
                    <t t-if="not membership_lines">
                        <p>No result found.</p>
                    </t>
                    <t t-foreach="membership_lines" t-as="membership_line_id">
                        <t t-if="current_membership_id != membership_line_id.membership_id.id">
                            <t t-set="current_membership_id" t-value="membership_line_id.membership_id.id"/>
                            <h3 class="text-center"><span t-field="membership_line_id.membership_id"/></h3>
                        </t>
                        <t t-set="partner_data" t-value="partners_data[membership_line_id.partner.id]"/>
                        <div class="media">
                            <a class="pull-left" t-attf-href="/members/#{ slug([partner_data.get('id'), partner_data.get('name')]) }/">
                                <img class="media-object" t-attf-src="data:image/png;base64,#{partner_data.get('image_small')}"/>
                            </a>
                            <div class="media-body" style="min-height: 64px;">
                                <a class="media-heading" t-attf-href="/members/#{ slug([partner_data.get('id'), partner_data.get('name')]) }/"><t t-if="partner_data.get('parent_id')"><span t-esc="partner_data.get('parent_id')[1]"/></t> <span t-esc="partner_data.get('name')"/></a>
                                <div t-raw="partner_data.get('website_short_description')"/>
                            </div>
                        </div>
                    </t>
                </div>
            </div>

                </div>
            </div>
            <div class="oe_structure"/>
        </div>
    </t>
</template>

<template id="opt_index_country" name="Location"
        inherit_option_id="website_membership.index" inherit_id="website_membership.index">
    <xpath expr="//div[@id='left_column']/ul[last()]" position="after">
        <ul class="nav nav-pills nav-stacked mt16">
            <li class="nav-header"><h3>Location</h3></li>
            <t t-foreach="countries">
                <li t-if="country_id" t-att-class="post.get('country_id', '0') == str(country_id and country_id[0]) and 'active' or ''">
                    <a t-attf-href="/members/#{ membership and 'association/%s/' % membership.id or '' }#{ country_id[0] and 'country/%s/' % slug(country_id) or '' }#{ search }"><t t-esc="country_id[1]"/>
                        <span class="badge pull-right"><t t-esc="country_id_count"/></span>
                    </a>
                </li>
            </t>
        </ul>
    </xpath>
</template>

<!-- Option: index: Left Google Map -->
<template id="opt_index_google_map" name="Left World Map"
        inherit_option_id="website_membership.index" inherit_id="website_membership.index">
    <xpath expr="//div[@id='left_column']/ul[1]" position="before">
        <ul class="nav nav-pills nav-stacked mt16">
            <li class="nav-header"><h3>World Map</h3></li>
            <ul class="nav">
                <iframe t-attf-src="/google_map/?width=320&amp;height=240&amp;partner_ids=#{ google_map_partner_ids }&amp;partner_url=/members/"
                    style="width:320px; height:260px; border:0; padding:0; margin:0;"></iframe>
            </ul>
        </ul>
    </xpath>
</template>

<template id="partner" name="Members">
    <t t-call="website.layout">
        <div id="wrap">
            <div class="oe_structure"/>
            <div class="container">
                <div class="row">
                    <t t-call="website_partner.partner_detail"/>
                </div>
            </div>
            <div class="oe_structure"/>
        </div>
    </t>
</template>

</data>
</openerp>
<commit_msg>[FIX] website_membership: do not display '0' in country list head if there is no result<commit_after><?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>

<!-- Layout add nav and footer -->
<template id="footer_custom" inherit_id="website.layout" name="Footer Associations Link">
    <xpath expr="//footer//div[@name='info']/ul" position="inside">
        <li><a href="/members/">Members</a></li>
    </xpath>
</template>

<template id="index" name="Members">
    <t t-call="website.layout">
        <t t-set="additional_title">Members</t>
        <div id="wrap">
            <div class="oe_structure">
                <section data-snippet-id="title">
                    <div class="container">
                        <div class="row">
                            <div class="col-md-12">
                                <h1 class="text-center">Our Members Directory</h1>
                                <h3 class="text-muted text-center">Find a business partner</h3>
                            </div>
                        </div>
                    </div>
                </section>
            </div>
            <div class="container">
                <div class="row">

            <div class="col-md-4" id="left_column">
                <ul class="nav nav-pills nav-stacked mt16">
                    <li class="nav-header"><h3>Associations</h3></li>
                    <li t-att-class="'' if membership else 'active'"><a href="/members/">All</a></li>
                    <t t-foreach="memberships" t-as="membership_id">
                        <li t-att-class="membership and membership_id.id == membership.id and 'active' or ''">
                            <a t-attf-href="/members/association/#{ membership_id.id }"><t t-esc="membership_id.name"/></a>
                        </li>
                    </t>
                </ul>
            </div>
            <div class="col-md-8" id="ref_content">
                <div class='navbar'>
                    <t t-call="website.pager">
                       <t t-set="classname">pull-left</t>
                    </t>
                    <form action="/members/" method="get" class="navbar-search pull-right pagination form-inline">
                        <div class="form-group">
                            <input type="text" name="name" class="search-query col-md-2 mt4 form-control" placeholder="Search" t-att-value="post.get('name', '')"/>
                        </div>
                    </form>
                </div>
                <div>
                    <t t-if="not membership_lines">
                        <p>No result found.</p>
                    </t>
                    <t t-foreach="membership_lines" t-as="membership_line_id">
                        <t t-if="current_membership_id != membership_line_id.membership_id.id">
                            <t t-set="current_membership_id" t-value="membership_line_id.membership_id.id"/>
                            <h3 class="text-center"><span t-field="membership_line_id.membership_id"/></h3>
                        </t>
                        <t t-set="partner_data" t-value="partners_data[membership_line_id.partner.id]"/>
                        <div class="media">
                            <a class="pull-left" t-attf-href="/members/#{ slug([partner_data.get('id'), partner_data.get('name')]) }/">
                                <img class="media-object" t-attf-src="data:image/png;base64,#{partner_data.get('image_small')}"/>
                            </a>
                            <div class="media-body" style="min-height: 64px;">
                                <a class="media-heading" t-attf-href="/members/#{ slug([partner_data.get('id'), partner_data.get('name')]) }/"><t t-if="partner_data.get('parent_id')"><span t-esc="partner_data.get('parent_id')[1]"/></t> <span t-esc="partner_data.get('name')"/></a>
                                <div t-raw="partner_data.get('website_short_description')"/>
                            </div>
                        </div>
                    </t>
                </div>
            </div>

                </div>
            </div>
            <div class="oe_structure"/>
        </div>
    </t>
</template>

<template id="opt_index_country" name="Location"
        inherit_option_id="website_membership.index" inherit_id="website_membership.index">
    <xpath expr="//div[@id='left_column']/ul[last()]" position="after">
        <ul class="nav nav-pills nav-stacked mt16">
            <li class="nav-header"><h3>Location</h3></li>
            <t t-foreach="countries">
                <li t-if="country_id" t-att-class="post.get('country_id', '0') == str(country_id and country_id[0]) and 'active' or ''">
                    <a t-attf-href="/members/#{ membership and 'association/%s/' % membership.id or '' }#{ country_id[0] and 'country/%s/' % slug(country_id) or '' }#{ search }"><t t-esc="country_id[1]"/>
                        <span class="badge pull-right"><t t-esc="country_id_count or ''"/></span>
                    </a>
                </li>
            </t>
        </ul>
    </xpath>
</template>

<!-- Option: index: Left Google Map -->
<template id="opt_index_google_map" name="Left World Map"
        inherit_option_id="website_membership.index" inherit_id="website_membership.index">
    <xpath expr="//div[@id='left_column']/ul[1]" position="before">
        <ul class="nav nav-pills nav-stacked mt16">
            <li class="nav-header"><h3>World Map</h3></li>
            <ul class="nav">
                <iframe t-attf-src="/google_map/?width=320&amp;height=240&amp;partner_ids=#{ google_map_partner_ids }&amp;partner_url=/members/"
                    style="width:320px; height:260px; border:0; padding:0; margin:0;"></iframe>
            </ul>
        </ul>
    </xpath>
</template>

<template id="partner" name="Members">
    <t t-call="website.layout">
        <div id="wrap">
            <div class="oe_structure"/>
            <div class="container">
                <div class="row">
                    <t t-call="website_partner.partner_detail"/>
                </div>
            </div>
            <div class="oe_structure"/>
        </div>
    </t>
</template>

</data>
</openerp>

{'fraction_non_alphanumeric': 0.1699256625727214, 'fraction_numerical': 0.008484162895927601, 'mean_word_length': 1.6657333620503985, 'pattern_counts': {'":': 0, '<': 303, '<?xml version=': 2, '>': 303, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1082494', 'n_tokens_mistral': 3807, 'n_tokens_neox': 3613, 'n_words': 628}