refinerycms-jobs 3.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +29 -0
- data/Gemfile +5 -0
- data/Rakefile +20 -0
- data/app/controllers/refinery/jobs/admin/jobs_controller.rb +44 -0
- data/app/controllers/refinery/jobs/admin/settings_controller.rb +64 -0
- data/app/controllers/refinery/jobs/job_applications_controller.rb +67 -0
- data/app/controllers/refinery/jobs/jobs_controller.rb +17 -0
- data/app/helpers/refinery/jobs/controller_helper.rb +18 -0
- data/app/helpers/refinery/jobs/jobs_helper.rb +7 -0
- data/app/mailers/refinery/jobs/job_mailer.rb +40 -0
- data/app/models/refinery/jobs/job.rb +59 -0
- data/app/models/refinery/jobs/job_application.rb +32 -0
- data/app/models/refinery/jobs/setting.rb +65 -0
- data/app/views/refinery/jobs/admin/job_applications/_job.html.erb +13 -0
- data/app/views/refinery/jobs/admin/job_applications/_sortable_list.html.erb +2 -0
- data/app/views/refinery/jobs/admin/jobs/_actions.html.erb +25 -0
- data/app/views/refinery/jobs/admin/jobs/_form.html.erb +93 -0
- data/app/views/refinery/jobs/admin/jobs/_job.html.erb +39 -0
- data/app/views/refinery/jobs/admin/jobs/_job_application.html.erb +20 -0
- data/app/views/refinery/jobs/admin/jobs/_jobs.html.erb +2 -0
- data/app/views/refinery/jobs/admin/jobs/_records.html.erb +16 -0
- data/app/views/refinery/jobs/admin/jobs/_sortable_list.html.erb +5 -0
- data/app/views/refinery/jobs/admin/jobs/edit.html.erb +1 -0
- data/app/views/refinery/jobs/admin/jobs/index.html.erb +7 -0
- data/app/views/refinery/jobs/admin/jobs/job_applications.html.erb +34 -0
- data/app/views/refinery/jobs/admin/jobs/new.html.erb +1 -0
- data/app/views/refinery/jobs/job_applications/_form.html.erb +33 -0
- data/app/views/refinery/jobs/job_applications/new.html.erb +5 -0
- data/app/views/refinery/jobs/job_applications/show.html.erb +11 -0
- data/app/views/refinery/jobs/job_mailer/confirmation.text.erb +1 -0
- data/app/views/refinery/jobs/job_mailer/notification.text.erb +20 -0
- data/app/views/refinery/jobs/jobs/index.html.erb +21 -0
- data/app/views/refinery/jobs/jobs/show.html.erb +67 -0
- data/config/locales/en.yml +99 -0
- data/config/locales/fr.yml +100 -0
- data/config/routes.rb +22 -0
- data/db/migrate/20130508210800_create_jobs.rb +31 -0
- data/db/migrate/20140929182859_add_slug_to_jobs.rb +6 -0
- data/db/migrate/20140929185232_add_draft_and_published_at_to_jobs.rb +6 -0
- data/db/migrate/20140930184502_create_job_translations.rb +15 -0
- data/db/migrate/20141001192020_add_fields_to_jobs.rb +32 -0
- data/db/seeds.rb +26 -0
- data/lib/generators/refinery/jobs/jobs_generator.rb +25 -0
- data/lib/generators/refinery/jobs/templates/config/initializers/refinery/jobs.rb.erb +7 -0
- data/lib/refinery/jobs/configuration.rb +11 -0
- data/lib/refinery/jobs/dragonfly.rb +57 -0
- data/lib/refinery/jobs/engine.rb +30 -0
- data/lib/refinery/jobs/validators/file_size_validator.rb +19 -0
- data/lib/refinery/jobs/validators.rb +7 -0
- data/lib/refinery/jobs.rb +25 -0
- data/lib/refinerycms-jobs.rb +1 -0
- data/readme.md +68 -0
- data/refinerycms-jobs.gemspec +24 -0
- metadata +154 -0
@@ -0,0 +1,20 @@
|
|
1
|
+
<li class='clearfix record <%= cycle("on", "on-hover") %>' id="<%= dom_id(job_application) -%>">
|
2
|
+
<span class='title'>
|
3
|
+
<b><%= t('.created_at')%> :</b>
|
4
|
+
<%= job_application.created_at.strftime('%H:%M %b %d, %Y') %><br>
|
5
|
+
|
6
|
+
<b><%= t('.name')%> :</b>
|
7
|
+
<%= job_application.name %> <span class="preview"> </span><br>
|
8
|
+
|
9
|
+
<b><%= t('.phone')%> :</b>
|
10
|
+
<%= job_application.phone %> <span class="preview"> </span><br>
|
11
|
+
|
12
|
+
<b><%= t('.email')%> :</b>
|
13
|
+
<%= job_application.email %> <span class="preview"> </span><br>
|
14
|
+
|
15
|
+
<b><%= t('.cover_letter')%> :</b>
|
16
|
+
<%= job_application.cover_letter %> <span class="preview"> </span><br>
|
17
|
+
|
18
|
+
<%= link_to t('.download_resume', name: job_application.name), job_application.resume.url %><span class="preview"> </span><br>
|
19
|
+
</span>
|
20
|
+
</li>
|
@@ -0,0 +1,16 @@
|
|
1
|
+
<%= render 'refinery/admin/search_header', :url => refinery.jobs_admin_jobs_path %>
|
2
|
+
<div class='pagination_container'>
|
3
|
+
<% if @jobs.any? %>
|
4
|
+
<%= render 'jobs' %>
|
5
|
+
<% else %>
|
6
|
+
<p>
|
7
|
+
<% unless searching? %>
|
8
|
+
<strong>
|
9
|
+
<%= t('.no_items_yet') %>
|
10
|
+
</strong>
|
11
|
+
<% else %>
|
12
|
+
<%= t('no_results', :scope => 'refinery.admin.search') %>
|
13
|
+
<% end %>
|
14
|
+
</p>
|
15
|
+
<% end %>
|
16
|
+
</div>
|
@@ -0,0 +1 @@
|
|
1
|
+
<%= render :partial => "form" %>
|
@@ -0,0 +1,7 @@
|
|
1
|
+
<section id='records'>
|
2
|
+
<%= render 'records' %>
|
3
|
+
</section>
|
4
|
+
<aside id='actions'>
|
5
|
+
<%= render 'actions' %>
|
6
|
+
</aside>
|
7
|
+
<%= render '/refinery/admin/make_sortable', :tree => false if !searching? and ::Refinery::Jobs::Admin::JobsController.sortable? and ::Refinery::Jobs::Job.many? %>
|
@@ -0,0 +1,34 @@
|
|
1
|
+
<div id='actions'>
|
2
|
+
<ul>
|
3
|
+
<li>
|
4
|
+
<%= link_to t('.back_to_jobs'), refinery.jobs_admin_jobs_path, :class => "back_icon" %>
|
5
|
+
</li>
|
6
|
+
</ul>
|
7
|
+
</div>
|
8
|
+
<div id='records'>
|
9
|
+
<% if searching? %>
|
10
|
+
<h2>Search Results for "<%= params[:search] %>"</h2>
|
11
|
+
|
12
|
+
<% if @jobs.any? %>
|
13
|
+
<%= render :partial => "job_applications", :collection => @job_applications %>
|
14
|
+
<% else %>
|
15
|
+
<p><%= t('.no_items_yet') %></p>
|
16
|
+
<% end %>
|
17
|
+
<% else %>
|
18
|
+
<h2><%= t('.job_applications_for_position', :job_title => @job.title) %></h2>
|
19
|
+
|
20
|
+
<% if @job_applications.any? %>
|
21
|
+
<%= will_paginate @job_applications, :previous_label => '«', :next_label => '»' %>
|
22
|
+
<ul id='sortable_list'>
|
23
|
+
<%= render :partial => 'job_application', :collection => @job_applications %>
|
24
|
+
</ul>
|
25
|
+
<%= will_paginate @job_applications, :previous_label => '«', :next_label => '»' %>
|
26
|
+
<% else %>
|
27
|
+
<p>
|
28
|
+
<strong>
|
29
|
+
<%= t('.no_items_yet') %>
|
30
|
+
</strong>
|
31
|
+
</p>
|
32
|
+
<% end %>
|
33
|
+
<% end %>
|
34
|
+
</div>
|
@@ -0,0 +1 @@
|
|
1
|
+
<%= render :partial => "form" %>
|
@@ -0,0 +1,33 @@
|
|
1
|
+
<%= form_for [refinery, :jobs, @job, @job_application], :html => { :multipart => true } do |f| %>
|
2
|
+
|
3
|
+
<%= render '/refinery/admin/error_messages', {:object => @job_application, :include_object_name => true} %>
|
4
|
+
|
5
|
+
<h2><%= t('.job_application_for_position') %></h2>
|
6
|
+
|
7
|
+
<div class='field'>
|
8
|
+
<%= f.label :name %>
|
9
|
+
<%= f.text_field :name %>
|
10
|
+
</div>
|
11
|
+
|
12
|
+
<div class='field'>
|
13
|
+
<%= f.label :email %>
|
14
|
+
<%= f.text_field :email %>
|
15
|
+
</div>
|
16
|
+
|
17
|
+
<div class='field'>
|
18
|
+
<%= f.label :phone %>
|
19
|
+
<%= f.text_field :phone %>
|
20
|
+
</div>
|
21
|
+
|
22
|
+
<div class='field'>
|
23
|
+
<%= f.label :cover_letter %>
|
24
|
+
<%= f.text_area :cover_letter %>
|
25
|
+
</div>
|
26
|
+
|
27
|
+
<div class='field'>
|
28
|
+
<%= f.label :resume %>
|
29
|
+
<%= f.file_field :resume %>
|
30
|
+
</div>
|
31
|
+
|
32
|
+
<%= f.submit t('.apply') %>
|
33
|
+
<% end %>
|
@@ -0,0 +1,11 @@
|
|
1
|
+
<% content_for :body_content_title do %>
|
2
|
+
<%= @job.title %>
|
3
|
+
<% end %>
|
4
|
+
|
5
|
+
<% content_for :body do %>
|
6
|
+
<p><%= raw t('.job_application_successfully_submitted', job_title: @job.title) %></p>
|
7
|
+
|
8
|
+
<p><%= link_to t('.back_to_list'), refinery.jobs_jobs_path %></p>
|
9
|
+
<% end %>
|
10
|
+
|
11
|
+
<%= render :partial => "/refinery/content_page" %>
|
@@ -0,0 +1 @@
|
|
1
|
+
<%=raw Refinery::Jobs::Setting.confirmation_message(Globalize.locale).gsub("%name%", @job_application.name) -%>
|
@@ -0,0 +1,20 @@
|
|
1
|
+
<%=raw t('.greeting') %>,
|
2
|
+
|
3
|
+
<%=raw t('.you_recieved_new_job_application') %>
|
4
|
+
|
5
|
+
<%=raw t('.job_application_starts') %>
|
6
|
+
|
7
|
+
<%=raw t('.from') %>: <%= @job_application.name %>
|
8
|
+
<%=raw t('.email') %>: <%= @job_application.email %>
|
9
|
+
<%=raw t('.phone') %>: <%= @job_application.phone %>
|
10
|
+
<%=raw t('.cover_letter') %>:
|
11
|
+
<%=raw strip_tags(@job_application.cover_letter) %>
|
12
|
+
<%=raw t('.resume') %>:
|
13
|
+
<%= raw @job_application.resume.url(:host => @host) %>
|
14
|
+
|
15
|
+
<%=raw t('.job_application_ends') %>
|
16
|
+
|
17
|
+
<%=raw t('.closing_line') %>,
|
18
|
+
<%=raw Refinery::Core.site_name %>
|
19
|
+
|
20
|
+
<%=raw t('.ps') -%>
|
@@ -0,0 +1,21 @@
|
|
1
|
+
<% content_for :body_content_title do %>
|
2
|
+
<h1><%= t('.current_open_positions') %></h1>
|
3
|
+
<% end %>
|
4
|
+
|
5
|
+
<% content_for :body do %>
|
6
|
+
<% if @jobs.any? %>
|
7
|
+
<section>
|
8
|
+
<ul id="jobs">
|
9
|
+
<% @jobs.each do |job| %>
|
10
|
+
<li>
|
11
|
+
<%= link_to job.title, refinery.jobs_job_url(job) %>
|
12
|
+
</li>
|
13
|
+
<% end %>
|
14
|
+
</ul>
|
15
|
+
</section>
|
16
|
+
<% else %>
|
17
|
+
<%= t('.no_open_positions') %>
|
18
|
+
<% end %>
|
19
|
+
<% end %>
|
20
|
+
|
21
|
+
<%= render :partial => "/refinery/content_page" %>
|
@@ -0,0 +1,67 @@
|
|
1
|
+
<% content_for :body_content_title do %>
|
2
|
+
<%= @job.title %>
|
3
|
+
<% end %>
|
4
|
+
|
5
|
+
<% content_for :body do %>
|
6
|
+
<p>
|
7
|
+
<% unless @job.fill.blank? %>
|
8
|
+
<strong><%= t('.fill') %></strong> : <%= @job.fill %>
|
9
|
+
<% end %>
|
10
|
+
|
11
|
+
<% unless @job.ref.blank? %>
|
12
|
+
<br /><strong><%= t('.ref') %></strong> : <%= @job.ref %>
|
13
|
+
<% end %>
|
14
|
+
</p>
|
15
|
+
|
16
|
+
<h2><%= t('.description')%></h2>
|
17
|
+
<%= @job.description.html_safe %>
|
18
|
+
|
19
|
+
<h2><%= t('.requirements_and_work_conditions') %></h2>
|
20
|
+
<p>
|
21
|
+
<% unless @job.education.blank? %>
|
22
|
+
<strong><%= t('.education') %></strong> : <%= @job.education %>
|
23
|
+
<% end %>
|
24
|
+
|
25
|
+
<% unless @job.experience.blank? %>
|
26
|
+
<br /><strong><%= t('.experience') %></strong> : <%= @job.experience %>
|
27
|
+
<% end %>
|
28
|
+
|
29
|
+
<% unless @job.skills.blank? %>
|
30
|
+
<br /><strong><%= t('.skills') %></strong> : <%= @job.skills %>
|
31
|
+
<% end %>
|
32
|
+
|
33
|
+
<% unless @job.languages.blank? %>
|
34
|
+
<br /><strong><%= t('.languages') %></strong> : <%= @job.languages %>
|
35
|
+
<% end %>
|
36
|
+
|
37
|
+
<% unless @job.salary.blank? %>
|
38
|
+
<br /><strong><%= t('.salary') %></strong> : <%= @job.salary %>
|
39
|
+
<% end %>
|
40
|
+
|
41
|
+
<% unless @job.hours.blank? %>
|
42
|
+
<br /><strong><%= t('.hours') %></strong> : <%= @job.hours %>
|
43
|
+
<% end %>
|
44
|
+
|
45
|
+
<% unless @job.employment_terms.blank? %>
|
46
|
+
<br /><strong><%= t('.employment_terms') %></strong> : <%= @job.employment_terms %>
|
47
|
+
<% end %>
|
48
|
+
|
49
|
+
<% unless @job.length.blank? %>
|
50
|
+
<br /><strong><%= t('.length') %></strong> : <%= @job.length %>
|
51
|
+
<% end %>
|
52
|
+
|
53
|
+
<% unless @job.employment_date.blank? %>
|
54
|
+
<br /><strong><%= t('.employment_date') %></strong> : <%= @job.employment_date %>
|
55
|
+
<% end %>
|
56
|
+
|
57
|
+
<% unless @job.employment_terms.blank? %>
|
58
|
+
<br /><strong><%= t('.contact') %></strong> : <%= @job.contact %>
|
59
|
+
<% end %>
|
60
|
+
</p>
|
61
|
+
|
62
|
+
<%= render :partial => "/refinery/jobs/job_applications/form" %>
|
63
|
+
|
64
|
+
<p><%= link_to t('.back_to_list'), refinery.jobs_jobs_path %></p>
|
65
|
+
<% end %>
|
66
|
+
|
67
|
+
<%= render :partial => "/refinery/content_page" %>
|
@@ -0,0 +1,99 @@
|
|
1
|
+
en:
|
2
|
+
refinery:
|
3
|
+
plugins:
|
4
|
+
refinery_jobs:
|
5
|
+
title: Jobs
|
6
|
+
jobs:
|
7
|
+
config:
|
8
|
+
from_name: "%{name} [%{site_name}]"
|
9
|
+
admin:
|
10
|
+
jobs:
|
11
|
+
actions:
|
12
|
+
create_new: Create a new job
|
13
|
+
reorder: Reorder jobs
|
14
|
+
reorder_done: Reorder jobs done
|
15
|
+
records:
|
16
|
+
title: Jobs
|
17
|
+
sorry_no_results: "Sorry, no results found."
|
18
|
+
no_items_yet: There are no jobs yet.
|
19
|
+
job:
|
20
|
+
view_live_html: View this job <br/><em>(opens in a new window)</em>
|
21
|
+
view_applications_for_this_job: View applications for this job
|
22
|
+
edit: Edit this job
|
23
|
+
delete: Delete this job
|
24
|
+
draft: draft
|
25
|
+
job_application:
|
26
|
+
created_at: Created at
|
27
|
+
name: Name
|
28
|
+
email: Email
|
29
|
+
phone: Phone
|
30
|
+
cover_letter: Cover letter
|
31
|
+
download_resume: "Download %{name}'s resume"
|
32
|
+
job_applications:
|
33
|
+
job_applications_for_position: 'Job applications for position "%{job_title}"'
|
34
|
+
back_to_jobs: Back to jobs
|
35
|
+
jobs:
|
36
|
+
show:
|
37
|
+
fill: Number of vacancies
|
38
|
+
ref: Reference number
|
39
|
+
description: Description
|
40
|
+
requirements_and_work_conditions: Requirements and work conditions
|
41
|
+
education: Education
|
42
|
+
experience: Years related to the job experience
|
43
|
+
skills: Skills
|
44
|
+
languages: Languages asked
|
45
|
+
salary: Salary
|
46
|
+
hours: Number of hours per week
|
47
|
+
employment_terms: Employment terms
|
48
|
+
length: Length of employment
|
49
|
+
employment_date: Employment date
|
50
|
+
contact: Name of contact person
|
51
|
+
back_to_list: Back to jobs list
|
52
|
+
index:
|
53
|
+
no_open_positions: There are no open positions at the moment.
|
54
|
+
current_open_positions: Current open positions
|
55
|
+
job_applications:
|
56
|
+
form:
|
57
|
+
job_application_for_position: Apply Online
|
58
|
+
apply: Apply
|
59
|
+
show:
|
60
|
+
job_application_successfully_submitted: 'Your job application for the <strong>"%{job_title}"</strong> position was successfully submitted. <br>You will receive a confirmation email.<br><br>Thank you.'
|
61
|
+
back_to_list: Back to jobs list
|
62
|
+
job_mailer:
|
63
|
+
notification:
|
64
|
+
greeting: Hello
|
65
|
+
you_recieved_new_job_application: You have received a new application on your site.
|
66
|
+
job_application_starts: --- Beginning of application ---
|
67
|
+
job_application_ends: --- End of application ---
|
68
|
+
from: From
|
69
|
+
email: Email
|
70
|
+
phone: Phone
|
71
|
+
cover_letter: Cover letter
|
72
|
+
resume: Resume
|
73
|
+
closing_line: Kind regards
|
74
|
+
ps: PS All applications are stored in the 'Jobs' section so you can refer to them later.
|
75
|
+
activerecord:
|
76
|
+
attributes:
|
77
|
+
'refinery/jobs/job':
|
78
|
+
title: Title
|
79
|
+
fill: Number of vacancies
|
80
|
+
ref: Reference number
|
81
|
+
description: Description
|
82
|
+
education: Education
|
83
|
+
experience: Years related to the job experience
|
84
|
+
skills: Skills
|
85
|
+
languages: Languages asked
|
86
|
+
salary: Salary
|
87
|
+
hours: Number of hours per week
|
88
|
+
employment_terms: Employment terms
|
89
|
+
length: Length of employment
|
90
|
+
employment_date: Employment date
|
91
|
+
contact: Name of contact person
|
92
|
+
published_at: Published at
|
93
|
+
draft: Save as draft
|
94
|
+
'refinery/jobs/job_application':
|
95
|
+
name: Name
|
96
|
+
email: Email
|
97
|
+
phone: Phone
|
98
|
+
cover_letter: Cover letter
|
99
|
+
resume: Resume
|
@@ -0,0 +1,100 @@
|
|
1
|
+
fr:
|
2
|
+
refinery:
|
3
|
+
plugins:
|
4
|
+
refinery_jobs:
|
5
|
+
title: Offres d'emploi
|
6
|
+
jobs:
|
7
|
+
config:
|
8
|
+
from_name: "%{name} [%{site_name}]"
|
9
|
+
admin:
|
10
|
+
jobs:
|
11
|
+
actions:
|
12
|
+
create_new: Créer une nouvelle offre d'emploi
|
13
|
+
reorder: Réordonner les offres d'emploi
|
14
|
+
reorder_done: Fin de réordonnancement des offres d'emploi
|
15
|
+
records:
|
16
|
+
title: Offre d'emploi
|
17
|
+
sorry_no_results: "Désolé ! Aucun résultat."
|
18
|
+
no_items_yet: Il n'y a actuellement aucune offre d'emploi. Cliquer sur "Créer une nouvelle offre d'emploi" pour créer votre première offre d'emploi.
|
19
|
+
job:
|
20
|
+
view_live_html: Voir cette offre d'emploi <br/><em>(Ouvre une nouvelle fenêtre)</em>
|
21
|
+
view_applications_for_this_job: Voir les candidatures pour cette offre d'emploi
|
22
|
+
edit: Modifier cette offre d'emploi
|
23
|
+
delete: Supprimer définitivement cette offre d'emploi
|
24
|
+
draft: brouillon
|
25
|
+
job_application:
|
26
|
+
created_at: Créée le
|
27
|
+
name: Nom
|
28
|
+
email: Courriel
|
29
|
+
phone: Téléphone
|
30
|
+
cover_letter: Lettre de présentation
|
31
|
+
download_resume: "Téléchargez le Curriculum Vitae de %{name}"
|
32
|
+
job_applications:
|
33
|
+
job_applications_for_position: 'Candidatures pour le poste de "%{job_title}"'
|
34
|
+
back_to_jobs: Revenir à la liste des offres d'emploi
|
35
|
+
jobs:
|
36
|
+
show:
|
37
|
+
fill: Nombre de postes à combler
|
38
|
+
ref: Numéro de l'offre
|
39
|
+
description: Description
|
40
|
+
requirements_and_work_conditions: Exigences et conditions de travail
|
41
|
+
education: Niveau d'études
|
42
|
+
experience: Années d'expérience reliées à l'emploi
|
43
|
+
skills: Description des compétences
|
44
|
+
languages: Langues demandées
|
45
|
+
salary: Salaire offert
|
46
|
+
hours: Nombre d'heures par semaine
|
47
|
+
employment_terms: Statut d'emploi
|
48
|
+
length: Durée de l'emploi
|
49
|
+
employment_date: Date prévue d'entrée en fonction
|
50
|
+
contact: Nom de la personne à contacter
|
51
|
+
back_to_list: Revenir à la liste des offres d'emploi
|
52
|
+
index:
|
53
|
+
no_open_positions: Il n'y a pas de postes ouverts pour le moment.
|
54
|
+
current_open_positions: Postes ouverts
|
55
|
+
job_applications:
|
56
|
+
form:
|
57
|
+
job_application_for_position: Postulez en ligne
|
58
|
+
apply: Postuler
|
59
|
+
show:
|
60
|
+
job_application_successfully_submitted: 'Votre candidature pour le poste de <strong>"%{job_title}"</strong> a été soumise avec succès. <br>Vous allez recevoir un courriel de confirmation.<br><br>Merci.'
|
61
|
+
back_to_list: Revenir à la liste des offres d'emploi
|
62
|
+
job_mailer:
|
63
|
+
notification:
|
64
|
+
greeting: Bonjour
|
65
|
+
you_recieved_new_job_application: Vous avez reçu une nouvelle candidature sur votre site.
|
66
|
+
job_application_starts: --- Début de la candidature ---
|
67
|
+
job_application_ends: --- Fin de la candidature ---
|
68
|
+
from: De
|
69
|
+
email: Courriel
|
70
|
+
phone: Téléphone
|
71
|
+
cover_letter: Lettre de présentation
|
72
|
+
resume: Curriculum Vitae
|
73
|
+
closing_line: Cordialement
|
74
|
+
ps: P.S. Toutes les candidatures sont stockées dans la section 'Offres d'emploi' afin que vous puissiez les consulter ultérieurement.
|
75
|
+
activerecord:
|
76
|
+
attributes:
|
77
|
+
'refinery/jobs/job':
|
78
|
+
title: Titre
|
79
|
+
fill: Nombre de postes à combler
|
80
|
+
ref: Numéro de l'offre
|
81
|
+
description: Description
|
82
|
+
requirements_and_work_conditions: Exigences et conditions de travail
|
83
|
+
education: Niveau d'études
|
84
|
+
experience: Années d'expérience reliées à l'emploi
|
85
|
+
skills: Description des compétences
|
86
|
+
languages: Langues demandées
|
87
|
+
salary: Salaire offert
|
88
|
+
hours: Nombre d'heures par semaine
|
89
|
+
employment_terms: Statut d'emploi
|
90
|
+
length: Durée de l'emploi
|
91
|
+
employment_date: Date prévue d'entrée en fonction
|
92
|
+
contact: Nom de la personne à contacter
|
93
|
+
published_at: Publié le
|
94
|
+
draft: Enregistrer comme un brouillon
|
95
|
+
'refinery/jobs/job_application':
|
96
|
+
name: Nom
|
97
|
+
email: Courriel
|
98
|
+
phone: Téléphone
|
99
|
+
cover_letter: Lettre de présentation
|
100
|
+
resume: Curriculum Vitae
|
data/config/routes.rb
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
Refinery::Core::Engine.routes.draw do
|
2
|
+
|
3
|
+
namespace :jobs, :path => '' do
|
4
|
+
resources :jobs, :only => [:show, :index] do
|
5
|
+
resources :job_applications
|
6
|
+
end
|
7
|
+
end
|
8
|
+
|
9
|
+
namespace :jobs, :path => '' do
|
10
|
+
namespace :admin, :path => Refinery::Core.backend_route do
|
11
|
+
resources :jobs, :except => :show do
|
12
|
+
collection do
|
13
|
+
post :update_positions
|
14
|
+
end
|
15
|
+
member do
|
16
|
+
get :job_applications
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
22
|
+
end
|
@@ -0,0 +1,31 @@
|
|
1
|
+
class CreateJobs < ActiveRecord::Migration
|
2
|
+
|
3
|
+
def change
|
4
|
+
create_table :refinery_jobs do |t|
|
5
|
+
t.string :title
|
6
|
+
t.text :description
|
7
|
+
t.string :employment_terms
|
8
|
+
t.string :hours
|
9
|
+
t.integer :position
|
10
|
+
t.boolean :enabled
|
11
|
+
t.timestamps
|
12
|
+
end
|
13
|
+
|
14
|
+
add_index :refinery_jobs, :id
|
15
|
+
|
16
|
+
# can't use Model.table_name as it would load class and initializers haven't run to attach refinery_resources dragonfly app
|
17
|
+
create_table :refinery_job_applications do |t|
|
18
|
+
t.integer :job_id
|
19
|
+
t.string :name
|
20
|
+
t.string :phone
|
21
|
+
t.string :email
|
22
|
+
t.text :cover_letter
|
23
|
+
t.string :resume_uid
|
24
|
+
t.string :resume_name
|
25
|
+
t.timestamps
|
26
|
+
end
|
27
|
+
|
28
|
+
add_index :refinery_job_applications, :id
|
29
|
+
add_index :refinery_job_applications, :job_id
|
30
|
+
end
|
31
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
class CreateJobTranslations < ActiveRecord::Migration
|
2
|
+
def up
|
3
|
+
Refinery::Jobs::Job.create_translation_table!({
|
4
|
+
:title => :string,
|
5
|
+
:description => :text,
|
6
|
+
:slug => :string
|
7
|
+
}, {
|
8
|
+
:migrate_data => true
|
9
|
+
})
|
10
|
+
end
|
11
|
+
|
12
|
+
def down
|
13
|
+
Refinery::Jobs::Job.drop_translation_table! :migrate_data => true
|
14
|
+
end
|
15
|
+
end
|
@@ -0,0 +1,32 @@
|
|
1
|
+
class AddFieldsToJobs < ActiveRecord::Migration
|
2
|
+
def up
|
3
|
+
add_column Refinery::Jobs::Job.table_name, :fill, :integer, default: 1
|
4
|
+
add_column Refinery::Jobs::Job.table_name, :ref, :string
|
5
|
+
add_column Refinery::Jobs::Job.table_name, :education, :string
|
6
|
+
add_column Refinery::Jobs::Job.table_name, :experience, :string
|
7
|
+
add_column Refinery::Jobs::Job.table_name, :skills, :string
|
8
|
+
add_column Refinery::Jobs::Job.table_name, :languages, :string
|
9
|
+
add_column Refinery::Jobs::Job.table_name, :salary, :string
|
10
|
+
add_column Refinery::Jobs::Job.table_name, :length, :string
|
11
|
+
add_column Refinery::Jobs::Job.table_name, :employment_date, :date
|
12
|
+
add_column Refinery::Jobs::Job.table_name, :contact, :string
|
13
|
+
|
14
|
+
Refinery::Jobs::Job.add_translation_fields! education: :string
|
15
|
+
Refinery::Jobs::Job.add_translation_fields! experience: :string
|
16
|
+
Refinery::Jobs::Job.add_translation_fields! skills: :string
|
17
|
+
Refinery::Jobs::Job.add_translation_fields! languages: :string
|
18
|
+
Refinery::Jobs::Job.add_translation_fields! salary: :string
|
19
|
+
Refinery::Jobs::Job.add_translation_fields! length: :string
|
20
|
+
Refinery::Jobs::Job.add_translation_fields! contact: :string
|
21
|
+
end
|
22
|
+
|
23
|
+
def down
|
24
|
+
remove_column :job_translations, :education
|
25
|
+
remove_column :job_translations, :experience
|
26
|
+
remove_column :job_translations, :skills
|
27
|
+
remove_column :job_translations, :languages
|
28
|
+
remove_column :job_translations, :salary
|
29
|
+
remove_column :job_translations, :length
|
30
|
+
remove_column :job_translations, :contact
|
31
|
+
end
|
32
|
+
end
|
data/db/seeds.rb
ADDED
@@ -0,0 +1,26 @@
|
|
1
|
+
if defined?(Refinery::User)
|
2
|
+
Refinery::User.all.each do |user|
|
3
|
+
if user.plugins.where(:name => 'refinerycms_jobs').blank?
|
4
|
+
user.plugins.create(:name => "refinerycms_jobs",
|
5
|
+
:position => (user.plugins.maximum(:position) || -1) +1)
|
6
|
+
end
|
7
|
+
end
|
8
|
+
end
|
9
|
+
|
10
|
+
url = '/jobs'
|
11
|
+
if defined?(Refinery::Page) and !Refinery::Page.exists?(:link_url => url)
|
12
|
+
page = Refinery::Page.create(
|
13
|
+
:title => "Jobs",
|
14
|
+
:link_url => url,
|
15
|
+
:deletable => false,
|
16
|
+
:menu_match => "^#{url}?(\/|\/.+?|)$"
|
17
|
+
)
|
18
|
+
|
19
|
+
Refinery::Pages.default_parts.each_with_index do |default_page_part, index|
|
20
|
+
page.parts.create(:title => default_page_part, :body => nil, :position => index)
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
(Refinery::Jobs::Setting.methods.sort - Refinery::Setting.methods).each do |setting|
|
25
|
+
Refinery::Jobs::Setting.send(setting) if setting.to_s !~ /=\z/
|
26
|
+
end
|
@@ -0,0 +1,25 @@
|
|
1
|
+
module Refinery
|
2
|
+
class JobsGenerator < Rails::Generators::Base
|
3
|
+
source_root File.expand_path('../templates', __FILE__)
|
4
|
+
|
5
|
+
def generate_jobs_initializer
|
6
|
+
template 'config/initializers/refinery/jobs.rb.erb', File.join(destination_root, 'config', 'initializers', 'refinery', 'jobs.rb')
|
7
|
+
end
|
8
|
+
|
9
|
+
def rake_db
|
10
|
+
rake("refinery_jobs:install:migrations")
|
11
|
+
rake("refinery_settings:install:migrations")
|
12
|
+
end
|
13
|
+
|
14
|
+
def append_load_seed_data
|
15
|
+
create_file 'db/seeds.rb' unless File.exists?(File.join(destination_root, 'db', 'seeds.rb'))
|
16
|
+
append_file 'db/seeds.rb', :verbose => true do
|
17
|
+
<<-EOH
|
18
|
+
|
19
|
+
# Added by Refinery CMS Jobs engine
|
20
|
+
Refinery::Jobs::Engine.load_seed
|
21
|
+
EOH
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
@@ -0,0 +1,7 @@
|
|
1
|
+
Refinery::Jobs.configure do |config|
|
2
|
+
# Configure whether job applications marked as spam should also send a notification mail
|
3
|
+
# config.send_notifications_for_job_applications_marked_as_spam = <%= Refinery::Jobs.send_notifications_for_job_applications_marked_as_spam.inspect %>
|
4
|
+
|
5
|
+
# Configure name in 'from' email address
|
6
|
+
# config.from_name = <%= Refinery::Jobs.from_name.inspect %>
|
7
|
+
end
|
@@ -0,0 +1,11 @@
|
|
1
|
+
module Refinery
|
2
|
+
module Jobs
|
3
|
+
include ActiveSupport::Configurable
|
4
|
+
|
5
|
+
config_accessor :send_notifications_for_job_applications_marked_as_spam
|
6
|
+
config_accessor :from_name
|
7
|
+
|
8
|
+
self.send_notifications_for_job_applications_marked_as_spam = false
|
9
|
+
self.from_name = "no-reply"
|
10
|
+
end
|
11
|
+
end
|