diff --git a/app/controllers/personal_labs_controller.rb b/app/controllers/personal_labs_controller.rb
index 13a2140..71e70de 100644
--- a/app/controllers/personal_labs_controller.rb
+++ b/app/controllers/personal_labs_controller.rb
@@ -28,13 +28,13 @@ class PersonalLabsController < ApplicationController
params = OrbitHelper.params
plugin = Lab.where(:is_hidden=>false).find_by(uid: params[:uid])
fields_to_show = [
+ "year",
"lab_title",
"location",
"participating_professor",
"participating_student",
"research_direction",
"facility",
- "year",
"keywords",
"extension_no",
"url",
diff --git a/app/models/lab.rb b/app/models/lab.rb
index 51eebdd..ee6a969 100644
--- a/app/models/lab.rb
+++ b/app/models/lab.rb
@@ -39,6 +39,41 @@ class Lab
plugin_datas
end
+ def self.get_plugin_datas_to_member(datas)
+
+ fields_to_show = [
+ "year",
+ "lab_title",
+ "location"
+ ]
+
+ pd_title = fields_to_show.collect do |t|
+ {
+ "plugin_data_title" => I18n.t("personal_lab.#{t}")
+ }
+ end
+
+ plugin_datas = datas.where(:is_hidden=>false).order_by(:year=>'desc').collect do |p|
+
+ pd_data = []
+ fields_to_show.collect do |t|
+ if t == "lab_title"
+ pd_data << { "data_title" => "#{p.send(t)}" }
+ else
+ pd_data << { "data_title" => p.send(t) }
+ end
+ end
+
+ {
+ "pd_datas" => pd_data
+ }
+
+ end
+
+ return [pd_title,plugin_datas]
+
+ end
+
def get_plugin_field_data(field)
case field
when "language"
diff --git a/app/views/admin/labs/_form.html.erb b/app/views/admin/labs/_form.html.erb
index e05e98f..a12c742 100644
--- a/app/views/admin/labs/_form.html.erb
+++ b/app/views/admin/labs/_form.html.erb
@@ -13,6 +13,96 @@
+ <%= hidden_field_tag 'plugin_file_field_count', @lab.lab_files.count %>
+ <%= t(:add) %>
+
- <%= hidden_field_tag 'plugin_file_field_count', @lab.lab_files.count %>
- <%= t(:add) %>
-
+
-