Update translations.
This commit is contained in:
parent
8f293afd87
commit
5aaf112325
|
@ -61,7 +61,13 @@ class Admin::SeminarsController < OrbitAdminController
|
||||||
end
|
end
|
||||||
if @seminar.enable_summary_choice
|
if @seminar.enable_summary_choice
|
||||||
@fields << "seminar_signup_contributes.description"
|
@fields << "seminar_signup_contributes.description"
|
||||||
@fields_translations << I18n.t("seminar_signup.description")
|
begin
|
||||||
|
data2 = @seminar.seminar_submission_field_sets.select{|v| v.field_name=='description'}[0]
|
||||||
|
name2 = data2['name'][I18n.locale]
|
||||||
|
@fields_translations << (name2.present? ? name2 : I18n.t("seminar_signup.description"))
|
||||||
|
rescue
|
||||||
|
@fields_translations << I18n.t("seminar_signup.description")
|
||||||
|
end
|
||||||
@fields_values << @seminar.summary_chioices.map.with_index{|v,i| [i.to_s,{I18n.locale=>v}]}.to_h
|
@fields_values << @seminar.summary_chioices.map.with_index{|v,i| [i.to_s,{I18n.locale=>v}]}.to_h
|
||||||
end
|
end
|
||||||
@fields_values = @fields_values.collect.with_index{|fields_values,i| [i, fields_values.values.map{|v| v[I18n.locale]} ] }.to_h
|
@fields_values = @fields_values.collect.with_index{|fields_values,i| [i, fields_values.values.map{|v| v[I18n.locale]} ] }.to_h
|
||||||
|
|
|
@ -15,7 +15,7 @@ class SeminarMain
|
||||||
field :enable_summary_choice, :type => Boolean, :default => false
|
field :enable_summary_choice, :type => Boolean, :default => false
|
||||||
field :summary_chioice_type, :type => String, :default => "checkbox"
|
field :summary_chioice_type, :type => String, :default => "checkbox"
|
||||||
field :summary_chioices, :type => Array, :default => ["A. Energy Conversion","B. Biocatalysis","C. Electrocatalysis",
|
field :summary_chioices, :type => Array, :default => ["A. Energy Conversion","B. Biocatalysis","C. Electrocatalysis",
|
||||||
" D. Photocatalysis","E. Catalytic and Porous Materials",
|
"D. Photocatalysis","E. Catalytic and Porous Materials",
|
||||||
"F. Environmental and Reaction Engineering","G. Industrial Applications",
|
"F. Environmental and Reaction Engineering","G. Industrial Applications",
|
||||||
"H. Student Oral Presentation Contest (in English)","I. Student Poster Competition"
|
"H. Student Oral Presentation Contest (in English)","I. Student Poster Competition"
|
||||||
]
|
]
|
||||||
|
|
|
@ -6,6 +6,15 @@
|
||||||
@seminar = data["seminar"]
|
@seminar = data["seminar"]
|
||||||
@seminar_signup = data["seminar_signup"]
|
@seminar_signup = data["seminar_signup"]
|
||||||
@time_now = data["time_now"]
|
@time_now = data["time_now"]
|
||||||
|
data1 = @seminar.seminar_submission_field_sets.select{|v| v.field_name=='title'}[0]
|
||||||
|
data2 = @seminar.seminar_submission_field_sets.select{|v| v.field_name=='description'}[0]
|
||||||
|
data3 = @seminar.seminar_submission_field_sets.select{|v| v.field_name=='file'}[0]
|
||||||
|
show1 = !(data1.disabled) rescue false
|
||||||
|
show2 = !(data2.disabled) rescue false
|
||||||
|
show3 = !(data3.disabled) rescue false
|
||||||
|
name1 = data1['name'][I18n.locale]
|
||||||
|
name2 = data2['name'][I18n.locale]
|
||||||
|
name3 = data3['name'][I18n.locale]
|
||||||
%>
|
%>
|
||||||
<% if @seminar.contribute_start_date <= @time_now and ( @seminar.contribute_end_date.nil? or @seminar.contribute_end_date+1 >= @time_now ) %>
|
<% if @seminar.contribute_start_date <= @time_now and ( @seminar.contribute_end_date.nil? or @seminar.contribute_end_date+1 >= @time_now ) %>
|
||||||
<% begin %>
|
<% begin %>
|
||||||
|
@ -19,9 +28,15 @@
|
||||||
</caption>
|
</caption>
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th class="col-md-2"><%= t('seminar_signup.file_name') %></th>
|
<% if show1 %>
|
||||||
<th class="col-md-2"><%= t('seminar_signup.file_note') %></th>
|
<th class="col-md-2"><%= name1 %></th>
|
||||||
<th class="col-md-2"><%= t('seminar_signup.files') %></th>
|
<% end %>
|
||||||
|
<% if show2 %>
|
||||||
|
<th class="col-md-2"><%= name2 %></th>
|
||||||
|
<% end %>
|
||||||
|
<% if show3 %>
|
||||||
|
<th class="col-md-2"><%= name3 %></th>
|
||||||
|
<% end %>
|
||||||
<th class="col-md-2"><%= t(:action) %></th>
|
<th class="col-md-2"><%= t(:action) %></th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
|
|
Loading…
Reference in New Issue