Christophe Matthieu 2014-02-07 12:37:21 +01:00
commit 22a27ed953
4 changed files with 54 additions and 43 deletions

View File

@ -637,11 +637,11 @@ Sitemap: <t t-esc="url_root"/>sitemap.xml
</template>
<template id="company_description" name="Company Description">
<address>
<div t-field="res_company.name">Name</div>
<address itemscope="itemscope" itemtype="http://schema.org/Organization">
<div itemprop="name" t-field="res_company.name">Name</div>
<br />
<div><i class="fa fa-phone"/> <span t-field="res_company.phone"/></div>
<div><i class="fa fa-envelope"/> <span t-field="res_company.email"/></div>
<div><i class="fa fa-phone"/> <span itemprop="telephone" t-field="res_company.phone"/></div>
<div><i class="fa fa-envelope"/> <span itemprop="email" t-field="res_company.email"/></div>
</address>
<a t-att-href="res_company.google_map_link()" target="_BLANK">
<img class="thumbnail img-responsive" t-att-src="res_company.google_map_img()" />
@ -723,18 +723,20 @@ Sitemap: <t t-esc="url_root"/>sitemap.xml
</template>
<template id="contact">
<address t-ignore="true" class="mb0">
<div t-att-class="'name' not in fields and 'css_non_editable_mode_hidden'"><span t-esc="name"/></div>
<div t-if="address and 'address' in fields" class='css_editable_mode_hidden'>
<i class='fa fa-map-marker'/> <span t-raw="address.replace('\n', options.get('no_tag_br') and ', ' or '&lt;br/&gt; &amp;nbsp; &amp;nbsp; ')"/>
<address t-ignore="true" class="mb0" itemscope="itemscope" itemtype="http://schema.org/Organization">
<div t-att-class="'name' not in fields and 'css_non_editable_mode_hidden'"><span itemprop="name" t-esc="name"/></div>
<div itemprop="address" itemscope="itemscope" itemtype="http://schema.org/PostalAddress">
<div t-if="address and 'address' in fields" class='css_editable_mode_hidden'>
<i class='fa fa-map-marker'/> <span itemprop="streetAddress" t-raw="address.replace('\n', options.get('no_tag_br') and ', ' or '&lt;br/&gt; &amp;nbsp; &amp;nbsp; ')"/>
</div>
<div t-if="city and 'city' in fields" class='css_editable_mode_hidden'>
<i class='fa fa-map-marker'/> <span itemprop="addressLocality" t-raw="city"/>, <span itemprop="addressCountry" t-raw="country_id"/>
</div>
<div t-if="phone and 'phone' in fields" class='css_editable_mode_hidden'><i class='fa fa-phone'/> <span itemprop="telephone" t-esc="phone"/></div>
<div t-if="mobile and 'mobile' in fields" class='css_editable_mode_hidden'><i class='fa fa-mobile-phone'/> <span itemprop="telephone" t-esc="mobile"/></div>
<div t-if="fax and 'fax' in fields" class='css_editable_mode_hidden'><i class='fa fa-file-text-o'/> <span itemprop="faxNumber" t-esc="fax"/></div>
<div t-if="email and 'email' in fields" class='css_editable_mode_hidden'><i class='fa fa-envelope'/> <span itemprop="email" t-esc="email"/></div>
</div>
<div t-if="city and 'city' in fields" class='css_editable_mode_hidden'>
<i class='fa fa-map-marker'/> <span t-raw="city"/>, <span t-raw="country_id"/>
</div>
<div t-if="phone and 'phone' in fields" class='css_editable_mode_hidden'><i class='fa fa-phone'/> <span t-esc="phone"/></div>
<div t-if="mobile and 'mobile' in fields" class='css_editable_mode_hidden'><i class='fa fa-mobile-phone'/> <span t-esc="mobile"/></div>
<div t-if="fax and 'fax' in fields" class='css_editable_mode_hidden'><i class='fa fa-file-text-o'/> <span t-esc="fax"/></div>
<div t-if="email and 'email' in fields" class='css_editable_mode_hidden'><i class='fa fa-envelope'/> <span t-esc="email"/></div>
</address>
</template>

View File

@ -48,9 +48,9 @@
</div>
<ul class="media-list">
<li t-foreach="event_ids" t-as="event" class="media">
<div class="media-body">
<div itemscope="itemscope" itemtype="http://schema.org/Event" class="media-body">
<h4 class="media-heading">
<a t-att-class="event.state == 'done' and 'text-success'" t-attf-href="/event/#{ slug(event) }/#{(not event.menu_id) and 'register/' or ''}"><span t-field="event.name"> </span></a>
<a itemprop="url" t-att-class="event.state == 'done' and 'text-success'" t-attf-href="/event/#{ slug(event) }/#{(not event.menu_id) and 'register/' or ''}"><span itemprop="name" t-field="event.name"> </span></a>
<small t-if="not event.website_published" class="label label-danger">not published</small>
</h4>
<div>
@ -59,9 +59,9 @@
</t>
</div>
<div>
<i class="fa fa-clock-o"></i> <span t-field="event.date_begin"> </span> <i>to</i> <span t-field="event.date_end"> </span>
<i class="fa fa-clock-o"></i> <span itemprop="startDate" t-field="event.date_begin"> </span> <i>to</i> <span itemprop="endDate" t-field="event.date_end"> </span>
</div>
<div t-field="event.address_id" t-field-options='{
<div itemprop="location" t-field="event.address_id" t-field-options='{
"widget": "contact",
"fields": ["city"]
}'/>
@ -223,11 +223,11 @@
<template id="event_details">
<t t-call="website_event.layout">
<div class="container">
<h1 class="text-center" t-field="event.name"></h1>
<div itemscope="itemscope" itemtype="http://schema.org/Event" class="container">
<h1 itemprop="name" class="text-center" t-field="event.name"></h1>
<h4 class="text-center text-muted">
<i class="fa fa-clock-o"></i> <span t-field="event.date_begin"/> to
<span t-field="event.date_end"/>
<i class="fa fa-clock-o"></i> <span itemprop="startDate" t-field="event.date_begin"/> to
<span itemprop="endDate" t-field="event.date_end"/>
</h4>
<h4 class="text-center text-muted"
t-field="event.address_id" t-field-options='{
@ -258,7 +258,7 @@
<template id="event_description_full">
<t t-call="website_event.event_details">
<div class="col-md-8">
<div t-field="event.description"></div>
<div itemprop="description" t-field="event.description"></div>
<div class="clearfix"/>
<ul class="media-list" id="comment">
<li t-foreach="event.website_message_ids" t-as="comment" class="media">
@ -288,7 +288,7 @@
<a t-att-href="event.google_map_link()" target="_BLANK">
<img t-att-src="event.google_map_img()" width="100%%"/>
</a>
<div class="mt16 mb8" t-field="event.address_id" t-field-options='{
<div itemprop="location" class="mt16 mb8" t-field="event.address_id" t-field-options='{
"widget": "contact",
"fields": ["address", "phone", "mobile", "fax", "email"]
}'/>

View File

@ -22,7 +22,7 @@
<template id="event_description_full" inherit_id="website_event.event_description_full" inherit_option_id="website_event.event_description_full" name="Event's Ticket form">
<xpath expr="//div[@t-field='event.description']" position="before">
<form t-attf-action="/event/add_cart?event_id=#{ event.id }" method="post" t-if="event.event_ticket_ids">
<table class="table table-striped">
<table itemprop="offers" class="table table-striped">
<thead>
<tr>
<th>Ticket Type</th>
@ -33,17 +33,19 @@
</tr>
</thead>
<tbody>
<tr t-foreach="event.event_ticket_ids" t-as="ticket">
<td>
<div t-field="ticket.name"/>
<div><small t-field="ticket.product_id.description_sale"/></div>
<tr itemscope="itemscope" itemtype="http://data-vocabulary.org/Offer" t-foreach="event.event_ticket_ids" t-as="ticket">
<td itemscope="itemscope" itemtype="http://data-vocabulary.org/Product">
<div itemprop="name" t-field="ticket.name"/>
<div><small itemprop="description" t-field="ticket.product_id.description_sale"/></div>
</td>
<td><span t-field="ticket.deadline"/></td>
<td><span itemprop="priceValidUntil" t-field="ticket.deadline"/></td>
<td>
<t t-if="ticket.price or editable"><span t-field="ticket.price" t-field-options='{
"widget": "monetary",
"display_currency": "website.pricelist_id.currency_id"
}'/>
<meta itemprop="price" t-att-content="ticket.price"/>
<meta itemprop="priceCurrency" t-att-content="website.pricelist_id.currency_id.name"/>
</t>
<t t-if="not ticket.price and not editable">
<span>Free</span>

View File

@ -50,17 +50,18 @@
</template>
<template id="products_cart" name="Shopping cart">
<div itemscope="itemscope" itemtype="http://schema.org/Product">
<div class="ribbon-wrapper">
<div class="ribbon btn btn-danger">Sale</div>
</div>
<div class="oe_product_image">
<a t-attf-href="/shop/product/{{ slug(product) }}/?{{ keep_query('category', 'search', 'filters') }}">
<span t-field="product.image" t-field-options='{"widget": "image"}'/>
<a itemprop="url" t-attf-href="/shop/product/{{ slug(product) }}/?{{ keep_query('category', 'search', 'filters') }}">
<span itemprop="image" t-field="product.image" t-field-options='{"widget": "image"}'/>
</a>
</div>
<section>
<h5><strong><a t-attf-href="/shop/product/{{ slug(product) }}/?{{ keep_query('category', 'search', 'filters') }}" t-field="product.name"/></strong></h5>
<div class="product_price" t-if="product.product_variant_ids">
<h5><strong><a itemprop="name" t-attf-href="/shop/product/{{ slug(product) }}/?{{ keep_query('category', 'search', 'filters') }}" t-field="product.name"/></strong></h5>
<div itemprop="offers" itemscope="itemscope" itemtype="http://schema.org/Offer" class="product_price" t-if="product.product_variant_ids">
<b>
<t t-if="abs(product.product_variant_ids[0].lst_price - product.product_variant_ids[0].price) &gt; 0.2">
<del class="text-danger"
@ -72,10 +73,14 @@
<span t-field="product.product_variant_ids[0].price" t-field-options='{
"widget": "monetary",
"display_currency": "website.pricelist_id.currency_id"
}'/>
}'>
</span>
<meta itemprop="price" t-att-content="product.product_variant_ids[0].price"/>
<meta itemprop="priceCurrency" t-att-content="website.pricelist_id.currency_id.name"/>
</b>
</div>
</section>
</div>
</template>
<template id="products" name="Products">
@ -210,7 +215,7 @@
<template id="product_description" inherit_option_id="website_sale.products_cart" name="Product Description">
<xpath expr="//div[@class='product_price']" position="before">
<div class="text-info oe_subdescription oe_shadow" t-field="product.description_sale"/>
<div class="text-info oe_subdescription" t-field="product.description_sale"/>
<div itemprop="description" class="text-info oe_subdescription" t-field="product.description_sale"/>
</xpath>
</template>
@ -261,7 +266,7 @@
<link rel='stylesheet' href='/website_sale/static/src/css/website_mail.css'/>
</t>
<t t-set="additional_title" t-value="product.name"/>
<div id="wrap" class="js_sale">
<div itemscope="itemscope" itemtype="http://schema.org/Product" id="wrap" class="js_sale">
<section class="container mt8">
<div class="row">
@ -289,10 +294,10 @@
<section class="container oe_website_sale" id="product_detail">
<div class="row">
<div class="col-sm-7 col-md-7 col-lg-7">
<span t-field="product.image" t-field-options='{"widget": "image", "class": "product_detail_img"}'/>
<span itemprop="image" t-field="product.image" t-field-options='{"widget": "image", "class": "product_detail_img"}'/>
</div><div class="col-sm-5 col-md-5 col-lg-4 col-lg-offset-1">
<h1 t-field="product.name">Product Name</h1>
<h1 itemprop="name" t-field="product.name">Product Name</h1>
<meta itemprop="url" t-attf-content="/shop/product/{{ slug(product) }}"/>
<form action="/shop/add_cart/" class="js_add_cart_json" method="POST">
<input type="hidden" t-if="len(product.product_variant_ids) == 1" name="product_id" t-att-value="product.product_variant_ids[0].id"/>
<t t-if="len(product.product_variant_ids) &gt; 1">
@ -308,7 +313,7 @@
</label>
</t>
<div class="product_price mt16" t-if="product.product_variant_ids">
<div itemprop="offers" itemscope="itemscope" itemtype="http://schema.org/Offer" class="product_price mt16" t-if="product.product_variant_ids">
<h4>
<t t-if="product.product_variant_ids[0].lst_price != product.product_variant_ids[0].price">
<span class="text-danger" style="text-decoration: line-through;"
@ -324,6 +329,8 @@
"widget": "monetary",
"display_currency": "website.pricelist_id.currency_id"
}'/>
<meta itemprop="price" t-att-content="product.product_variant_ids[0].price"/>
<meta itemprop="priceCurrency" t-att-content="website.pricelist_id.currency_id.name"/>
</h4>
</div>
<button class="btn btn-primary btn-lg mt8">Add to Cart</button>
@ -339,7 +346,7 @@
</div>
</div>
</section>
<div t-field="product.website_description" class="oe_structure mt16" id="product_full_description"/>
<div itemprop="description" t-field="product.website_description" class="oe_structure mt16" id="product_full_description"/>
</div>
</t>
</template>