added courses and changed name and check for login
This commit is contained in:
parent
d20b1cb6bf
commit
68558c166b
|
@ -5,4 +5,15 @@ class Admin::InternationalRecruitsController < OrbitAdminController
|
||||||
@applications = RecruitApplication.all.desc(:created_at).page(params[:page]).per(10)
|
@applications = RecruitApplication.all.desc(:created_at).page(params[:page]).per(10)
|
||||||
end
|
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
|
end
|
|
@ -6,14 +6,16 @@ class InternationalRecruitsController < ApplicationController
|
||||||
countries << [InternationalCountry::LIST[countrykey], countrykey]
|
countries << [InternationalCountry::LIST[countrykey], countrykey]
|
||||||
end
|
end
|
||||||
years = (0..10).collect do |x|
|
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]
|
[t, x]
|
||||||
end
|
end
|
||||||
|
login_url = "/#{I18n.locale.to_s}" + (Page.where(:module => "pseudo_member").first.url rescue "")
|
||||||
{
|
{
|
||||||
"application" => RecruitApplication.new,
|
"application" => RecruitApplication.new,
|
||||||
"countries" => countries,
|
"countries" => countries,
|
||||||
"years" => years,
|
"years" => years,
|
||||||
"member" => session["current_pseudo_user_id"]
|
"member" => session["current_pseudo_user_id"],
|
||||||
|
"login_url" => login_url
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,22 @@
|
||||||
|
<table class="table main-list">
|
||||||
|
<thead>
|
||||||
|
<tr class="sort-header">
|
||||||
|
<% @table_fields.each do |f| %>
|
||||||
|
<%= thead(f) %>
|
||||||
|
<% end %>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<% @courses.each do |course| %>
|
||||||
|
<tr>
|
||||||
|
<td><%= course.course_name %></td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
<% end %>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
<div class="bottomnav clearfix">
|
||||||
|
<div class="pull-right">
|
||||||
|
<a href="" class="btn btn-primary">Add</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
|
@ -18,3 +18,8 @@
|
||||||
<% end %>
|
<% end %>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
<%=
|
||||||
|
content_tag :div, class: "bottomnav clearfix" do
|
||||||
|
content_tag :div, paginate(@applications), class: "pagination pagination-centered"
|
||||||
|
end
|
||||||
|
%>
|
|
@ -4,6 +4,11 @@
|
||||||
data = action_data
|
data = action_data
|
||||||
application = data["application"]
|
application = data["application"]
|
||||||
%>
|
%>
|
||||||
|
<% if data["member"].nil? %>
|
||||||
|
<script type="text/javascript">
|
||||||
|
window.location.href = "<%= data["login_url"] %>";
|
||||||
|
</script>
|
||||||
|
<% end %>
|
||||||
<style media="screen">
|
<style media="screen">
|
||||||
table,tr,td,th{
|
table,tr,td,th{
|
||||||
border: 1px black solid;
|
border: 1px black solid;
|
||||||
|
@ -244,7 +249,7 @@
|
||||||
<tr>
|
<tr>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th>擬申請就讀之系(所)組及擬攻讀何種學位<br>Department or graduate program do you expect to enroll in at NKUHT? And What program do you plan pursue</th>
|
<th>擬申請就讀之系(所)組及擬攻讀何種學位<br>Department or graduate program do you expect to enroll in at TKU? And What program do you plan pursue</th>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
|
@ -254,7 +259,7 @@
|
||||||
<tr>
|
<tr>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th>擬申請就讀之系(所)組及擬攻讀何種學位(第二志願)<br>Department or graduate program do you expect to enroll in at NKUHT? And What program do you plan pursue</th>
|
<th>擬申請就讀之系(所)組及擬攻讀何種學位(第二志願)<br>Department or graduate program do you expect to enroll in at TKU? And What program do you plan pursue</th>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
|
@ -266,7 +271,7 @@
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr></tr>
|
<tr></tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th>擬申請就讀之系(所)組及擬攻讀何種學位(第三志願)<br>Department or graduate program do you expect to enroll in at NKUHT? And What program do you plan pursue</th>
|
<th>擬申請就讀之系(所)組及擬攻讀何種學位(第三志願)<br>Department or graduate program do you expect to enroll in at TKU? And What program do you plan pursue</th>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
|
@ -279,7 +284,7 @@
|
||||||
<table class="apply_form_table" cellpadding="5" cellspacing="0" border="0" width="800">
|
<table class="apply_form_table" cellpadding="5" cellspacing="0" border="0" width="800">
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<th>在台研習期間各項費用來源<br>What are your major financial<br>resources during your study at NKUHT?</th>
|
<th>在台研習期間各項費用來源<br>What are your major financial<br>resources during your study at TKU?</th>
|
||||||
<td colspan="3">
|
<td colspan="3">
|
||||||
<table width="100%" cellpadding="5" cellspacing="0" border="0" style="margin:0 auto;">
|
<table width="100%" cellpadding="5" cellspacing="0" border="0" style="margin:0 auto;">
|
||||||
<tbody>
|
<tbody>
|
||||||
|
|
|
@ -7,3 +7,4 @@ en:
|
||||||
member_name: Member Name
|
member_name: Member Name
|
||||||
submited_date: Submitted Date
|
submited_date: Submitted Date
|
||||||
actions: Actions
|
actions: Actions
|
||||||
|
course_name: Course Name
|
|
@ -7,3 +7,4 @@ zh_tw:
|
||||||
member_name: Member Name
|
member_name: Member Name
|
||||||
submited_date: Submitted Date
|
submited_date: Submitted Date
|
||||||
actions: Actions
|
actions: Actions
|
||||||
|
course_name: Course Name
|
Loading…
Reference in New Issue