Fix render :text and stale event_date placeholders
This commit is contained in:
parent
0856be3afa
commit
1b68a2009c
|
|
@ -84,7 +84,7 @@ class Admin::RecruitmentController < OrbitAdminController
|
||||||
uids = iframe_params['member_ids'].to_a.map{|m_id| MemberProfile.find(m_id).uid rescue nil}.select{|uid| !uid.nil?}
|
uids = iframe_params['member_ids'].to_a.map{|m_id| MemberProfile.find(m_id).uid rescue nil}.select{|uid| !uid.nil?}
|
||||||
url_params = iframe_params.except(:member_ids)
|
url_params = iframe_params.except(:member_ids)
|
||||||
url_params['uids'] = uids if uids != []
|
url_params['uids'] = uids if uids != []
|
||||||
render :text => '/xhr/panel/recruitment/widget/sync_data?'+url_params.to_param
|
render :plain => '/xhr/panel/recruitment/widget/sync_data?'+url_params.to_param
|
||||||
end
|
end
|
||||||
def settings
|
def settings
|
||||||
@setting = @recruitment_setting
|
@setting = @recruitment_setting
|
||||||
|
|
@ -488,7 +488,12 @@ class Admin::RecruitmentController < OrbitAdminController
|
||||||
|
|
||||||
recruitment.is_preview = true
|
recruitment.is_preview = true
|
||||||
recruitment.save
|
recruitment.save
|
||||||
render :text=>page_for_recruitment(recruitment) + "?preview=true"
|
preview_url = page_for_recruitment(recruitment)
|
||||||
|
if preview_url == "/"
|
||||||
|
render :json => { "error" => true, "message" => t("recruitment.no_recruitment_page") }
|
||||||
|
else
|
||||||
|
render :plain=>preview_url + "?preview=true"
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def destroy_preview
|
def destroy_preview
|
||||||
|
|
|
||||||
|
|
@ -759,6 +759,10 @@
|
||||||
processData: false,
|
processData: false,
|
||||||
contentType: false
|
contentType: false
|
||||||
}).done(function(data){
|
}).done(function(data){
|
||||||
|
if(typeof data === "object" && data.error){
|
||||||
|
alert(data.message);
|
||||||
|
return;
|
||||||
|
}
|
||||||
if(window.location.protocol === "https:"){
|
if(window.location.protocol === "https:"){
|
||||||
data = data.replace("http:","https:");
|
data = data.replace("http:","https:");
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,7 @@ en:
|
||||||
recruitment_mod:
|
recruitment_mod:
|
||||||
recruitment_mod: Recruitment
|
recruitment_mod: Recruitment
|
||||||
recruitment:
|
recruitment:
|
||||||
|
no_recruitment_page: "No recruitment page has been set. Please set one first."
|
||||||
carousel_image_types:
|
carousel_image_types:
|
||||||
default: Default
|
default: Default
|
||||||
carousel: Carousel
|
carousel: Carousel
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,7 @@ zh_tw:
|
||||||
recruitment_mod:
|
recruitment_mod:
|
||||||
recruitment_mod: 徵才資訊
|
recruitment_mod: 徵才資訊
|
||||||
recruitment:
|
recruitment:
|
||||||
|
no_recruitment_page: "沒有任何徵才頁面,請先設定一個"
|
||||||
carousel_image_types:
|
carousel_image_types:
|
||||||
default: 預設
|
default: 預設
|
||||||
carousel: 輪播
|
carousel: 輪播
|
||||||
|
|
|
||||||
|
|
@ -130,7 +130,7 @@ module RecruitmentMod
|
||||||
authorizable
|
authorizable
|
||||||
frontend_enabled
|
frontend_enabled
|
||||||
feeds_url "/xhr/recruitment/feeds"
|
feeds_url "/xhr/recruitment/feeds"
|
||||||
feeds_time_field (::RecruitmentHelper.is_postdate_sort_first ? ['postdate', 'event_date'] : ['event_date', 'postdate'])
|
feeds_time_field (::RecruitmentHelper.is_postdate_sort_first ? ['postdate', 'recruitment_date'] : ['recruitment_date', 'postdate'])
|
||||||
data_count 1..30
|
data_count 1..30
|
||||||
begin
|
begin
|
||||||
show_options data
|
show_options data
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
<table class="w-annc__table table">
|
<table class="w-annc__table table">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th class="w-annc__th w-annc__th--date">{{event_date-head}}</th>
|
<th class="w-annc__th w-annc__th--date">{{recruitment_date-head}}</th>
|
||||||
<th class="w-annc__th w-annc__th--title">{{title-head}}</th>
|
<th class="w-annc__th w-annc__th--title">{{title-head}}</th>
|
||||||
<th class="w-annc__th w-annc__th--title">{{subtitle-head}}</th>
|
<th class="w-annc__th w-annc__th--title">{{subtitle-head}}</th>
|
||||||
<th class="w-annc__th w-annc__th--title">{{notes-head}}</th>
|
<th class="w-annc__th w-annc__th--title">{{notes-head}}</th>
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@
|
||||||
</span>
|
</span>
|
||||||
<a class="w-annc__title" href="{{link_to_show}}">{{title-head}}{{title}}</a>
|
<a class="w-annc__title" href="{{link_to_show}}">{{title-head}}{{title}}</a>
|
||||||
</td>
|
</td>
|
||||||
<td style="{{event-time-css}}" class="w-annc__host">{{event_date-head}}{{event-time-formated}}</td>
|
<td style="{{event-time-css}}" class="w-annc__host">{{recruitment_date-head}}{{event-time-formated}}</td>
|
||||||
<td class="w-annc__subtitle">{{subtitle}}</td>
|
<td class="w-annc__subtitle">{{subtitle}}</td>
|
||||||
<td style="{{notes-css}}" class="w-annc__notes">{{notes-head}}{{notes}}</td>
|
<td style="{{notes-css}}" class="w-annc__notes">{{notes-head}}{{notes}}</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
<table class="i-annc__table table table-striped">
|
<table class="i-annc__table table table-striped">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th class="i-annc__th i-annc__th--event_date">{{event_date-head}}</th>
|
<th class="i-annc__th i-annc__th--event_date">{{recruitment_date-head}}</th>
|
||||||
<th class="i-annc__th i-annc__th--title">{{title-head}}</th>
|
<th class="i-annc__th i-annc__th--title">{{title-head}}</th>
|
||||||
<th class="i-annc__th i-annc__th--notes">{{notes-head}}</th>
|
<th class="i-annc__th i-annc__th--notes">{{notes-head}}</th>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th class="i-annc__th i-annc__th--category">{{category-head}}</th>
|
<th class="i-annc__th i-annc__th--category">{{category-head}}</th>
|
||||||
<th class="i-annc__th i-annc__th--event_date">{{event_date-head}}</th>
|
<th class="i-annc__th i-annc__th--event_date">{{recruitment_date-head}}</th>
|
||||||
<th class="i-annc__th i-annc__th--title">{{title-head}}</th>
|
<th class="i-annc__th i-annc__th--title">{{title-head}}</th>
|
||||||
<th class="i-annc__th i-annc__th--view-count">{{view-count-head}}</th>
|
<th class="i-annc__th i-annc__th--view-count">{{view-count-head}}</th>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@
|
||||||
<ul class="s-annc__meta-wrap list-unstyled no-print">
|
<ul class="s-annc__meta-wrap list-unstyled no-print">
|
||||||
<li class="s-annc__date-wrap s-annc__meta--item">
|
<li class="s-annc__date-wrap s-annc__meta--item">
|
||||||
<span style="display: inline-block;{{event-time-css}}">
|
<span style="display: inline-block;{{event-time-css}}">
|
||||||
<span>{{event_date-head}}:</span>
|
<span>{{recruitment_date-head}}:</span>
|
||||||
<span class="s-annc__date" date-format="%Y-%m-%d">{{updated_at}}</span>
|
<span class="s-annc__date" date-format="%Y-%m-%d">{{updated_at}}</span>
|
||||||
</span>
|
</span>
|
||||||
</li>
|
</li>
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@
|
||||||
</li>
|
</li>
|
||||||
<li class="s-annc__date-wrap s-annc__meta--item">
|
<li class="s-annc__date-wrap s-annc__meta--item">
|
||||||
<span style="display: inline-block;{{event-time-css}}">
|
<span style="display: inline-block;{{event-time-css}}">
|
||||||
<span>{{event_date-head}}</span>
|
<span>{{recruitment_date-head}}</span>
|
||||||
<span class="s-annc__date" date-format="%Y-%m-%d">{{updated_at}}</span>
|
<span class="s-annc__date" date-format="%Y-%m-%d">{{updated_at}}</span>
|
||||||
</span>
|
</span>
|
||||||
</li>
|
</li>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue