[IMP]Added security access and subscribed and published formating.
bzr revid: bth@tinyerp.com-20130920115445-u3rzd4q1dnr06hoh
This commit is contained in:
@@ -10,7 +10,9 @@ OpenERP Contact Form
|
||||
'author': 'OpenERP SA',
|
||||
'depends': ['website', 'hr', 'hr_recruitment'],
|
||||
'data': [
|
||||
'website_hr_recruitment_data.xml',
|
||||
'views/website_hr_recruitment.xml',
|
||||
'security/ir.model.access.csv',
|
||||
'security/website_hr_recruitment_security.xml',
|
||||
],
|
||||
'css':[
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
|
||||
access_hr_job_public,hr.job.public,hr.model_hr_job,base.group_public,1,0,0,0
|
||||
access_hr_department_public,hr.department.public,hr.model_hr_department,base.group_public,1,0,0,0
|
||||
access_hr_applicant_public,hr.applicant.public,hr_recruitment.model_hr_applicant,base.group_public,1,0,0,0
|
||||
|
@@ -1,10 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<openerp>
|
||||
<data>
|
||||
|
||||
<record id="hr_recruitment_public" model="ir.rule">
|
||||
<record id="hr_job_public" model="ir.rule">
|
||||
<field name="name">Job Positions: Public</field>
|
||||
<field name="model_id" ref="hr_recruitment.model_hr_applicant"/>
|
||||
<field name="model_id" ref="hr.model_hr_job"/>
|
||||
<field name="domain_force">[('website_published', '=', True)]</field>
|
||||
<field name="groups" eval="[(4, ref('base.group_public'))]"/>
|
||||
<field name="perm_read" eval="True"/>
|
||||
@@ -12,6 +11,5 @@
|
||||
<field name="perm_create" eval="False"/>
|
||||
<field name="perm_unlink" eval="False"/>
|
||||
</record>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
|
||||
@@ -42,7 +42,6 @@
|
||||
<div class="col-md-8">
|
||||
<ul class="media-list">
|
||||
<li t-foreach="res_job" t-as="job" class="media" data-publish="">
|
||||
<t t-call="website.publish"><t t-set="object" t-value="job"/></t>
|
||||
<div class="media-body">
|
||||
<span t-if="not job.no_of_recruitment" class="label label-default pull-right">No recruitment needed.</span>
|
||||
<t t-if="job.no_of_recruitment">
|
||||
@@ -73,17 +72,22 @@
|
||||
</t>
|
||||
<t t-set="title">Job Detail</t>
|
||||
<div id="wrap">
|
||||
<div class="col-md-4">
|
||||
<form action="./subscribe" method="POST" class="form-inline" t-if="not subscribe">
|
||||
<div class="col-lg-7">
|
||||
<input placeholder="Email Address" type="email" name="email" class="form-control" t-if="is_public_user"/>
|
||||
</div>
|
||||
<button type="submit" class="btn btn-primary" name="subscribe">Subscribe</button>
|
||||
</form>
|
||||
<form action="./unsubscribe" method="POST" class="form-inline" t-if="subscribe">
|
||||
<input type="hidden" name="email" t-att-value="subscribe"/>
|
||||
<button type="submit" class="btn btn-default" name="unsubscribe">Unsubscribe</button>
|
||||
</form>
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<form action="./subscribe" method="POST" class="form-inline" t-if="not subscribe">
|
||||
<div class="col-lg-7">
|
||||
<input placeholder="Email Address" type="email" name="email" class="form-control" t-if="is_public_user"/>
|
||||
</div>
|
||||
<button type="submit" class="btn btn-primary" name="subscribe">Subscribe</button>
|
||||
</form>
|
||||
<form action="./unsubscribe" method="POST" class="form-inline" t-if="subscribe">
|
||||
<input type="hidden" name="email" t-att-value="subscribe"/>
|
||||
<button type="submit" class="btn btn-default" name="unsubscribe">Unsubscribe</button>
|
||||
</form>
|
||||
</div>
|
||||
<t t-call="website.publish"><t t-set="object" t-value="job"/></t>
|
||||
</div>
|
||||
</div>
|
||||
<div class="oe_structure" style="clear:both;">
|
||||
<h1 class="text-center" t-field="job.name"></h1>
|
||||
@@ -95,7 +99,6 @@
|
||||
|
||||
</div>
|
||||
<div class="container">
|
||||
<t t-call="website.publish"><t t-set="object" t-value="job"/></t>
|
||||
<hr/>
|
||||
<div class="row">
|
||||
<div class="pull-left">
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<openerp>
|
||||
<data noupdate="1">
|
||||
|
||||
<record id="action_open_website" model="ir.actions.act_url">
|
||||
<field name="name">Website Recruitment Form</field>
|
||||
<field name="target">self</field>
|
||||
<field name="url">/jobs</field>
|
||||
</record>
|
||||
<record id="base.open_menu" model="ir.actions.todo">
|
||||
<field name="action_id" ref="action_open_website"/>
|
||||
<field name="state">open</field>
|
||||
</record>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
Reference in New Issue
Block a user