Update fields and fix bugs
This commit is contained in:
parent
4de1fba4fd
commit
b10d4153a1
|
@ -24,8 +24,8 @@ class Admin::WritingConferencesController < OrbitMemberController
|
|||
end
|
||||
|
||||
def edit
|
||||
@member = MemberProfile.find_by(:uid=>params['uid']) rescue nil
|
||||
@writing_conference = WritingConference.find(params[:id])
|
||||
@member = @writing_conference.member_profile
|
||||
end
|
||||
|
||||
def update
|
||||
|
|
|
@ -30,7 +30,9 @@ class PersonalConferencesController < ApplicationController
|
|||
"conference_title",
|
||||
"paper_level",
|
||||
"paper_type",
|
||||
"author_name",
|
||||
"authors",
|
||||
"number_of_authors",
|
||||
"author_type",
|
||||
"year",
|
||||
"language",
|
||||
|
|
|
@ -25,6 +25,7 @@ class WritingConference
|
|||
field :update_user_id, :type => BSON::ObjectId
|
||||
field :isbn
|
||||
field :isi_number
|
||||
field :number_of_authors
|
||||
field :rss2_id
|
||||
|
||||
belongs_to :member_profile
|
||||
|
@ -73,6 +74,14 @@ class WritingConference
|
|||
value = self.conference_author_types.collect{|type| type.title}.join(',') rescue ""
|
||||
when "paper_type"
|
||||
value = self.conference_paper_types.collect{|type| type.title}.join(',') rescue ""
|
||||
when "author_name"
|
||||
value = []
|
||||
([I18n.locale]+(Site.first.in_use_locales-[I18n.locale])).each do |locale|
|
||||
if self.member_profile.first_name_translations[locale] || self.member_profile.last_name_translations[locale]
|
||||
value << "#{self.member_profile.first_name_translations[locale]} #{self.member_profile.last_name_translations[locale]}"
|
||||
end
|
||||
end
|
||||
value = value.join(" / ")
|
||||
when "publication_date"
|
||||
value = self.publication_date.to_date.strftime("%Y-%m-%d") rescue ""
|
||||
when "language"
|
||||
|
|
|
@ -91,11 +91,19 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<!-- number_of_authors -->
|
||||
<div class="control-group">
|
||||
<label class="control-label muted"><%= t("personal_conference.number_of_authors") %></label>
|
||||
<div class="controls">
|
||||
<%= f.text_field :number_of_authors, :class=>'span1' %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- period_start_date -->
|
||||
<div class="control-group">
|
||||
<label class="control-label muted"><%= t("personal_conference.period_start_date") %></label>
|
||||
<div class="controls">
|
||||
<%= f.datetime_picker :period_start_date, :no_label => true, :format=>"yyyy/MM/dd" %>
|
||||
<%= f.datetime_picker :period_start_date, :no_label => true, :format=>"yyyy/MM/dd", :placeholder=>"YYYY/MM/DD" %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -103,7 +111,7 @@
|
|||
<div class="control-group">
|
||||
<label class="control-label muted"><%= t("personal_conference.period_end_date") %></label>
|
||||
<div class="controls">
|
||||
<%= f.datetime_picker :period_end_date, :no_label => true, :format=>"yyyy/MM/dd" %>
|
||||
<%= f.datetime_picker :period_end_date, :no_label => true, :format=>"yyyy/MM/dd", :placeholder=>"YYYY/MM/DD" %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -111,7 +119,7 @@
|
|||
<div class="control-group">
|
||||
<label class="control-label muted"><%= t("personal_conference.publication_date") %></label>
|
||||
<div class="controls">
|
||||
<%= f.datetime_picker :publication_date, :no_label => true, :format=>"yyyy/MM/dd" %>
|
||||
<%= f.datetime_picker :publication_date, :no_label => true, :format=>"yyyy/MM/dd", :placeholder=>"YYYY/MM/DD" %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -17,6 +17,8 @@ en:
|
|||
location : "Location"
|
||||
sponsor : "Sponsor"
|
||||
authors : "Authors"
|
||||
author_name: "Author Name"
|
||||
number_of_authors: "Number Of Authors"
|
||||
tags : "Tags"
|
||||
keywords : "Keywords"
|
||||
isbn: "ISSN (ISBN)"
|
||||
|
|
|
@ -10,12 +10,14 @@ zh_tw:
|
|||
paper_level: "論文等級"
|
||||
conference_title : "會議名稱"
|
||||
conference_time: "會議時間"
|
||||
period_start_date : "起"
|
||||
period_end_date : "訖"
|
||||
period_start_date : "會議開始時間"
|
||||
period_end_date : "會議結束時間"
|
||||
duration: "期間"
|
||||
location : "地點"
|
||||
sponsor : "主辦單位"
|
||||
authors : "全部作者"
|
||||
author_name: "作者姓名"
|
||||
number_of_authors: "著作人數"
|
||||
tags : "領域"
|
||||
keywords : "關鍵字"
|
||||
isbn: "ISSN (ISBN)"
|
||||
|
|
Loading…
Reference in New Issue