diff --git a/app/controllers/personal_activities_controller.rb b/app/controllers/personal_activities_controller.rb index 3eb3b55..4df89ea 100644 --- a/app/controllers/personal_activities_controller.rb +++ b/app/controllers/personal_activities_controller.rb @@ -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 diff --git a/app/models/activity.rb b/app/models/activity.rb index 8deccf8..50d3a66 100644 --- a/app/models/activity.rb +++ b/app/models/activity.rb @@ -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 = [] diff --git a/app/views/plugin/personal_activity/_profile.html.erb b/app/views/plugin/personal_activity/_profile.html.erb index 62db030..fec1ff9 100644 --- a/app/views/plugin/personal_activity/_profile.html.erb +++ b/app/views/plugin/personal_activity/_profile.html.erb @@ -34,6 +34,7 @@ <%= t('personal_activity.end_date') %> <%= t('personal_activity.activity_name') %> <%= t('personal_activity.work_title') %> + <%= t('personal_activity.authors_type') %> <%= t('personal_activity.activity_organizer') %> <%= t('personal_activity.activity_co_organizer') %> <%= t('personal_activity.region') %> @@ -41,7 +42,6 @@ <%= t('personal_activity.tour_details') %> <%= t('personal_activity.award_name') %> <%= t('personal_activity.awarding_unit') %> - <%= t('personal_activity.authors_type') %> @@ -66,6 +66,7 @@ <%= activity.work_title %> + <%= activity.authors_type %> <%= activity.activity_organizer %> <%= activity.activity_co_organizer %> <%= activity.region %> @@ -73,7 +74,6 @@ <%= activity.tour_details %> <%= activity.award_name %> <%= activity.awarding_unit %> - <%= activity.authors_type %> <% end %>