From 7168ba662fc156500f2e410671b2b8df17832d51 Mon Sep 17 00:00:00 2001 From: Harry Bomrah Date: Fri, 12 Jan 2018 02:51:30 +0800 Subject: [PATCH] added academics and some other changes to recruitments --- app/controllers/recruitments_controller.rb | 17 +++++++++++++++++ .../recruitments/employee_portfolio.html.erb | 16 ---------------- config/locales/en.yml | 1 + config/locales/zh_tw.yml | 1 + 4 files changed, 19 insertions(+), 16 deletions(-) diff --git a/app/controllers/recruitments_controller.rb b/app/controllers/recruitments_controller.rb index 5bc76d8..84e7a60 100644 --- a/app/controllers/recruitments_controller.rb +++ b/app/controllers/recruitments_controller.rb @@ -145,6 +145,7 @@ class RecruitmentsController < PseudoSessionController else phone = !profile.country_code.nil? ? "+" + profile.country_code + " - " + profile.phone_number : profile.phone_number end + skills = [] skills = profile.skills.collect{|skill| {"skill-name" => skill}} if !profile.skills.empty? infos = [] ["autobiography", "resume_content"].each do |t| @@ -165,14 +166,30 @@ class RecruitmentsController < PseudoSessionController } end + academics = [] + profile.employee_academics.each do |aca| + if !aca.end_date.nil? + period = aca.start_date.strftime("%Y/%m/%d") + " ~ " + aca.end_date.strftime("%Y/%m/%d") + else + period = aca.start_date.strftime("%Y/%m/%d") + " ~ current" + end + academics << { + "title" => (t("recruitment.academic_type.#{aca.academic_type}") + " " + t("recruitment.in") + " " + aca.degree_name), + "period" => period, + "note" => aca.note + } + end + if profile.experience_years == 0 && profile.experience_months == 0 experience = t("recruitment.fresher") else experience = (profile.experience_years.to_s rescue "0") + " year(s) " + (profile.experience_months.to_s rescue "0") + " month(s)" end + { "skills" => skills, "infos" => infos, + "academics" => academics, "recommendations" => recommendations, "data" => { "name" => rp.name, diff --git a/app/views/recruitments/employee_portfolio.html.erb b/app/views/recruitments/employee_portfolio.html.erb index 39b7777..a6a186e 100644 --- a/app/views/recruitments/employee_portfolio.html.erb +++ b/app/views/recruitments/employee_portfolio.html.erb @@ -140,22 +140,6 @@ - -
- <%= fe.label :recommendation1_info, t("recruitment.recommendation1_info"), :class => "col-sm-2 control-label" %> -
- <%= fe.text_area :recommendation1_info, :rows => 5, :class => "form-control", :placeholder => t("recruitment.recommendation_name_contact") %> -
-
- - -
- <%= fe.label :recommendation2_info, t("recruitment.recommendation2_info"), :class => "col-sm-2 control-label" %> -
- <%= fe.text_area :recommendation2_info, :rows => 5, :class => "form-control", :placeholder => t("recruitment.recommendation_name_contact") %> -
-
- <% if !@profile.employee_profile.resume.nil? && !@profile.employee_profile.resume.url.nil? %>
diff --git a/config/locales/en.yml b/config/locales/en.yml index fb86a11..e701f30 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -2,6 +2,7 @@ en: module_name: recruitment: Recruitment recruitment: + in: in min_qualification: Min Qualification referral_already_recommended: Sorry! You already have written a recommendation for this user. name: Name diff --git a/config/locales/zh_tw.yml b/config/locales/zh_tw.yml index c19a8c8..7543865 100644 --- a/config/locales/zh_tw.yml +++ b/config/locales/zh_tw.yml @@ -2,6 +2,7 @@ zh_tw: module_name: recruitment: 招募 recruitment: + in: in min_qualification: Min Qualification referral_already_recommended: Sorry! You already have written a recommendation for this user. name: Name