This commit is contained in:
rulingcom 2024-01-24 00:29:08 +08:00
parent d33547ffe3
commit 6186fad442
3 changed files with 7 additions and 7 deletions

View File

@ -7,7 +7,7 @@ class PersonalActivitiesController < ApplicationController
title_is_paper_format = false
fields_to_show = page.custom_array_field rescue []
if fields_to_show.blank?
fields_to_show = ["year", "publish_date", "start_date", "end_date", "activity_name", "work_title", "activity_organizer", "activity_co_organizer", "region", "road_show", "tour_details", "award_name", "awarding_unit", "authors_type"]
fields_to_show = ["year", "publish_date", "start_date", "end_date", "activity_name", "work_title", "authors_type", "activity_organizer", "activity_co_organizer", "region", "road_show", "tour_details", "award_name", "awarding_unit"]
end
if params[:keywords].present?
activities = filter_keywords(activities,params[:selectbox],params[:keywords])
@ -17,7 +17,7 @@ class PersonalActivitiesController < ApplicationController
{'jps' => fields_to_show.map{|field| {"value"=> get_display_field(activity,field, title_is_paper_format)}}}
end
extras = {"th-year" => I18n.t("personal_activity.year"), "th-publish_date" => I18n.t("personal_activity.publish_date"), "th-start_date" => I18n.t("personal_activity.start_date"), "th-end_date" => I18n.t("personal_activity.end_date"), "th-activity_name" => I18n.t("personal_activity.activity_name"), "th-work_title" => I18n.t("personal_activity.work_title"), "th-activity_organizer" => I18n.t("personal_activity.activity_organizer"), "th-activity_co_organizer" => I18n.t("personal_activity.activity_co_organizer"), "th-region" => I18n.t("personal_activity.region"), "th-road_show" => I18n.t("personal_activity.road_show"), "th-tour_details" => I18n.t("personal_activity.tour_details"), "th-award_name" => I18n.t("personal_activity.award_name"), "th-awarding_unit" => I18n.t("personal_activity.awarding_unit"), "th-authors_type" => I18n.t("personal_activity.authors_type")}
extras = {"th-year" => I18n.t("personal_activity.year"), "th-publish_date" => I18n.t("personal_activity.publish_date"), "th-start_date" => I18n.t("personal_activity.start_date"), "th-end_date" => I18n.t("personal_activity.end_date"), "th-activity_name" => I18n.t("personal_activity.activity_name"), "th-work_title" => I18n.t("personal_activity.work_title"), "th-authors_type" => I18n.t("personal_activity.authors_type"), "th-activity_organizer" => I18n.t("personal_activity.activity_organizer"), "th-activity_co_organizer" => I18n.t("personal_activity.activity_co_organizer"), "th-region" => I18n.t("personal_activity.region"), "th-road_show" => I18n.t("personal_activity.road_show"), "th-tour_details" => I18n.t("personal_activity.tour_details"), "th-award_name" => I18n.t("personal_activity.award_name"), "th-awarding_unit" => I18n.t("personal_activity.awarding_unit")}
choice_show = []
headers = []
fields_to_show.each do |fs|
@ -62,7 +62,7 @@ class PersonalActivitiesController < ApplicationController
def show
params = OrbitHelper.params
plugin = Activity.where(:is_hidden=>false).find_by(uid: params[:uid].to_s)
fields_to_show = ["year", "publish_date", "start_date", "end_date", "activity_name", "work_title", "authors", "activity_organizer", "activity_co_organizer", "region", "road_show", "tour_details", "award_name", "awarding_unit", "authors_type"]
fields_to_show = ["year", "publish_date", "start_date", "end_date", "activity_name", "work_title", "authors_type", "authors", "activity_organizer", "activity_co_organizer", "region", "road_show", "tour_details", "award_name", "awarding_unit"]
{"plugin_datas"=>plugin.get_plugin_data(fields_to_show)}
end
@ -121,7 +121,7 @@ class PersonalActivitiesController < ApplicationController
@fields_to_show = ["year", "publish_date", "start_date", "end_date", "activity_name", "work_title", "authors_type", "activity_organizer", "activity_co_organizer", "region", "road_show", "tour_details", "award_name", "awarding_unit"]
@fields_to_show = @fields_to_show.map { |fs| [t("personal_activity.#{fs}"), fs] }
if @page.present? && @page.custom_string_field == 'table'
@default_fields_to_show = ["year", "publish_date", "start_date", "end_date", "activity_name", "work_title", "activity_organizer", "activity_co_organizer", "region", "road_show", "tour_details", "award_name", "awarding_unit", "authors_type"]
@default_fields_to_show = ["year", "publish_date", "start_date", "end_date", "activity_name", "work_title", "authors_type", "activity_organizer", "activity_co_organizer", "region", "road_show", "tour_details", "award_name", "awarding_unit"]
else
@default_fields_to_show = ["year", "activity_name"]
end

View File

@ -43,7 +43,7 @@ class Activity
if !page.nil? && !page.custom_array_field.blank?
fields_to_show = page.custom_array_field
else
fields_to_show = ["year", "activity_name", "authors_type"]
fields_to_show = ["year", "activity_name"]
end
fields_to_remove = []

View File

@ -34,6 +34,7 @@
<th><%= t('personal_activity.end_date') %></th>
<th><%= t('personal_activity.activity_name') %></th>
<th><%= t('personal_activity.work_title') %></th>
<th><%= t('personal_activity.authors_type') %></th>
<th><%= t('personal_activity.activity_organizer') %></th>
<th><%= t('personal_activity.activity_co_organizer') %></th>
<th><%= t('personal_activity.region') %></th>
@ -41,7 +42,6 @@
<th><%= t('personal_activity.tour_details') %></th>
<th><%= t('personal_activity.award_name') %></th>
<th><%= t('personal_activity.awarding_unit') %></th>
<th><%= t('personal_activity.authors_type') %></th>
</tr>
</thead>
<tbody>
@ -66,6 +66,7 @@
</div>
</td>
<td><%= activity.work_title %></td>
<td><%= activity.authors_type %></td>
<td><%= activity.activity_organizer %></td>
<td><%= activity.activity_co_organizer %></td>
<td><%= activity.region %></td>
@ -73,7 +74,6 @@
<td><%= activity.tour_details %></td>
<td><%= activity.award_name %></td>
<td><%= activity.awarding_unit %></td>
<td><%= activity.authors_type %></td>
</tr>
<% end %>
</tbody>