[IMP]Removed inherit option id for description.
[odoo/odoo.git] / addons / website_hr_recruitment / views / website_hr_recruitment.xml
1 <?xml version="1.0" encoding="utf-8"?>
2 <openerp>
3     <data>
4         <record id="website_mail_jobs" model="mail.group">
5             <field name="name">Jobs</field>
6             <field name="public">public</field>
7             <field name="description">Job Posts on your website</field>
8         </record>
9
10         <template id="job_footer_custom" inherit_id="website.layout" name="Custom Footer Job">
11             <xpath expr="//header//ul[@id='top_menu']/li" position="before">
12                 <li><a href="/jobs">Jobs</a></li>
13             </xpath>
14             <xpath expr="//footer//div[@name='info']/ul" position="inside">
15                 <li><a href="/jobs">Jobs</a></li>
16             </xpath>
17         </template>
18
19         <template id="index" name="Departments" page="True">
20             <t t-call="website.layout">
21                 <t t-set="head">
22                     <t t-raw="head or ''"/>
23                 </t>
24                 <t t-set="title">Jobs</t>
25                 <div id="wrap">
26                     <div class="oe_structure"/>
27                     <div class="container oe_website_jobs">
28                         <div class="row">
29                             <div class="col-md-4">
30                                 <h1>Departments</h1>
31                             </div>
32                             <div class="col-sm-4">
33                                 <t t-call="website.pager">
34                                     <t t-set="classname">pull-left</t>
35                                 </t>
36                             </div>
37                         </div>
38                         <div class='row style_default'>
39                             <div class="col-md-12" id="jobs_grid">
40                                 <ul class="media-list">
41                                     <li t-foreach="res_job" t-as="job" class="media" data-publish="">
42                                         <div class="media-body">
43                                             <span t-if="not job.no_of_recruitment" class="label label-default pull-right">No recruitment needed.</span>
44                                             <t t-if="job.no_of_recruitment">
45                                                 <span class="label label-default pull-right label-info"><t t-esc="vals[job.id]['count']"/> Recruitment availables.</span>
46                                             </t>
47                                             <h4 class="media-heading"><a t-attf-href="/job/detail/#{ job.id }/"><span t-field="job.name"> </span></a></h4>
48                                             <div>
49                                                 <i class="icon-time"></i> <span t-esc="vals[job.id]['date_recruitment']"> </span>
50                                             </div>
51                                             <div t-if="companies[0].country_id">
52                                                 <i class="icon-map-marker"></i> <span t-field="companies[0].city"> </span>  <span t-if="companies[0].state_id" t-field="companies[0].state_id.name"> </span>, <span t-field="companies[0].country_id.name"> </span>
53                                             </div>
54                                         </div>
55                                     </li>
56                                 </ul>
57                             </div>
58                         </div>
59                     </div>
60                     <div class="oe_structure"/>
61                 </div>
62             </t>
63         </template>
64         <template id="detail">
65             <t t-call="website.layout">
66                 <t t-set="head">
67                     <script type="text/javascript" src="/website_hr_recruitment/static/src/js/recruitment.js"></script>
68                     <t t-raw="head or ''"/>
69                 </t>
70                 <t t-set="title">Job Detail</t>
71                 <div id="wrap">
72                     <div class="container">
73                         <div class="row">
74                             <div class="col-md-4">
75                                 <form action="./subscribe" method="POST" class="form-inline" t-if="not subscribe">
76                                     <div class="col-lg-7">
77                                         <input placeholder="Email Address" type="email" name="email" class="form-control" t-if="is_public_user"/>
78                                     </div>
79                                     <button type="submit" class="btn btn-primary" name="subscribe">Subscribe</button>
80                                 </form>
81                                 <form action="./unsubscribe" method="POST" class="form-inline" t-if="subscribe">
82                                     <input type="hidden" name="email" t-att-value="subscribe"/>
83                                     <button type="submit" class="btn btn-default" name="unsubscribe">Unsubscribe</button>
84                                 </form>
85                             </div>
86                             <t t-call="website.publish"><t t-set="object" t-value="job"/></t>
87                         </div>
88                     </div>
89                     <div class="oe_structure" style="clear:both;">
90                         <h1 class="text-center" t-field="job.name"></h1>
91                         <h4 class="text-center">
92                             <i class="icon-time"></i> <span><t t-esc="vals_date"/></span>
93                         </h4>
94                         <h5 class="text-center">
95                                 <i class="icon-map-marker"></i> <span t-field="job.company_id.city"> </span>  <span t-if="job.company_id.state_id" t-field="job.company_id.state_id.name"> </span>, <span t-field="job.company_id.country_id.name"> </span></h5>
96
97                     </div>                      
98                     <div class="container oe_structure">
99                         <hr/>
100                         <div class="row">
101                             <div t-if="job.website_description">
102                                  <t t-field="job.website_description"/>
103                             </div>                              
104                         </div>
105                     </div>
106                 </div>
107             </t>
108         </template>
109
110         <template id="applyjobpost">
111             <t t-set="title">Apply Job</t>
112             <section id="forms">
113                 <h1>Apply</h1>
114                     <form class="form-horizontal mt32" action="/job/success" method="post" enctype="multipart/form-data">
115                         <input type="hidden" t-att-value="job.department_id.id" name="department_id"/>
116                         <input type="hidden" t-att-value="job.id" name="job_id"/>
117                         <input type="hidden" t-att-value="job.name" name="name"/>
118                         <div class="form-group">
119                             <label class="col-md-3 col-sm-4 control-label" for="partner_name">Name</label>
120                             <div class="col-md-7 col-sm-8">
121                                 <input type="text" class="form-control" name="partner_name" required="True" />
122                             </div>
123                         </div>
124                         <div class="form-group">
125                             <label class="col-md-3 col-sm-4 control-label" for="email_from">Email</label>
126                             <div class="col-md-7 col-sm-8">
127                                 <input type="email" class="form-control" name="email_from" required="True" />
128                             </div>
129                         </div>
130                         <div class="form-group">
131                             <label class="col-md-3 col-sm-4 control-label" for="description">Description</label>
132                             <div class="col-md-7 col-sm-8">
133                                 <textarea  class="form-control" name="description" style="min-height: 120px"/>
134                             </div>
135                         </div>
136                         <div class="form-group">
137                             <label class="col-md-3 col-sm-4 control-label" for="ufile">Upload File</label>
138                             <div class="col-md-7 col-sm-8">
139                                 <input class="input-file" id="fileInput" type="file" name="ufile" required="true"/>
140                             </div>
141                         </div>
142                         <div class="form-group">
143                             <div class="col-md-offset-3 col-sm-offset-4 col-sm-8 col-md-7">
144                                 <button type="submit" class="btn btn-primary">Save</button>
145                             </div>
146                         </div>
147                     </form>
148             </section>
149         </template>
150         <template id="thankyou">
151             <t t-call="website.layout">
152                 <t t-set="title">Thank You!</t>
153                 <div class="col-md-4 pull-right">
154                     <ul class="pager">
155                         <li><a t-att-href="'/job/detail/%%s' %% jobid">All Jobs</a></li>
156                     </ul>
157                 </div>
158                 <section id="typography">
159                     <div class="container">
160                         <div class="row">
161                             <h2>You have successfully applied for job.</h2>
162                         </div>
163                     </div>
164                 </section>
165             </t>
166         </template>
167         <template id="job_departments" inherit_option_id="website_hr_recruitment.index" name="Job Departments">
168                 <xpath expr="//div[@id='jobs_grid']" position="before">
169                     <div class="col-md-3">
170                         <ul class="nav nav-pills nav-stacked mt16">
171                             <li t-att-class=" '' if active else 'active' "><a href="/jobs">All Jobs</a></li>
172                             <t t-foreach="departments" t-as="department">
173                                 <li t-att-class="department.id == active and 'active' or ''">
174                                     <a t-attf-href="/department/#{ department.id }/" ><t t-field="department.name"/></a>
175                                 </li>
176                             </t>
177                         </ul>
178                     </div>
179                 </xpath>
180                 <xpath expr="//div[@id='jobs_grid']" position="attributes">
181                     <attribute name="class">col-md-9</attribute>
182                 </xpath>
183         </template>
184      </data>
185 </openerp>