diff --git a/app/controllers/recruitments_controller.rb b/app/controllers/recruitments_controller.rb index c759c6b..0cec597 100644 --- a/app/controllers/recruitments_controller.rb +++ b/app/controllers/recruitments_controller.rb @@ -140,7 +140,11 @@ class RecruitmentsController < PseudoSessionController def show_candidate(params) rp = RecruitProfile.where(:uid => params[:uid]).first profile = rp.profile - phone = !profile.country_code.nil? ? "+" + profile.country_code + " - " + profile.phone_number : profile.phone_number + if (profile.country_code.nil? || profile.country_code == "") && (profile.phone_number.nil? || profile.phone_number == "") + phone = t("recruitment.not_available") + else + phone = !profile.country_code.nil? ? "+" + profile.country_code + " - " + profile.phone_number : profile.phone_number + end skills = profile.skills.collect{|skill| {"skill-name" => skill}} if !profile.skills.empty? infos = [] ["autobiography", "resume_content", "recommendation1_info", "recommendation2_info"].each do |t| @@ -180,7 +184,7 @@ class RecruitmentsController < PseudoSessionController "language-title" => t("recruitment.language_title"), "language" => profile.languages, "workingtime-title" => t("recruitment.workingtime_title"), - "workingtime" => t("recruitment.working_time.#{profile.working_time}") + "workingtime" => (!profile.working_time.nil? && profile.working_time != "" ? t("recruitment.working_time.#{profile.working_time}") : t("recruitment.not_available")), } } end