diff --git a/app/assets/javascripts/recruitment.js b/app/assets/javascripts/recruitment.js
index db6ff7a..d055630 100644
--- a/app/assets/javascripts/recruitment.js
+++ b/app/assets/javascripts/recruitment.js
@@ -1 +1,2 @@
-//= require jquery_ujs
\ No newline at end of file
+//= require jquery_ujs
+//= require ckeditor/init
\ No newline at end of file
diff --git a/app/controllers/recruitments_controller.rb b/app/controllers/recruitments_controller.rb
index bfc5d3d..0db19c1 100644
--- a/app/controllers/recruitments_controller.rb
+++ b/app/controllers/recruitments_controller.rb
@@ -6,8 +6,67 @@ class RecruitmentsController < PseudoSessionController
layout :get_layout
def index
- jobs = []
params = OrbitHelper.params
+ if params[:page_id] == "jobs"
+ load_jobs(params)
+ elsif params[:page_id] == "candidates"
+ load_candidates(params)
+ end
+ end
+
+ def load_candidates(params)
+ data = []
+ if params[:type].present? && params[:type] == "aq"
+ candidates = advanced_filter_candidates(params)
+ criteria = "- "
+ elsif params[:q].present?
+ candidates = filter_candidates(params)
+ criteria = "- " + params[:q] + " "
+ else
+ criteria = ""
+ candidates = EmployeeProfile.job_seekers
+ end
+ if !candidates.nil? && !candidates.is_a?(Array)
+ candidates = candidates.desc(:updated_at).page(OrbitHelper.page_number).per(OrbitHelper.page_data_count)
+ total_pages = candidates.total_pages
+ else
+ candidates = []
+ total_pages = 0
+ end
+ candidates.each do |candidate|
+ company = !candidate.current_company.nil? && candidate.current_company != "" ? candidate.current_company : candidate.get_current_exp
+ company = "N/A" if company.nil?
+ if candidate.experience_years == 0 && candidate.experience_months == 0
+ wey = t("recruitment.fresher")
+ wem = ""
+ else
+ wey = (candidate.experience_years.to_s rescue "0") + " year(s)"
+ wem = (candidate.experience_months.to_s rescue "0") + " month(s)"
+ end
+ data << {
+ "name" => candidate.recruit_profile.name,
+ "designation" => candidate.desired_job_title,
+ "company_name" => company,
+ "location" => candidate.desired_place,
+ "url_to_show" => OrbitHelper.url_to_show(candidate.recruit_profile.to_param),
+ "work_experience_years" => wey,
+ "work_experience_months" => wem,
+ "introduction" => candidate.introduction,
+ "skills" => candidate.skills.collect{|skill| {"skill-tag" => skill}},
+ "avatar" => candidate.get_avatar
+ }
+ end
+ {
+ "candidates" => data,
+ "extras" => {
+ "criteria" => criteria
+ },
+ "total_pages" => total_pages
+ }
+ end
+
+ def load_jobs(params)
+ jobs = []
if params[:type].present? && params[:type] == "aq"
rjobs = advanced_filter_jobs(params)
criteria = "- "
@@ -60,6 +119,26 @@ class RecruitmentsController < PseudoSessionController
def show
params = OrbitHelper.params
+ if params[:page_id] == "jobs"
+ show_job(params)
+ elsif params[:page_id] == "candidates"
+ show_candidate(params)
+ end
+ end
+
+ def get_show_type
+ {
+ "type" => OrbitHelper.params[:page_id]
+ }
+ end
+
+ def show_candidate(params)
+ {
+ "data" => {}
+ }
+ end
+
+ def show_job(params)
job = RecruitmentJob.where(:uid => params[:uid]).first
profile = job.employer_profile
infos = []
@@ -161,12 +240,58 @@ class RecruitmentsController < PseudoSessionController
def createprofile
profile = RecruitProfile.create(profile_params)
- redirect_to mydashboard_path
+ if profile.is_employer?
+ redirect_to mydashboard_path
+ elsif profile.is_employee?
+ if params[:commit] == "Next" && params[:step] == "step1"
+ redirect_to employee_academics_path
+ elsif params[:commit] == "Save"
+ redirect_to mydashboard_path
+ end
+ end
+ end
+
+ def employee_academics
+ @academic = EmployeeAcademic.new
+ @academics = @profile.profile.employee_academics
+ @academic_types = ["type1","type2","type3","type4"].collect{|t| [t("recruitment.academic_type.#{t}"), t]}
+ end
+
+ def edit_employee_academic
+ @academic = EmployeeAcademic.find(params[:id])
+ @academic_types = ["type1","type2","type3","type4"].collect{|t| [t("recruitment.academic_type.#{t}"), t]}
+ end
+
+ def update_academic
+ academic = EmployeeAcademic.find(params[:id])
+ academic.update_attributes(employee_academic_params)
+ redirect_to employee_academics_path
+ end
+
+ def create_academic
+ if params[:commit] == "Add"
+ academic = EmployeeAcademic.create(employee_academic_params)
+ redirect_to employee_academics_path
+ elsif params[:commit] = "Next"
+ if params[:employee_academic][:degree_name].present?
+ academic = EmployeeAcademic.create(employee_academic_params)
+ end
+ redirect_to employee_portfolio_path
+ end
+ end
+
+
+ def employee_portfolio
end
def recruitment_dashboard
- @jobsposted = @profile.profile.recruitment_jobs.desc(:created_at)
- @page = "/#{I18n.locale.to_s}" + Page.where(:module => "recruitment").first.url rescue "#"
+ if @profile.is_employer?
+ @jobsposted = @profile.profile.recruitment_jobs.desc(:created_at)
+ @page = "/#{I18n.locale.to_s}" + Page.where(:module => "recruitment").first.url rescue "#"
+ elsif @profile.is_employee?
+ @applications = @profile.profile.employee_job_applications.desc(:created_at)
+ @page = "/#{I18n.locale.to_s}" + Page.where(:module => "recruitment").first.url rescue "#"
+ end
end
def editprofile
@@ -174,7 +299,46 @@ class RecruitmentsController < PseudoSessionController
def updateprofile
@profile.update_attributes(profile_params)
- redirect_to mydashboard_path
+ if @profile.is_employer?
+ redirect_to mydashboard_path
+ elsif @profile.is_employee?
+ if params[:commit] == "Next"
+ if params[:step] == "step3"
+ redirect_to employee_experience_path
+ elsif params[:step] == "step1"
+ redirect_to employee_academics_path
+ end
+ elsif params[:commit] == "Save"
+ redirect_to mydashboard_path
+ end
+ end
+ end
+
+ def employee_experience
+ @exeperiences = @profile.employee_profile.employee_experiences.desc(:created_at)
+ @experience = EmployeeExperience.new
+ end
+
+ def create_experience
+ if params[:commit] == "Add"
+ academic = EmployeeExperience.create(employee_exp_params)
+ redirect_to employee_experience_path
+ elsif params[:commit] = "Finish"
+ if params[:employee_experience][:job_title].present? || params[:employee_experience][:company_name].present?
+ academic = EmployeeExperience.create(employee_exp_params)
+ end
+ redirect_to mydashboard_path
+ end
+ end
+
+ def edit_employee_experience
+ @experience = EmployeeExperience.find(params[:id])
+ end
+
+ def update_exmployee_experience
+ experience = EmployeeExperience.find(params[:id])
+ experience.update_attributes(employee_exp_params)
+ redirect_to employee_experience_path
end
def addjob
@@ -281,6 +445,12 @@ class RecruitmentsController < PseudoSessionController
rjobs
end
+ def filter_candidates
+ end
+
+ def advanced_filter_candidates
+ end
+
def get_layout
"recruit"
end
@@ -290,7 +460,20 @@ class RecruitmentsController < PseudoSessionController
end
def profile_params
- params.require(:recruit_profile).permit!
+ par = params.require(:recruit_profile).permit!
+ if par[:employee_profile_attributes][:skills].present?
+ par[:employee_profile_attributes][:skills] = par[:employee_profile_attributes][:skills].split(",")
+ par[:employee_profile_attributes][:skills].collect!{|sk| sk.strip}
+ end
+ par
+ end
+
+ def employee_academic_params
+ params.require(:employee_academic).permit!
+ end
+
+ def employee_exp_params
+ params.require(:employee_experience).permit!
end
def recruitment_job_params
diff --git a/app/models/employee_academic.rb b/app/models/employee_academic.rb
new file mode 100644
index 0000000..6f486f1
--- /dev/null
+++ b/app/models/employee_academic.rb
@@ -0,0 +1,12 @@
+class EmployeeAcademic
+ include Mongoid::Document
+ include Mongoid::Timestamps
+
+ field :academic_type #type1 -> bachelors, type2 -> masters, type3 -> phd, type4 -> course
+ field :degree_name, localize: true
+ field :start_date, type: DateTime
+ field :end_date, type: DateTime
+ field :note, localize: true
+
+ belongs_to :employee_profile
+end
\ No newline at end of file
diff --git a/app/models/employee_experience.rb b/app/models/employee_experience.rb
new file mode 100644
index 0000000..8590083
--- /dev/null
+++ b/app/models/employee_experience.rb
@@ -0,0 +1,14 @@
+class EmployeeExperience
+ include Mongoid::Document
+ include Mongoid::Timestamps
+
+ field :company_name, localize: true
+ field :job_title, localize: true
+ field :responsibilities, localize: true
+ field :start_date, type: DateTime
+ field :end_date, type: DateTime
+
+ belongs_to :employee_profile
+
+
+end
\ No newline at end of file
diff --git a/app/models/employee_job_application.rb b/app/models/employee_job_application.rb
new file mode 100644
index 0000000..fc300fd
--- /dev/null
+++ b/app/models/employee_job_application.rb
@@ -0,0 +1,12 @@
+class EmployeeJobApplication
+ include Mongoid::Document
+ include Mongoid::Timestamps
+
+ field :job
+
+ belongs_to :employee_profile
+
+ def get_job
+ RecruitmentJob.find(self.job) rescue nil
+ end
+end
\ No newline at end of file
diff --git a/app/models/employee_profile.rb b/app/models/employee_profile.rb
index ebc44a6..3bf0d6e 100644
--- a/app/models/employee_profile.rb
+++ b/app/models/employee_profile.rb
@@ -2,5 +2,55 @@ class EmployeeProfile
include Mongoid::Document
include Mongoid::Timestamps
+ # personal info
+ mount_uploader :avatar, ImageUploader
+
+ field :gender #type1 -> male, type2 -> female, type3 -> other
+ field :dob, type: DateTime
+ field :marital_status #type1 -> unmarried, type2 -> married
+ field :phone_number
+ field :country_code
+ field :website
+ field :address, localize: true
+ field :autobiography, localize: true
+ field :employment_status #type1 -> employed, type2 -> unemployed
+ field :active, type: Boolean, :default => true
+
+ # job info
+ field :desired_job_title, localize: true
+ field :current_company, localize: true
+ field :resume_content, localize: true
+ field :desired_place
+ field :working_time #type1 -> day shift type2 -> night shift
+ field :skills, type: Array, :default => []
+ field :languages
+ field :recommendation1_info
+ field :recommendation2_info
+ field :experience_years, type: Integer, :default => 0
+ field :experience_months, type: Integer, :default => 0
+ field :introduction, localize: true
+
+ mount_uploader :resume, AssetUploader
+
+
+
belongs_to :recruit_profile
+
+ has_many :employee_academics
+ has_many :employee_experiences
+ has_many :employee_job_applications
+
+ scope :job_seekers, ->{where(:active => true)}
+
+ def get_avatar
+ if self.avatar.url.nil?
+ return "/assets/person.png"
+ else
+ return self.avatar.url
+ end
+ end
+
+ def get_current_exp
+ self.employee_experiences.where(:end_date => nil).first rescue nil
+ end
end
\ No newline at end of file
diff --git a/app/models/recruit_profile.rb b/app/models/recruit_profile.rb
index 4d2ee6e..2f881a0 100644
--- a/app/models/recruit_profile.rb
+++ b/app/models/recruit_profile.rb
@@ -1,13 +1,14 @@
class RecruitProfile
include Mongoid::Document
include Mongoid::Timestamps
+ include Slug
EMPLOYEE=1
EMPLOYER=2
field :pseudo_member_id
field :email
- field :first_name
+ field :first_name, as: :slug_title
field :last_name
field :user_type, type: Integer, default: 1
diff --git a/app/views/recruitments/_dashboard_header.html.erb b/app/views/recruitments/_dashboard_header.html.erb
index d15bd93..a5a4a44 100644
--- a/app/views/recruitments/_dashboard_header.html.erb
+++ b/app/views/recruitments/_dashboard_header.html.erb
@@ -1,9 +1,17 @@
Welcome <%= @profile.name %> !
-<% if params[:action] == "recruitment_dashboard" %>
+<% if params[:action] == "recruitment_dashboard" && @profile.is_employer? %>
diff --git a/app/views/recruitments/_employee_academic_form.html.erb b/app/views/recruitments/_employee_academic_form.html.erb
new file mode 100644
index 0000000..eab8fae
--- /dev/null
+++ b/app/views/recruitments/_employee_academic_form.html.erb
@@ -0,0 +1,56 @@
+
+
+
+
+
+
+
+
+
+
+ <% @site_in_use_locales.each_with_index do |locale, i| %>
+
+ <%= t(locale) %>
+
+ <% end %>
+
+
+
+ <% @site_in_use_locales.each_with_index do |locale, i| %>
+
">
+
+ <%= f.fields_for :degree_name_translations do |fe| %>
+
+ <% end %>
+
+ <%= f.fields_for :note_translations do |fe| %>
+
+ <% end %>
+
+ <% end %>
+
\ No newline at end of file
diff --git a/app/views/recruitments/_employee_dashboard.html.erb b/app/views/recruitments/_employee_dashboard.html.erb
new file mode 100644
index 0000000..56704aa
--- /dev/null
+++ b/app/views/recruitments/_employee_dashboard.html.erb
@@ -0,0 +1,23 @@
+
+
+
+ Job Title
+ Company Name
+ Applied Date
+
+
+
+ <% if @applications.blank? %>
+ No jobs applied.
+ <% else %>
+ <% @applications.each do |app| %>
+ <% job = app.get_job %>
+
+ " target="_blank"><%= job.job_title %>
+ <%= job.employer_profile.company_name %>
+ <%= app.created_at.strftime("%d %B %Y") %>
+
+ <% end %>
+ <% end %>
+
+
\ No newline at end of file
diff --git a/app/views/recruitments/_employee_experience_form.html.erb b/app/views/recruitments/_employee_experience_form.html.erb
new file mode 100644
index 0000000..9036dd9
--- /dev/null
+++ b/app/views/recruitments/_employee_experience_form.html.erb
@@ -0,0 +1,61 @@
+
+ <% @site_in_use_locales.each_with_index do |locale, i| %>
+
+ <%= t(locale) %>
+
+ <% end %>
+
+
+
+ <% @site_in_use_locales.each_with_index do |locale, i| %>
+
">
+
+ <%= f.fields_for :company_name_translations do |fe| %>
+
+ <% end %>
+
+
+ <%= f.fields_for :job_title_translations do |fe| %>
+
+ <% end %>
+
+ <%= f.fields_for :responsibilities_translations do |fe| %>
+
+ <% end %>
+
+ <% end %>
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/views/recruitments/_employee_form.html.erb b/app/views/recruitments/_employee_form.html.erb
new file mode 100644
index 0000000..613c663
--- /dev/null
+++ b/app/views/recruitments/_employee_form.html.erb
@@ -0,0 +1,199 @@
+<%# content_for :page_specific_css do %>
+ <%= stylesheet_link_tag "lib/main-forms" %>
+ <%= stylesheet_link_tag "lib/fileupload" %>
+ <%= stylesheet_link_tag "lib/main-list" %>
+<%# end %>
+<%# content_for :page_specific_javascript do %>
+ <%= javascript_include_tag "lib/bootstrap-datetimepicker" %>
+ <%= javascript_include_tag "lib/datetimepicker/datetimepicker.js" %>
+ <%= javascript_include_tag "lib/bootstrap-fileupload" %>
+ <%= javascript_include_tag "lib/file-type" %>
+<%# end %>
+
+
+
+<%= f.fields_for :employee_profile do |fe| %>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+<% end %>
+
+ <% @site_in_use_locales.each_with_index do |locale, i| %>
+
+ <%= t(locale) %>
+
+ <% end %>
+
+
+
+ <% @site_in_use_locales.each_with_index do |locale, i| %>
+
">
+ <%= f.fields_for :employee_profile do |fe| %>
+
+ <%= fe.fields_for :address_translations do |fe| %>
+
+ <% end %>
+
+ <%= fe.fields_for :autobiography_translations do |fe| %>
+
+ <% end %>
+ <% end %>
+
+ <% end %>
+
+
\ No newline at end of file
diff --git a/app/views/recruitments/_employer_dashboard.html.erb b/app/views/recruitments/_employer_dashboard.html.erb
new file mode 100644
index 0000000..8e271b9
--- /dev/null
+++ b/app/views/recruitments/_employer_dashboard.html.erb
@@ -0,0 +1,37 @@
+
+
+
+ Job Title
+ Job Posted
+ Position Filled
+ Applied Candidates
+ Actions
+
+
+
+ <% if @jobsposted.blank? %>
+ No jobs posted.
+ <% else %>
+ <% @jobsposted.each do |job| %>
+
+ " target="_blank"><%= job.job_title %>
+ <%= job.created_at.strftime("%Y-%m-%d") %>
+ <%= job.filled ? "Yes" : "No" %>
+ Show
+
+ Edit
+ <% if !job.filled %>
+ Mark Filled
+ <% else %>
+ Not Filled
+ <% end %>
+ Delete
+
+
+ <% end %>
+ <% end %>
+
+
+
\ No newline at end of file
diff --git a/app/views/recruitments/_employer_form.html.erb b/app/views/recruitments/_employer_form.html.erb
index 04c33f8..ea6bb9b 100644
--- a/app/views/recruitments/_employer_form.html.erb
+++ b/app/views/recruitments/_employer_form.html.erb
@@ -7,6 +7,18 @@
<%= javascript_include_tag "lib/bootstrap-fileupload" %>
<%= javascript_include_tag "lib/file-type" %>
<%# end %>
+
+
+
+
+
<% @site_in_use_locales.each_with_index do |locale, i| %>
diff --git a/app/views/recruitments/edit_employee_academic.html.erb b/app/views/recruitments/edit_employee_academic.html.erb
new file mode 100644
index 0000000..3cdbbfd
--- /dev/null
+++ b/app/views/recruitments/edit_employee_academic.html.erb
@@ -0,0 +1,65 @@
+<%# content_for :page_specific_css do %>
+ <%= stylesheet_link_tag "lib/main-forms" %>
+ <%= stylesheet_link_tag "lib/fileupload" %>
+ <%= stylesheet_link_tag "lib/main-list" %>
+<%# end %>
+<%# content_for :page_specific_javascript do %>
+ <%= javascript_include_tag "lib/bootstrap-datetimepicker" %>
+ <%= javascript_include_tag "lib/datetimepicker/datetimepicker.js" %>
+ <%= javascript_include_tag "lib/bootstrap-fileupload" %>
+ <%= javascript_include_tag "lib/file-type" %>
+<%# end %>
+
+
+
+<%= form_for @academic, :url => "/recruit/#{@academic.id.to_s}/update_academic", :html => {:class => "form-horizontal"} do |f| %>
+ <%= render :partial => "employee_academic_form", locals: {f: f} %>
+
+<% end %>
+
+
+
diff --git a/app/views/recruitments/edit_employee_experience.html.erb b/app/views/recruitments/edit_employee_experience.html.erb
new file mode 100644
index 0000000..0dcaf73
--- /dev/null
+++ b/app/views/recruitments/edit_employee_experience.html.erb
@@ -0,0 +1,65 @@
+<%# content_for :page_specific_css do %>
+ <%= stylesheet_link_tag "lib/main-forms" %>
+ <%= stylesheet_link_tag "lib/fileupload" %>
+ <%= stylesheet_link_tag "lib/main-list" %>
+<%# end %>
+<%# content_for :page_specific_javascript do %>
+ <%= javascript_include_tag "lib/bootstrap-datetimepicker" %>
+ <%= javascript_include_tag "lib/datetimepicker/datetimepicker.js" %>
+ <%= javascript_include_tag "lib/bootstrap-fileupload" %>
+ <%= javascript_include_tag "lib/file-type" %>
+<%# end %>
+
+
+
+<%= form_for @experience, :url => "/recruit/#{@experience.id.to_s}/update_exmployee_experience", :html => {:class => "form-horizontal"} do |f| %>
+ <%= render :partial => "employee_experience_form", locals: {f: f} %>
+
+<% end %>
+
+
+
diff --git a/app/views/recruitments/employee_academics.html.erb b/app/views/recruitments/employee_academics.html.erb
new file mode 100644
index 0000000..e758270
--- /dev/null
+++ b/app/views/recruitments/employee_academics.html.erb
@@ -0,0 +1,118 @@
+<%# content_for :page_specific_css do %>
+ <%= stylesheet_link_tag "lib/main-forms" %>
+ <%= stylesheet_link_tag "lib/fileupload" %>
+ <%= stylesheet_link_tag "lib/main-list" %>
+<%# end %>
+<%# content_for :page_specific_javascript do %>
+ <%= javascript_include_tag "lib/bootstrap-datetimepicker" %>
+ <%= javascript_include_tag "lib/datetimepicker/datetimepicker.js" %>
+ <%= javascript_include_tag "lib/bootstrap-fileupload" %>
+ <%= javascript_include_tag "lib/file-type" %>
+<%# end %>
+
+
+ <%= render :partial => "dashboard_header" %>
+
+
+ <% @academics.each do |academic| %>
+
+
+ <% end %>
+ <%= form_for @academic, :url => create_academic_path, :html => {:class => "form-horizontal", :id => "new-academics-form"} do |f| %>
+ <%= render :partial => "employee_academic_form", locals: {f: f} %>
+
+ <% end %>
+
+
+
+
+
diff --git a/app/views/recruitments/employee_experience.html.erb b/app/views/recruitments/employee_experience.html.erb
new file mode 100644
index 0000000..4622fda
--- /dev/null
+++ b/app/views/recruitments/employee_experience.html.erb
@@ -0,0 +1,118 @@
+<%# content_for :page_specific_css do %>
+ <%= stylesheet_link_tag "lib/main-forms" %>
+ <%= stylesheet_link_tag "lib/fileupload" %>
+ <%= stylesheet_link_tag "lib/main-list" %>
+<%# end %>
+<%# content_for :page_specific_javascript do %>
+ <%= javascript_include_tag "lib/bootstrap-datetimepicker" %>
+ <%= javascript_include_tag "lib/datetimepicker/datetimepicker.js" %>
+ <%= javascript_include_tag "lib/bootstrap-fileupload" %>
+ <%= javascript_include_tag "lib/file-type" %>
+<%# end %>
+
+
+ <%= render :partial => "dashboard_header" %>
+
+
+<% @exeperiences.each do |exp| %>
+
+
+<% end %>
+<%= form_for @experience, :url => create_experience_path, :html => {:class => "form-horizontal", :id => "new-exp-form"} do |f| %>
+ <%= render :partial => "employee_experience_form", locals: {f: f} %>
+
+<% end %>
+
+
+
+
+
diff --git a/app/views/recruitments/employee_portfolio.html.erb b/app/views/recruitments/employee_portfolio.html.erb
new file mode 100644
index 0000000..75f20d0
--- /dev/null
+++ b/app/views/recruitments/employee_portfolio.html.erb
@@ -0,0 +1,196 @@
+ <%= stylesheet_link_tag "lib/main-forms" %>
+ <%= stylesheet_link_tag "lib/fileupload" %>
+ <%= stylesheet_link_tag "lib/main-list" %>
+<%# end %>
+<%# content_for :page_specific_javascript do %>
+ <%= javascript_include_tag "lib/bootstrap-datetimepicker" %>
+ <%= javascript_include_tag "lib/datetimepicker/datetimepicker.js" %>
+ <%= javascript_include_tag "lib/bootstrap-fileupload" %>
+ <%= javascript_include_tag "lib/file-type" %>
+<%# end %>
+
+
+ <%= render :partial => "dashboard_header" %>
+
+
+<%= form_for @profile, url: {:action => "updateprofile"}, html: {:class => "form-horizontal main-forms"} do |f| %>
+
+
+ <% @site_in_use_locales.each_with_index do |locale, i| %>
+
+ <%= t(locale) %>
+
+ <% end %>
+
+
+
+ <% @site_in_use_locales.each_with_index do |locale, i| %>
+
">
+ <%= f.fields_for :employee_profile do |fe| %>
+
+ <%= fe.fields_for :desired_job_title_translations do |fe| %>
+
+ <% end %>
+ <%= fe.fields_for :current_company_translations do |fe| %>
+
+ <% end %>
+ <%= fe.fields_for :introduction_translations do |fe| %>
+
+ <% end %>
+ <%= fe.fields_for :resume_content_translations do |fe| %>
+
+ <% end %>
+ <% end %>
+
+ <% end %>
+
+
+ <%= f.fields_for :employee_profile do |fe| %>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <% if !@profile.employee_profile.resume.nil? && !@profile.employee_profile.resume.url.nil? %>
+
+ <% end %>
+
+
+
+
+
+ <% end %>
+
+
+<% end %>
+
\ No newline at end of file
diff --git a/app/views/recruitments/recruitment_dashboard.html.erb b/app/views/recruitments/recruitment_dashboard.html.erb
index 9c39fa8..1143bb1 100644
--- a/app/views/recruitments/recruitment_dashboard.html.erb
+++ b/app/views/recruitments/recruitment_dashboard.html.erb
@@ -1,41 +1,9 @@
<%= csrf_meta_tag %>
<%= render :partial => "dashboard_header" %>
-
-
-
- Job Title
- Job Posted
- Position Filled
- Applied Candidates
- Actions
-
-
-
- <% if @jobsposted.blank? %>
- No jobs posted.
- <% else %>
- <% @jobsposted.each do |job| %>
-
- " target="_blank"><%= job.job_title %>
- <%= job.created_at.strftime("%Y-%m-%d") %>
- <%= job.filled ? "Yes" : "No" %>
- Show
-
- Edit
- <% if !job.filled %>
- Mark Filled
- <% else %>
- Not Filled
- <% end %>
- Delete
-
-
- <% end %>
- <% end %>
-
-
-
+ <% if @profile.is_employer? %>
+ <%= render :partial => "employer_dashboard" %>
+ <% elsif @profile.is_employee? %>
+ <%= render :partial => "employee_dashboard" %>
+ <% end %>
\ No newline at end of file
diff --git a/app/views/recruitments/show.html.erb b/app/views/recruitments/show.html.erb
index 648b75c..70a060a 100644
--- a/app/views/recruitments/show.html.erb
+++ b/app/views/recruitments/show.html.erb
@@ -1 +1,6 @@
-<%= render_view %>
\ No newline at end of file
+<% data = action_data("get_show_type") %>
+<% if data["type"] == "jobs" %>
+ <%= render_view %>
+<% elsif data["type"] == "candidates" %>
+ <%= render_view("candidate_show") %>
+<% end %>
\ No newline at end of file
diff --git a/config/locales/en.yml b/config/locales/en.yml
index 02b00a8..d9e86cc 100644
--- a/config/locales/en.yml
+++ b/config/locales/en.yml
@@ -53,4 +53,9 @@ en:
type2: Graduate
type3: Foreigner
type4: Internship
- type5: SOHO
\ No newline at end of file
+ type5: SOHO
+ academic_type:
+ type1: Bachelors
+ type2: Masters
+ type3: PhD
+ type4: Certificate Course
\ No newline at end of file
diff --git a/config/routes.rb b/config/routes.rb
index e1fd501..2286c08 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -40,6 +40,15 @@ Rails.application.routes.draw do
get "/:id/unmarkfilled", to: "recruitments#unmarkfilled"
delete "/:id/deletejob", to: "recruitments#deletejob"
get "/advancedform", to: "recruitments#advancedform"
+ get "/employee_academics", to: "recruitments#employee_academics"
+ post "/create_academic", to: "recruitments#create_academic"
+ get "/employee_portfolio", to: "recruitments#employee_portfolio"
+ get "/:id/edit_employee_academic", to: "recruitments#edit_employee_academic"
+ patch "/:id/update_academic", to: "recruitments#update_academic"
+ get "/employee_experience", to: "recruitments#employee_experience"
+ post "/create_experience", to: "recruitments#create_experience"
+ patch "/:id/update_exmployee_experience", to: "recruitments#update_exmployee_experience"
+ get "/:id/edit_employee_experience", to: "recruitments#edit_employee_experience"
end
end
end