[IMP]job instead of job_id.
[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         <template id="job_footer_custom" inherit_id="website.layout" name="Custom Footer Job">
5             <xpath expr="//body/footer//a[@href='/page/website.aboutus']" position="after">
6                 <li><a href="/jobs">Jobs</a></li>
7             </xpath>
8         </template>
9         
10         <template id="index" name="Jobs">
11             <t t-call="website.layout">
12                 <t t-set="title">Jobs</t>
13                 <div class="container">
14                     <div class="page-header">
15                         <h1>Job Position</h1>
16                     </div>
17                     <t t-if="no_of_jobs &gt; 0">
18                         <t t-foreach="companies" t-as="company">
19                             <div class="page-header">
20                                 <h2 class="text-center"><t t-field="company.name"/></h2>
21                             </div>
22                             <table class="table">
23                                 <thead>
24                                     <tr>
25                                         <th><h4>Post Name</h4></th>
26                                     </tr>
27                                 </thead>
28                                 <tbody>
29                                     <t t-foreach="res_job" t-as="job">
30                                         <tr t-if="job.company_id.id==company.id">
31                                             <td>
32                                                 <a t-att-href="'/job/detail/%%s' %% job.id"><span class="lead" t-field="job.name"/></a><br/>
33                                                 <span t-if="job.department_id" t-esc="job.department_id.name"/><br/>
34                                                 <i class="icon-time"></i> <span t-field="job.write_date"/><br/>
35                                                 <span><t t-if="job.no_of_recruitment &gt; 0"><i class="icon-group"></i> <t t-esc="job.no_of_recruitment"/></t>
36                                                     <t t-if="job.no_of_recruitment &lt; 1">Right now no recruitment is going on.</t>
37                                                 </span><br/>
38                                                 <span><i class="icon-map-marker"></i> <t t-field="res_company.city"/> 
39                                                 <t t-if="res_company.state_id">
40                                                     <t t-esc="res_company.state_id.name"/>
41                                                 </t>
42                                                 <t t-if="res_company.country_id">
43                                                     <t t-esc="res_company.country_id.name"/>
44                                                 </t><br/>
45                                                 <t t-if="res_company.phone">&amp;#x2706; <t t-field="res_company.phone"/></t></span>
46                                                 <div t-if="job.no_of_recruitment &lt; 1">
47                                                     <strong>You may also be interested in our others job positions, for which we don't have availabilities right now.<br/>
48                                                     Follow the positions that interests you and we will send you an email when the position is available.</strong><br/><br/>
49                                                     <form action="/jobs/subscribe" method="POST" class="form-inline span8" t-if="not subscribe">
50                                                         <input placeholder="Email Address" type="email" name="email" class="input-medium"/>
51                                                         <button type="submit" class="btn btn-primary" name="subscribe">Subscribe</button>
52                                                     </form>
53                                                     <form class="span8" action="/jobs/unsubscribe" method="POST" t-if="subscribe">
54                                                         <div class="alert alert-success">
55                                                             <button type="button" class="close" data-dismiss="alert">×</button>
56                                                             <strong>Oh great!</strong> You are successfully subscribed email notifications for a <b><t t-esc="job.name"/></b> job.
57                                                         </div>
58                                                         <input type="hidden" name="email" t-att-value="subscribe"/>
59                                                         <button type="submit" class="btn" name="unsubscribe">Unsubscribe</button>
60                                                     </form>
61                                                 </div>
62                                             </td>
63                                             <td>
64                                                 <t t-call="website.publish"><t t-set="object" t-value="job"/></t>
65                                             </td>
66                                         </tr>
67                                     </t>
68                                 </tbody>
69                             </table>
70                         </t>
71                     </t>
72                     <t t-if="no_of_jobs &lt; 1">
73                         <h3>"Thank you for your interest, but right now there is no job openings available in our company."</h3>
74                     </t>
75                 </div>
76             </t>
77         </template>
78         <template id="detail">
79             <t t-call="website.layout">
80                 <t t-set="title">Job Detail</t>
81                 <div class="span4 pull-right">
82                     <ul class="pager">
83                         <li><a t-att-href="'/jobs'">All Jobs</a></li>
84                     </ul>
85                 </div>
86                 <div class="container">
87                     <div class="page-header">
88                         <h1><t t-field="job.name"/></h1>
89                     </div>
90                     <div class="row">
91                         <div class="span12">
92                             <t t-if="job.description">
93                                 <h3>Description</h3>
94                                 <p t-if="job.description"><t t-field="job.description"/></p>
95                             </t>
96                         </div>
97                     </div>
98                     <t t-call="website_hr_recruitment.applyjobpost"/>
99                 </div>
100             </t>
101         </template>
102         <template id="applyjobpost">
103             <t t-set="title">Apply Job</t>
104             <section id="forms">
105                 <div class="page-header">
106                     <h1>Apply</h1>
107                 </div>
108                 <div class="row">
109                     <form class="form-horizontal well" action="/job/success" method="post" enctype="multipart/form-data">
110                         <fieldset>
111                             <input type="hidden" t-att-value="job.department_id.id" name="department_id"/>
112                             <input type="hidden" t-att-value="job.id" name="job_id"/>
113                             <input type="hidden" t-att-value="job.name" name="name"/>
114                             <div class="control-group">
115                                 <input type="text" class="input-xlarge" id="nametxt" name="partner_name" required="true" placeholder="Name..."/>
116                             </div>
117                             <div class="control-group">
118                                 <input type="email" class="input-xlarge" id="emailtxt" name="email_from" required="true" placeholder="Email..."/>
119                             </div>
120                             <div class="control-group">
121                                 <textarea class="span8" style="margin-top:5px; height: 140px;" name="description" placeholder="Enter your comment..."> </textarea>
122                             </div>
123                             <div class="control-group">
124                                 <input class="input-file" id="fileInput" type="file" name="ufile" required="true"/>
125                             </div>
126                             <div class="form-actions">
127                                 <button type="submit" class="btn btn-primary">Save</button>
128                                 <button type="reset" class="btn"><a t-att-href="'/jobs'">Cancel</a></button>
129                           </div>
130                         </fieldset>
131                     </form>
132                 </div>
133             </section>
134         </template>
135         <template id="thankyou">
136             <t t-call="website.layout">
137                 <t t-set="title">Thank You!</t>
138                 <div class="span4 pull-right">
139                     <ul class="pager">
140                         <li><a t-att-href="'/job/detail/%%s' %% jobid">All Jobs</a></li>
141                     </ul>
142                 </div>
143                 <section id="typography">
144                     <div class="container">
145                         <div class="row">
146                             <h2 class="oe_slogan">You have successfully applied for job.</h2>
147                         </div>
148                     </div>
149                 </section>
150             </t>
151         </template>
152      </data>
153 </openerp>