diff --git a/app/controllers/admin/international_recruits_controller.rb b/app/controllers/admin/international_recruits_controller.rb index fd0dcee..52e5679 100644 --- a/app/controllers/admin/international_recruits_controller.rb +++ b/app/controllers/admin/international_recruits_controller.rb @@ -5,4 +5,15 @@ class Admin::InternationalRecruitsController < OrbitAdminController @applications = RecruitApplication.all.desc(:created_at).page(params[:page]).per(10) end + def destroy + ra = RecruitApplication.find(params[:id]) + ra.destroy + redirect_to admin_international_recruits_path + end + + def courses + @table_fields = ["international_recruit.course_name", "international_recruit.actions"] + @courses = UniversityCourse.all.asc(:created_at) + end + end \ No newline at end of file diff --git a/app/controllers/international_recruits_controller.rb b/app/controllers/international_recruits_controller.rb index 4c627a4..fd29c95 100644 --- a/app/controllers/international_recruits_controller.rb +++ b/app/controllers/international_recruits_controller.rb @@ -6,14 +6,16 @@ class InternationalRecruitsController < ApplicationController countries << [InternationalCountry::LIST[countrykey], countrykey] end years = (0..10).collect do |x| - t = x == 10 ? x.to_s + " more years" : x.to_s + t = x == 10 ? x.to_s + " plus years" : x.to_s [t, x] end + login_url = "/#{I18n.locale.to_s}" + (Page.where(:module => "pseudo_member").first.url rescue "") { "application" => RecruitApplication.new, "countries" => countries, "years" => years, - "member" => session["current_pseudo_user_id"] + "member" => session["current_pseudo_user_id"], + "login_url" => login_url } end diff --git a/app/views/admin/international_recruits/courses.html.erb b/app/views/admin/international_recruits/courses.html.erb new file mode 100644 index 0000000..81bf936 --- /dev/null +++ b/app/views/admin/international_recruits/courses.html.erb @@ -0,0 +1,22 @@ +
<%= course.course_name %> | ++ |