[FIX] website_hr: add javascript tag, website_sale: t-if for display number of product

bzr revid: chm@openerp.com-20130813142743-gwmmm2ik495ospbq
This commit is contained in:
Christophe Matthieu 2013-08-13 16:27:43 +02:00
parent 99810cb885
commit ba0230fa53
4 changed files with 34 additions and 32 deletions

View File

@ -18,7 +18,7 @@
<template id="index" name="Events">
<t t-call="website.layout">
<t t-set="head">
<script type="text/javascript" src="/website_event/static/src/js/website_event.js"></script>
<script type="text/javascript" src="/website_hr/static/src/js/website_hr.js"></script>
<t t-raw="head or ''"/>
</t>
<t t-set="title">Events</t>

View File

@ -20,40 +20,40 @@
<!-- Page -->
<record id="aboutus" model="ir.ui.view">
<field name="name">aboutus</field>
<field name="type">qweb</field>
<field name="inherit_id" ref="website.aboutus"/>
<field name="arch" type="xml">
<xpath expr="//div[@class='span8']" position="inside">
<h3>Our team</h3>
<div class="thumbnails">
<div t-foreach="employee_ids" t-as="employee_id" class="span4 mt16">
<div class="media thumbnail">
<a class="pull-left" href="#">
<img class="media-object" t-att-src="'data:image/png;base64,%%s' %% employee_id.image_small"/>
</a>
<div class="media-body">
<div t-if="editable" class="pull-right">
<a href="#" t-att-data-id="employee_id.id">
<span t-att-class="'label label-success js_unpublish %%s' %% (not employee_id.website_published and 'hidden' or '')">Unpublish</span>
<span t-att-class="'label label-important js_publish %%s' %% (employee_id.website_published and 'hidden' or '')">Publish</span>
</a>
</div>
<h5 class="media-heading" t-field="employee_id.name"/>
<div t-field="employee_id.department_id"/>
<div t-field="employee_id.job_id"/>
<div t-field="employee_id.work_location"/>
<div t-field="employee_id.work_phone"/>
<div t-field="employee_id.work_email"/>
<div t-field="employee_id.public_info"/>
<template id="aboutus" inherit_id="website.aboutus">
<xpath expr="//div[@class='span8']" position="inside">
<t t-set="head">
<script type="text/javascript" src="/website_hr/static/src/js/website_hr.js"></script>
<t t-raw="head or ''"/>
</t>
<h3>Our team</h3>
<div class="thumbnails">
<div t-foreach="employee_ids" t-as="employee_id" class="span4 mt16">
<div class="media thumbnail">
<a class="pull-left" href="#">
<img class="media-object" t-att-src="'data:image/png;base64,%%s' %% employee_id.image_small"/>
</a>
<div class="media-body">
<div t-if="editable" class="pull-right">
<a href="#" t-att-data-id="employee_id.id">
<span t-att-class="'label label-success js_unpublish %%s' %% (not employee_id.website_published and 'hidden' or '')">Unpublish</span>
<span t-att-class="'label label-important js_publish %%s' %% (employee_id.website_published and 'hidden' or '')">Publish</span>
</a>
</div>
<h5 class="media-heading" t-field="employee_id.name"/>
<div t-field="employee_id.department_id"/>
<div t-field="employee_id.job_id"/>
<div t-field="employee_id.work_location"/>
<div t-field="employee_id.work_phone"/>
<div t-field="employee_id.work_email"/>
<div t-field="employee_id.public_info"/>
</div>
</div>
</div>
</xpath>
</field>
</record>
</div>
</xpath>
</template>
</data>
</openerp>

View File

@ -22,7 +22,9 @@
<a href="/shop/mycart/">
<i class="icon-shopping-cart"></i>
My cart
<span class="badge badge-success" t-if="order.get_total_quantity()" t-esc="order.get_total_quantity()"/>
<t t-if="order.get_total_quantity()">
<span class="badge badge-success" t-esc="order.get_total_quantity()"/>
</t>
</a>
</li>
</xpath>