[MERGE] forward port of branch 8.0 up to ed1c173
[odoo/odoo.git] / addons / website_customer / views / website_customer.xml
1 <?xml version="1.0" encoding="utf-8"?>
2 <openerp>
3 <data>
4
5 <!-- Layout add nav and footer -->
6 <template id="footer_custom" inherit_id="website.footer_default" name="Footer Customer References Link">
7     <xpath expr="//div[@id='info']/ul" position="inside">
8         <li><a href="/customers">Our References</a></li>
9     </xpath>
10 </template>
11
12 <template id="index" name="Our References">
13     <t t-call="website.layout">
14         <div id="wrap">
15             <div class="oe_structure">
16                 <section>
17                     <h1 class="text-center">
18                         Our References
19                     </h1><h2 class="text-center text-muted">
20                         Trusted by millions worldwide
21                     </h2>
22                 </section>
23             </div>
24             <div class="container">
25                 <div class="row">
26                     <div class="col-md-3 mb32" id="ref_left_column">
27                     </div>
28                     <div class="col-md-8 col-md-offset-1" id="ref_content">
29                         <div class='navbar mb0'>
30                             <t t-call="website.pager">
31                                <t t-set="classname" t-value="'pull-left'"/>
32                             </t>
33                             <form action="" method="get" class="navbar-search pull-right pagination form-inline">
34                                 <div class="form-group">
35                                     <input type="text" name="search" class="search-query form-control"
36                                         placeholder="Search" t-att-value="post.get('search', '')"/>
37                                 </div>
38                             </form>
39                         </div>
40
41                         <div class="row">
42
43                     <p t-if="not partners">No result found</p>
44                     <t t-foreach="partners" t-as="partner">
45                         <div class="media">
46                             <a class="pull-left" t-attf-href="/customers/#{slug(partner)}"
47                                t-field="partner.image_small"
48                                t-field-options='{"widget": "image", "class": "media-object"}'
49                             ></a>
50                             <div class="media-body" style="min-height: 64px;">
51                                 <a class="media-heading" t-attf-href="/customers/#{slug(partner)}">
52                                     <span t-field="partner.display_name"/>
53                                 </a>
54                                 <div t-field="partner.website_short_description"/>
55                             </div>
56                         </div>
57                     </t>
58                         </div>
59                     </div>
60
61                 </div>
62             </div>
63             <div class="oe_structure"/>
64         </div>
65     </t>
66 </template>
67
68 <!-- Option: left column: World Map -->
69 <template id="opt_country" inherit_id="website_customer.index" customize_show="True" name="Show Map">
70     <xpath expr="//div[@id='ref_left_column']" position="inside">
71         <!-- modal for large map -->
72         <div class="modal fade customer_map_modal" tabindex="-1" role="dialog" aria-labelledby="myLargeModalLabel" aria-hidden="true">
73           <div class="modal-dialog modal-lg">
74             <div class="modal-content">
75                 <div class="modal-header">
76                     <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
77                     <h4 class="modal-title">World Map</h4>
78                 </div>
79                 <iframe t-attf-src="/google_map/?width=898&amp;height=485&amp;partner_ids=#{ google_map_partner_ids }&amp;partner_url=/customers/"
80                 style="width:898px; height:485px; border:0; padding:0; margin:0;"></iframe>
81             </div>
82           </div>
83         </div>
84         <!-- modal end -->
85         <h3>World Map<button class="btn btn-link" data-toggle="modal" data-target=".customer_map_modal"><span class="fa fa-external-link" /></button></h3>
86         <ul class="nav">
87             <iframe t-attf-src="/google_map?width=260&amp;height=240&amp;partner_ids=#{ google_map_partner_ids }&amp;partner_url=/customers/"
88                 style="width:260px; height:240px; border:0; padding:0; margin:0;" scrolling="no"></iframe>
89         </ul>
90     </xpath>
91 </template>
92
93 <template id="opt_country_list" inherit_id="website_customer.index" customize_show="True" name="Filter on Countries">
94     <xpath expr="//div[@id='ref_left_column']" position="inside">
95         <h3>References by Country</h3>
96         <ul class="nav nav-pills nav-stacked mt16 mb32">
97             <t t-foreach="countries" t-as="country_dict">
98                 <t t-if="country_dict['country_id']">
99                     <li t-att-class="country_dict['country_id'][0] == current_country_id and 'active' or ''">
100                         <a t-attf-href="/customers/#{ country_dict['country_id'][0] and 'country/%s' % slug(country_dict['country_id']) or '' }#{ search_path }">
101                             <span class="badge pull-right" t-esc="country_dict['country_id_count'] or '0'"/>
102                             <t t-esc="country_dict['country_id'][1]"/>
103                         </a>
104                     </li>
105                 </t>
106             </t>
107         </ul>
108
109     </xpath>
110 </template>
111
112 <template id="details" name="Customer Detail">
113   <t t-call="website.layout">
114     <div id="wrap">
115         <div class="oe_structure"/>
116         <div class="container mt16">
117             <div class="row">
118                 <div class="col-md-5">
119                     <ol class="breadcrumb">
120                         <li><a href="/customers">Our References</a></li>
121                         <li class="active"><span t-field="partner.display_name"/></li>
122                     </ol>
123                 </div>
124                 <t t-call="website_partner.partner_detail">
125                     <t t-set="left_column">
126                         <div id="left_column"><t t-call="website_customer.implemented_by_block"/></div>
127                     </t>
128                     <t t-set="right_column">
129                         <div id="right_column"><t t-call="website_customer.references_block"/></div>
130                     </t>
131                 </t>
132             </div>
133         </div>
134         <div class="oe_structure"/>
135     </div>
136   </t>
137 </template>
138
139 <template id="partner_details" inherit_id="website_partner.partner_page" name="Partner Detail Columns">
140  <xpath expr="//t[@t-call='website_partner.partner_detail']" position="inside">
141     <t t-set="left_column"><div id="left_column"><t t-call="website_customer.implemented_by_block"/></div></t>
142     <t t-set="right_column"><div id="right_column"><t t-call="website_customer.references_block"/></div></t>
143  </xpath>
144 </template>
145
146 <template id="implemented_by_block" name="Partner Implemented By Block">
147         <t t-if="partner.assigned_partner_id and partner.assigned_partner_id.website_published">
148             <div class="panel panel-default">
149                 <div class="panel-heading">
150                     <h4>Implemented By</h4>
151                 </div>
152                 <div class="panel-body text-center">
153         <h4>
154             <a t-attf-href="/partners/#{slug(partner.assigned_partner_id)}">
155               <span t-field="partner.assigned_partner_id"/>
156               <span class="small"> (<t t-esc="len([p for p in partner.assigned_partner_id.implemented_partner_ids if p.website_published])"/> reference(s))</span>
157             </a>
158         </h4>
159         <div><a t-attf-href="/partners/#{slug(partner.assigned_partner_id)}"
160                 t-field="partner.assigned_partner_id.image_medium"
161                 t-field-options='{"widget": "image", "class": "center-block"}'
162              />
163         </div>
164         <address class="well text-left">
165              <div t-field="partner.assigned_partner_id" t-field-options='{
166                  "widget": "contact",
167                  "fields": ["address", "website", "phone", "fax", "email"]
168              }'/>
169         </address>
170                 </div>
171             </div>
172         </t>
173 </template>
174
175 <template id="references_block" name="Partner References Block">
176         <t t-if="any([p.website_published for p in partner.implemented_partner_ids])">
177             <h3 id="references">References</h3>
178             <div t-foreach="partner.implemented_partner_ids" t-as="reference" class="media">
179               <t t-if="reference.website_published">
180                 <a class="pull-left" t-attf-href="/customers/#{slug(reference)}">
181                     <span t-field="reference.image_small" t-field-options='{"widget": "image", "class": "center-block"}'/>
182                 </a>
183                 <div class="media-body" style="min-height: 64px;">
184                     <a class="media-heading" t-attf-href="/customers/#{slug(reference)}">
185                         <span t-field="reference.self"/>
186                     </a>
187                     <div t-field='reference.website_short_description'/>
188                 </div>
189               </t>
190             </div>
191         </t>
192 </template>
193
194 </data>
195 </openerp>