[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"> <template id="index" name="Events">
<t t-call="website.layout"> <t t-call="website.layout">
<t t-set="head"> <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-raw="head or ''"/>
</t> </t>
<t t-set="title">Events</t> <t t-set="title">Events</t>

View File

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

View File

@ -22,7 +22,9 @@
<a href="/shop/mycart/"> <a href="/shop/mycart/">
<i class="icon-shopping-cart"></i> <i class="icon-shopping-cart"></i>
My cart 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> </a>
</li> </li>
</xpath> </xpath>