/
_details.html.haml
73 lines (63 loc) · 2.01 KB
/
_details.html.haml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
-# Set Partial Parameters Defaults
- job = nil unless local_assigns[:job]
- confirm = false unless local_assigns[:confirm]
- if job
#job_details
-# display application confirmation (if applicable)
- if job.id == session[:applied_id]
.apply-status-ok
Congratulations, your application has been sent! Best of luck to you!
-# display job outdated warning if applicable
- if job.created_at < 40.days.ago
.old-ad
This job ad has been posted over 40 days ago...
-# show applicants
- unless confirm
.applied-to-job
= job.job_applicants.size
%p
- if job.job_applicants.size != 1
applicants
- else
applicant
-# show job title
%h2
= job_type_image(job.job_type)
= job.title
-# show job location
%p
%span.fading at
- unless job.url.blank? or job.url == "http://"
= link_to job.company, job.url
- else
%strong= job.company
- if job.located_at == "Anywhere"
%strong== (#{job.located_at})
- else
%span.fading in
%strong= job.located_at
-# show job description
.job-description
= job.description_html
= br
-# show job apply form
- if !confirm and job.apply_online?
#apply_online_now= link_to "» Apply now", "#"
#apply_online{hide_unless(@job_applicant)}
= partial "jobs/parts/apply_form", :job => job, :job_applicant => @job_applicant
#job_bottom
#job_post_utils
= link_to "« go back to the homepage", root_url
= br
Is this job ad fake?
= link_to "Report it!", "#", :onclick => "Jobber.ReportSpam('/jobs/#{job.id}/report_spam/', #{job.id}); return false;"
= nbsp*2
%span#report_spam_response
= br
#number_views
Published at:
%strong= job.created_at.to_s(:post_listing_date)
= br
Viewed:
%strong= pluralize(job.view_count, "time")
= clear