Updated.
This commit is contained in:
parent
d33547ffe3
commit
6186fad442
|
@ -7,7 +7,7 @@ class PersonalActivitiesController < ApplicationController
|
||||||
title_is_paper_format = false
|
title_is_paper_format = false
|
||||||
fields_to_show = page.custom_array_field rescue []
|
fields_to_show = page.custom_array_field rescue []
|
||||||
if fields_to_show.blank?
|
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
|
end
|
||||||
if params[:keywords].present?
|
if params[:keywords].present?
|
||||||
activities = filter_keywords(activities,params[:selectbox],params[:keywords])
|
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)}}}
|
{'jps' => fields_to_show.map{|field| {"value"=> get_display_field(activity,field, title_is_paper_format)}}}
|
||||||
end
|
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 = []
|
choice_show = []
|
||||||
headers = []
|
headers = []
|
||||||
fields_to_show.each do |fs|
|
fields_to_show.each do |fs|
|
||||||
|
@ -62,7 +62,7 @@ class PersonalActivitiesController < ApplicationController
|
||||||
def show
|
def show
|
||||||
params = OrbitHelper.params
|
params = OrbitHelper.params
|
||||||
plugin = Activity.where(:is_hidden=>false).find_by(uid: params[:uid].to_s)
|
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)}
|
{"plugin_datas"=>plugin.get_plugin_data(fields_to_show)}
|
||||||
end
|
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 = ["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] }
|
@fields_to_show = @fields_to_show.map { |fs| [t("personal_activity.#{fs}"), fs] }
|
||||||
if @page.present? && @page.custom_string_field == 'table'
|
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
|
else
|
||||||
@default_fields_to_show = ["year", "activity_name"]
|
@default_fields_to_show = ["year", "activity_name"]
|
||||||
end
|
end
|
||||||
|
|
|
@ -43,7 +43,7 @@ class Activity
|
||||||
if !page.nil? && !page.custom_array_field.blank?
|
if !page.nil? && !page.custom_array_field.blank?
|
||||||
fields_to_show = page.custom_array_field
|
fields_to_show = page.custom_array_field
|
||||||
else
|
else
|
||||||
fields_to_show = ["year", "activity_name", "authors_type"]
|
fields_to_show = ["year", "activity_name"]
|
||||||
end
|
end
|
||||||
|
|
||||||
fields_to_remove = []
|
fields_to_remove = []
|
||||||
|
|
|
@ -34,6 +34,7 @@
|
||||||
<th><%= t('personal_activity.end_date') %></th>
|
<th><%= t('personal_activity.end_date') %></th>
|
||||||
<th><%= t('personal_activity.activity_name') %></th>
|
<th><%= t('personal_activity.activity_name') %></th>
|
||||||
<th><%= t('personal_activity.work_title') %></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_organizer') %></th>
|
||||||
<th><%= t('personal_activity.activity_co_organizer') %></th>
|
<th><%= t('personal_activity.activity_co_organizer') %></th>
|
||||||
<th><%= t('personal_activity.region') %></th>
|
<th><%= t('personal_activity.region') %></th>
|
||||||
|
@ -41,7 +42,6 @@
|
||||||
<th><%= t('personal_activity.tour_details') %></th>
|
<th><%= t('personal_activity.tour_details') %></th>
|
||||||
<th><%= t('personal_activity.award_name') %></th>
|
<th><%= t('personal_activity.award_name') %></th>
|
||||||
<th><%= t('personal_activity.awarding_unit') %></th>
|
<th><%= t('personal_activity.awarding_unit') %></th>
|
||||||
<th><%= t('personal_activity.authors_type') %></th>
|
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
|
@ -66,6 +66,7 @@
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
<td><%= activity.work_title %></td>
|
<td><%= activity.work_title %></td>
|
||||||
|
<td><%= activity.authors_type %></td>
|
||||||
<td><%= activity.activity_organizer %></td>
|
<td><%= activity.activity_organizer %></td>
|
||||||
<td><%= activity.activity_co_organizer %></td>
|
<td><%= activity.activity_co_organizer %></td>
|
||||||
<td><%= activity.region %></td>
|
<td><%= activity.region %></td>
|
||||||
|
@ -73,7 +74,6 @@
|
||||||
<td><%= activity.tour_details %></td>
|
<td><%= activity.tour_details %></td>
|
||||||
<td><%= activity.award_name %></td>
|
<td><%= activity.award_name %></td>
|
||||||
<td><%= activity.awarding_unit %></td>
|
<td><%= activity.awarding_unit %></td>
|
||||||
<td><%= activity.authors_type %></td>
|
|
||||||
</tr>
|
</tr>
|
||||||
<% end %>
|
<% end %>
|
||||||
</tbody>
|
</tbody>
|
||||||
|
|
Loading…
Reference in New Issue