[FIX] website_hr: review the "our team" section

The 'our team' section on the about us page was broken since BS4. This
was because the previous implementation in BS3 was not properly done,
this commit correctly uses the grid system and make the publish
management appear not broken.

Thanks to @kea14 for spotting the issue.
This commit is contained in:
qsm-odoo
2018-10-01 21:33:32 +02:00
parent 09d47cc65d
commit ba237a43af
2 changed files with 22 additions and 20 deletions
@@ -1,4 +0,0 @@
.o_avatar_info_container {
height: 250px;
}
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<!-- Page -->
<!-- Page -->
<template id="assets_frontend" inherit_id="website.assets_frontend" name="website_hr_assets">
<xpath expr="." position="inside">
<link rel="stylesheet" type="text/scss" href="/website_hr/static/src/scss/website_hr.scss"/>
@@ -9,25 +9,31 @@
<template id="aboutus" inherit_id="website.aboutus" customize_show="True" name="Our Team">
<xpath expr="//div[hasclass('oe_structure')]" position="after">
<section class="container" id="team">
<section class="pt32 pb32" id="team">
<t t-set="is_publisher" t-value="request.env['res.users'].has_group('website.group_website_publisher')" />
<t t-set="employees_domain" t-value="[] if is_publisher else [('website_published', '=', True)]" />
<t t-set="employees" t-value="request.env['hr.employee'].search(employees_domain)" />
<div class="col-md-12 text-center" t-if="len(employees)">
<h2>Our Team</h2>
</div>
<div t-foreach="employees" t-as="employee" class="col-md-3 col-xl-2 mt16 text-center o_avatar_info_container">
<t t-call="website.publish_management" class="text-center">
<t t-set="object" t-value="employee"/>
<t t-set="publish_edit" t-value="True"/>
</t>
<div class="clearfix"/>
<img t-att-src="website.image_url(employee, 'image_medium')" class="img shadow rounded" alt="Employee"/>
<div class="mt8">
<strong t-field="employee.name"></strong>
<div class="container" t-if="len(employees)">
<div class="row">
<div class="col-lg-12 text-center">
<h2>Our Team</h2>
</div>
</div>
<div class="row">
<div t-foreach="employees" t-as="employee" class="col-md-3 col-xl-2 mt16 text-center">
<t t-call="website.publish_management">
<t t-set="object" t-value="employee"/>
<t t-set="publish_edit" t-value="True"/>
<t t-set="style" t-value="'float: none !important; margin-bottom: 4px;'"/>
</t>
<img t-att-src="website.image_url(employee, 'image_medium')" class="img shadow rounded" alt="Employee"/>
<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 d-block mx-auto"/>
</div>
</div>
<div t-field="employee.job_id"/>
<div t-field="employee.public_info" class="text-muted mt16 d-block mx-auto"/>
</div>
</section>
</xpath>