odoo/addons/website_membership/views/website_membership.xml

144 lines
6.7 KiB
XML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<!-- Layout add nav and footer -->
<template id="footer_custom" inherit_id="website.footer_default" name="Footer Associations Link">
<xpath expr="//div[@id='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-3 mb32" 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 }#{current_country and '/country/%s' % slug(current_country) or ''}#{ search }"><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="" 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" t-value="partners[membership_line_id.partner.id]"/>
<div class="media">
<a class="pull-left" t-attf-href="/members/#{slug(partner)}"
t-field="partner.image_small"
t-field-options='{"widget": "image", "class": "media-object"}'
></a>
<div class="media-body" style="min-height: 64px;">
<a class="media-heading" t-attf-href="/members/#{slug(partner)}">
<span t-field="partner.display_name"/>
</a>
<div t-field="partner.website_short_description"/>
</div>
</div>
</t>
</div>
</div>
</div>
</div>
<div class="oe_structure"/>
</div>
</t>
</template>
<template id="opt_index_country" name="Location"
customize_show="True" inherit_id="website_membership.index">
<xpath expr="//div[@id='left_column']/ul[1]" position="after">
<ul class="nav nav-pills nav-stacked mt16">
<li class="nav-header"><h3>Location</h3></li>
<t t-foreach="countries" t-as="country">
<li t-if="country['country_id']" t-att-class="country['country_id'][0] == current_country_id and 'active' or ''">
<a t-attf-href="/members#{ membership and '/association/%s' % membership.id or '' }#{ country['country_id'][0] and '/country/%s' % slug(country['country_id']) or '' }#{ search }"><t t-esc="country['country_id'][1]"/>
<span class="badge pull-right"><t t-esc="country['country_id_count'] or '0'"/></span>
</a>
</li>
</t>
</ul>
</xpath>
</template>
<!-- Option: index: Left Google Map -->
<template id="opt_index_google_map" name="Left World Map"
customize_show="True" inherit_id="website_membership.index">
<xpath expr="//div[@id='left_column']/ul[last()]" position="after">
<!-- modal for large map -->
<div class="modal fade partner_map_modal" tabindex="-1" role="dialog" aria-labelledby="myLargeModalLabel" aria-hidden="true">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h4 class="modal-title">World Map</h4>
</div>
<iframe t-attf-src="/google_map/?width=898&amp;height=485&amp;partner_ids=#{ google_map_partner_ids }&amp;partner_url=/members/"
style="width:898px; height:485px; border:0; padding:0; margin:0;"></iframe>
</div>
</div>
</div>
<!-- modal end -->
<h3>World Map<button class="btn btn-link" data-toggle="modal" data-target=".partner_map_modal"><span class="fa fa-external-link" /></button></h3>
<ul class="nav">
<iframe t-attf-src="/google_map/?width=260&amp;height=240&amp;partner_ids=#{ google_map_partner_ids }&amp;partner_url=/members/"
style="width:260px; height:240px; border:0; padding:0; margin:0;"></iframe>
</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>