odoo/addons/website_customer/views/website_customer.xml

125 lines
6.4 KiB
XML
Raw Normal View History

<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<!-- Layout add nav and footer -->
<template id="footer_custom" inherit_id="website.layout" name="Footer Customer References Link">
<xpath expr="//footer//div[@name='info']/ul" position="inside">
<li><a href="/customers/">Customer References</a></li>
</xpath>
</template>
<!-- Page -->
<template id="layout" name="Customer References Layout">
<t t-call="website.layout">
<t t-set="additional_title">Customer References</t>
<div id="wrap">
<div class="oe_structure"/>
<div class="container">
<div class="row">
<t t-raw="ref_content"/>
</div>
</div>
<div class="oe_structure"/>
</div>
</t>
</template>
<template id="index" name="Customer References">
<t t-call="website_customer.layout">
<t t-set="ref_content">
<h1 class="col-md-12 text-center">
Customer References<br/>
<small>Trusted by millions worldwide</small>
</h1>
<div class="col-md-4" id="ref_left_column">
<h3>Search by Country</h3>
<ul class="nav nav-pills nav-stacked mt16">
<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 ''">
<a t-href="/customers/country/#{ country_dict['country_id'][0] }">
<t t-esc="country_dict['country_id'][1]"/> <small>(<t t-esc="country_dict['country_id_count']"/>)</small>
</a>
</li>
</t>
</t>
</ul>
</div>
<div class="col-md-8" id="ref_content">
<div class='navbar'>
<div>
<t t-call="website.pager">
<t t-set="classname" t-value="'pull-left'"/>
</t>
<form action="/customers/" method="get" class="navbar-search pull-right pagination form-inline">
<div class="form-group">
<input type="text" name="search" class="search-query form-control"
placeholder="Search" t-att-value="post.get('search', '')"/>
</div>
</form>
</div>
</div>
<div>
<div t-foreach="partner_ids" t-as="partner" class="media thumbnail" data-publish="">
<t t-call="website.publish_management"><t t-set="object" t-value="partner"/></t>
<a class="pull-left" t-href="/customers/#{ partner.id }/">
<img class="media-object" t-att-src="partner.img('image_small')"/>
</a>
<div class="media-body" style="min-height: 64px;">
<a class="media-heading" t-href="/customers/#{ partner.id }/"><span t-field="partner.parent_id"/> <span t-field="partner.name"/></a>
<div t-field="partner.website_short_description"/>
</div>
</div>
</div>
</div>
</t>
</t>
</template>
<!-- Option: left column: World Map -->
<template id="opt_country" inherit_id="website_customer.index" inherit_option_id="website_customer.index" name="Left World Map">
<xpath expr="//div[@id='ref_left_column']//ul[last()]" position="after">
<h3>World Map</h3>
<iframe t-attf-src="/google_map/?width=320&amp;height=240&amp;partner_ids=#{ google_map_partner_ids }&amp;partner_url=/customers/"
style="width:320px; height:260px; border:0; padding:0; margin:0;"></iframe>
</xpath>
</template>
<template id="details" name="Customer Detail">
<t t-call="website_customer.layout">
<t t-set="ref_content">
<t t-call="website.publish_management"><t t-set="object" t-value="partner_id"/></t>
<h1 class="col-md-12 text-center" t-field="partner_id.name"/>
<div class="col-md-4">
<div class="text-center">
<img t-att-src="partner_id.img('image_medium')"/>
</div>
<address>
<table style="margin: auto;" class="well">
<colgroup>
<col width="100"/>
<col/>
</colgroup>
<tbody>
<t t-set="address" t-value="'&lt;br/&gt;'.join(partner_id.name_get()[0][1].split('\n')[1:])"/>
<tr t-if="address or editable"><th>Address</th><td class="span2" t-raw="address"/></tr>
<tr t-if="partner_id.website or editable"><th>Website</th><td class="span2"><span t-field="partner_id.website"/></td></tr>
<tr t-if="partner_id.phone or editable"><th>Tel</th><td class="span2"><span t-field="partner_id.phone"/></td></tr>
<tr t-if="partner_id.mobile or editable"><th>Tel</th><td class="span2"><span t-field="partner_id.mobile"/></td></tr>
<tr t-if="partner_id.fax or editable"><th>Fax</th><td class="span2"><span t-field="partner_id.fax"/></td></tr>
<tr t-if="partner_id.email or editable"><th>Email</th><td class="span2"><span t-field="partner_id.email"/></td></tr>
</tbody>
</table>
</address>
</div>
<div class="col-md-8 mt32">
<div t-field="partner_id.website_description"/>
</div>
</t>
</t>
</template>
</data>
</openerp>