odoo/addons/website_customer/views/website_customer.xml

148 lines
6.9 KiB
XML

<?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/">Our References</a></li>
</xpath>
</template>
<template id="index" name="Our References">
<t t-call="website.layout">
<div id="wrap">
<div class="oe_structure">
<section data-snippet-id="title">
<h1 class="text-center">
Our References
</h1><h2 class="text-center text-muted">
Trusted by millions worldwide
</h2>
</section>
</div>
<div class="container">
<div class="row">
<div class="col-md-4" id="ref_left_column">
<ul class="nav nav-pills nav-stacked 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 ''">
<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 mb0'>
<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 class="row">
<t t-foreach="partner_ids" t-as="partner" class="media">
<div class="col-md-2">
<a t-href="/customers/#{ partner.id }/">
<img class="img img-thumbnail" t-att-src="partner.img('image_medium')"/>
</a>
</div><div class="col-md-10">
<h4>
<a t-href="/customers/#{ partner.id }/" t-field="partner.name"/>
</h4>
<div t-field="partner.website_short_description"/>
</div>
<div class="clearfix mb8"/>
</t>
</div>
</div>
</div>
</div>
<div class="oe_structure"/>
</div>
</t>
</template>
<!-- Option: left column: World Map -->
<template id="opt_country" inherit_id="website_customer.index" inherit_option_id="website_customer.index" name="Show Map">
<xpath expr="//div[@id='ref_left_column']//ul[last()]" position="after">
<iframe t-attf-src="/google_map/?partner_ids=#{ google_map_partner_ids }&amp;partner_url=/customers/&amp;output=embed"
style="width:100%; border:0; padding:0; margin:0;"></iframe>
</xpath>
</template>
<template id="details" name="Customer Detail">
<t t-call="website.layout">
<t t-set="additional_title">Customer Reference: <t t-esc="partner_id.name"/></t>
<div id="wrap">
<div class="container mt16">
<div class="row">
<div class="col-md-5">
<ol class="breadcrumb">
<li><a href="/customers">Our References</a></li>
<li class="active" t-field="partner_id.name"/>
</ol>
</div>
<div class="col-md-7">
<t t-call="website.publish_management"><t t-set="object" t-value="partner_id"/></t>
</div>
</div>
<div class="oe_structure"/>
<div class="row">
<div class="col-md-12">
<h1 class="text-center" t-field="partner_id.name"/>
</div>
<div class="col-md-9">
<div t-field="partner_id.website_description"/>
</div>
<div class="col-md-3" id="ref_right_column">
</div>
</div>
</div>
<div class="oe_structure"/>
</div>
</t>
</template>
<template id="customer_contact" inherit_id="website_customer.details" inherit_option_id="website_customer.details" name="Customer Reference">
<xpath expr="//div[@id='ref_right_column']" position="inside">
<div class="panel panel-default">
<div class="panel-heading">
<h4>Customer Reference</h4>
</div>
<div class="panel-body">
<div class="text-center">
<img t-att-src="partner_id.img('image')" class="img img-shadow"/>
</div>
<address class="mt16 mb8">
<strong t-field="partner_id.name"/>
<p t-field="partner_id.commercial_partner_id"/>
<div t-if="partner_id.phone">
<span class="icon-phone"/> <span t-field="partner_id.phone"/>
</div>
<div t-if="partner_id.email">
<span class="icon-envelope"/>
<a t-att-href="'mailto:'+partner_id.email">
<span t-field="partner_id.email"/>
</a>
</div>
</address>
</div>
</div>
</xpath>
</template>
</data>
</openerp>