[IMP] Our Team Page

bzr revid: fp@openerp.com-20130929212431-e833rd9kvf40eepj
This commit is contained in:
Fabien Pinckaers 2013-09-29 23:24:31 +02:00
parent 9f5a163bcb
commit 0ab6dfd448
5 changed files with 20 additions and 21 deletions

View File

@ -316,7 +316,7 @@
</t>
<div id="wrap" class="oe_structure">
<div class="container mb32">
<div class="row">
<div class="row col-wrap" id="aboutus">
<div class="col-sm-12 text-center">
<h1>About us</h1>
<h3 class="text-muted">A passion for great products</h3>

View File

@ -9,7 +9,7 @@ class website_hr(http.Controller):
@website.route(['/page/website.aboutus'], type='http', auth="public", multilang=True)
def blog(self, **post):
hr_obj = request.registry['hr.employee']
employee_ids = hr_obj.search(request.cr, request.uid, [(1, "=", 1)],
employee_ids = hr_obj.search(request.cr, request.uid, [('website_published', '=', True)],
context=request.context)
values = {
'employee_ids': hr_obj.browse(request.cr, request.uid, employee_ids,

View File

@ -11,4 +11,4 @@ class hr(osv.osv):
}
def img(self, cr, uid, ids, field='image_small', context=None):
return "/website/image?model=%s&field=%s&id=%s" % (self._name, field, ids[0])
return "/web/binary/image?model=%s&field=%s&id=%s" % (self._name, field, ids[0])

View File

@ -0,0 +1,4 @@
.col-wrap .colsize {
height: 300px;
}

View File

@ -22,29 +22,24 @@
<template id="aboutus" inherit_id="website.aboutus">
<xpath expr="//div[@class='row']" position="inside">
<xpath expr="//div[@id='aboutus']" position="inside">
<t t-set="head">
<link rel='stylesheet' href='/website_hr/static/src/css/website_hr.css'/>
<t t-raw="head or ''"/>
</t>
<div class="col-sm-12 text-center">
<h2>Our team</h2>
<div class="clearfix"/>
<div class="col-sm-12 text-center" t-if="len(employee_ids)">
<h2>Our Team</h2>
</div>
<div t-foreach="employee_ids" t-as="employee" class="col-md-4 mt16">
<div class="img-rounded" data-publish="">
<t t-call="website.publish_management"><t t-set="object" t-value="employee"/></t>
<a class="pull-left" href="#">
<img t-att-src="employee.img('image_small')"/>
</a>
<div style="min-height: 64px; min-width: 130px;">
<h5 t-field="employee.name"/>
<div t-field="employee.department_id"/>
<div t-field="employee.job_id"/>
<div t-field="employee.work_location"/>
<div t-field="employee.work_phone"/>
<div t-field="employee.work_email"/>
<div t-field="employee.public_info"> </field>
</div>
<div t-foreach="employee_ids" t-as="employee" class="col-sm-3 col-lg-2 mt16 text-center colsize">
<t t-call="website.publish_management"><t t-set="object" t-value="employee"/></t>
<div class="clearfix"/>
<img t-att-src="employee.img('image_medium')" class="img shadow img-rounded"/>
<div class="mt8">
<strong t-field="employee.name"></strong>
</div>
<div t-field="employee.job_id"/>
<div t-field="employee.public_info" class="text-muted mt16"/>
</div>
</xpath>
</template>