summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristophe Matthieu <chm@openerp.com>2013-08-06 17:33:23 +0200
committerChristophe Matthieu <chm@openerp.com>2013-08-06 17:33:23 +0200
commit24a790e95f3f2aec5201f62d77d5fa9a71e1e767 (patch)
tree8bd7acdd5dc14598d73cda8267d5b50f234bece0
parentbbe972173238afa3eaf77d1321b999e14ce0ffbd (diff)
[FIX] website_hr
bzr revid: chm@openerp.com-20130806153323-ctvf6y0yskaiwv8y
-rw-r--r--addons/website_hr/hr.py1
-rw-r--r--addons/website_hr/static/src/js/hr.js16
-rw-r--r--addons/website_hr/views/website_hr.xml17
3 files changed, 7 insertions, 27 deletions
diff --git a/addons/website_hr/hr.py b/addons/website_hr/hr.py
index 542e03e2a1c..91ae7a89ada 100644
--- a/addons/website_hr/hr.py
+++ b/addons/website_hr/hr.py
@@ -7,6 +7,5 @@ class hr(osv.osv):
_inherit = 'hr.employee'
_columns = {
'website_published': fields.boolean('Available in the website'),
- 'website_published_on_contact_form': fields.boolean('Publish', help="Publish also on contact form"),
}
diff --git a/addons/website_hr/static/src/js/hr.js b/addons/website_hr/static/src/js/hr.js
index 1d8e8deac03..e0e69fb5161 100644
--- a/addons/website_hr/static/src/js/hr.js
+++ b/addons/website_hr/static/src/js/hr.js
@@ -15,20 +15,4 @@ $(document).ready(function () {
}
});
});
- $(document).on('click', '.js_publish_contact, .js_unpublish_contact', function (e) {
- e.preventDefault();
- var $link = $(this).parent();
- $link.find('.js_publish_contact, .js_unpublish_contact').addClass("hidden");
- var $unp = $link.find(".js_unpublish_contact");
- var $p = $link.find(".js_publish_contact");
- $.post('/hr/publish_contact', {'id': $link.data('id')}, function (result) {
- if (+result) {
- $p.addClass("hidden");
- $unp.removeClass("hidden");
- } else {
- $p.removeClass("hidden");
- $unp.addClass("hidden");
- }
- });
- });
}); \ No newline at end of file
diff --git a/addons/website_hr/views/website_hr.xml b/addons/website_hr/views/website_hr.xml
index 59bfb9feb46..76190f7977c 100644
--- a/addons/website_hr/views/website_hr.xml
+++ b/addons/website_hr/views/website_hr.xml
@@ -37,18 +37,15 @@
<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 '')">Click to Unpublish</span>
<span t-att-class="'label label-important js_publish %%s' %% (employee_id.website_published and 'hidden' or '')">Click to Publish</span>
- </a><br/>
- <a href="#" t-att-data-id="employee_id.id">
- <span t-att-class="'label label-success js_unpublish_contact %%s' %% (not employee_id.website_published and 'hidden' or '')">hidden on Contacts</span>
- <span t-att-class="'label label-important js_publish_contact %%s' %% (employee_id.website_published and 'hidden' or '')">display in Contacts</span>
</a>
</div>
- <h5 class="media-heading"><t t-esc="employee_id.name"/></h5>
- <div t-record="employee_id" t-field="department_id"> </div>
- <div t-record="employee_id" t-field="job_id"> </div>
- <div t-record="employee_id" t-field="work_location"> </div>
- <div t-record="employee_id" t-field="work_phone"> </div>
- <div t-record="employee_id" t-field="work_email"> </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>