[IMP] website_hr: create page/aboutus and add Trombinoscope Teams
bzr revid: chm@openerp.com-20130808072115-9clevg0tqzir7kjc
This commit is contained in:
parent
eff6013900
commit
ab61a67021
|
@ -40,7 +40,7 @@
|
|||
<ul class='unstyled'>
|
||||
<li><a href="/page/website.contactus">Contact us</a></li>
|
||||
<li><a href="/page/website.news">News</a></li>
|
||||
<li><a href="/page/website.contactus">About us</a></li>
|
||||
<li><a href="/page/website.aboutus">About us</a></li>
|
||||
<li><a href='#'>&#x2706; <span t-field="res_company.phone"/></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
@ -377,5 +377,26 @@
|
|||
</t>
|
||||
</template>
|
||||
|
||||
<template id="aboutus">
|
||||
<t t-call="website.layout">
|
||||
<t t-set="title">About us - <t t-esc="res_company.name"/></t>
|
||||
<div class="container">
|
||||
<h2>About us</h2>
|
||||
<div class="row">
|
||||
<div class="span4">
|
||||
<h3>Our vision</h3>
|
||||
<p>
|
||||
Contact us about anything related to our company or services.
|
||||
</p><p>
|
||||
We'll do our best to get back to you as soon as possible.
|
||||
</p>
|
||||
</div>
|
||||
<div class="span8">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</t>
|
||||
</template>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
|
|
|
@ -5,7 +5,7 @@ from openerp.addons.web.http import request
|
|||
|
||||
class website_hr(http.Controller):
|
||||
|
||||
@http.route(['/hr'], type='http', auth="public")
|
||||
@http.route(['/page/website.aboutus'], type='http', auth="public")
|
||||
def blog(self, **post):
|
||||
website = request.registry['website']
|
||||
hr_obj = request.registry['hr.employee']
|
||||
|
@ -13,9 +13,9 @@ class website_hr(http.Controller):
|
|||
values = website.get_rendering_context({
|
||||
'employee_ids': hr_obj.browse(request.cr, request.uid, employee_ids)
|
||||
})
|
||||
return website.render("website_hr.index", values)
|
||||
return website.render("website.aboutus", values)
|
||||
|
||||
@http.route(['/hr/publish'], type='http', auth="public")
|
||||
@http.route(['/page/website.aboutus/publish'], type='http', auth="public")
|
||||
def publish(self, **post):
|
||||
obj_id = int(post['id'])
|
||||
data_obj = request.registry['hr.employee']
|
||||
|
@ -24,15 +24,4 @@ class website_hr(http.Controller):
|
|||
data_obj.write(request.cr, request.uid, [obj_id], {'website_published': not obj.website_published})
|
||||
obj = data_obj.browse(request.cr, request.uid, obj_id)
|
||||
|
||||
return obj.website_published and "1" or "0"
|
||||
|
||||
@http.route(['/hr/publish_contact'], type='http', auth="public")
|
||||
def publish_contact(self, **post):
|
||||
obj_id = int(post['id'])
|
||||
data_obj = request.registry['hr.employee']
|
||||
|
||||
obj = data_obj.browse(request.cr, request.uid, obj_id)
|
||||
data_obj.write(request.cr, request.uid, [obj_id], {'website_published_on_contact_form': not obj.website_published_on_contact_form})
|
||||
obj = data_obj.browse(request.cr, request.uid, obj_id)
|
||||
|
||||
return obj.website_published_on_contact_form and "1" or "0"
|
||||
return obj.website_published and "1" or "0"
|
|
@ -5,7 +5,7 @@ $(document).ready(function () {
|
|||
$link.find('.js_publish, .js_unpublish').addClass("hidden");
|
||||
var $unp = $link.find(".js_unpublish");
|
||||
var $p = $link.find(".js_publish");
|
||||
$.post('/hr/publish', {'id': $link.data('id')}, function (result) {
|
||||
$.post('/page/website.aboutus/publish', {'id': $link.data('id')}, function (result) {
|
||||
if (+result) {
|
||||
$p.addClass("hidden");
|
||||
$unp.removeClass("hidden");
|
||||
|
|
|
@ -17,8 +17,7 @@
|
|||
<field name="inherit_id" ref="website.footer"/>
|
||||
<field name="arch" type="xml">
|
||||
<data>
|
||||
<xpath expr="//a[@href='/page/website.contactus']" position="after">
|
||||
<li><a href="/hr">Team</a></li>
|
||||
<xpath expr="//a[@href='/page/website.aboutus']" position="after">
|
||||
<li><a href="/blog/%(website_hr.website_mail_job)d/">Jobs</a></li>
|
||||
</xpath>
|
||||
</data>
|
||||
|
@ -27,14 +26,13 @@
|
|||
|
||||
<!-- Page -->
|
||||
|
||||
<template id="index">
|
||||
<t t-call="website.layout">
|
||||
<t t-set="head">
|
||||
<script type="text/javascript" src="/website_hr/static/src/js/hr.js"></script>
|
||||
<t t-raw="head"/>
|
||||
</t>
|
||||
<t t-set="title">Team</t>
|
||||
<div class="container">
|
||||
<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">
|
||||
|
@ -59,8 +57,9 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</t>
|
||||
</template>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
|
|
Loading…
Reference in New Issue