From 0311726412e4beeb1aa65cbcdfcd77e14fb61a0e Mon Sep 17 00:00:00 2001 From: BoHung Chiu Date: Mon, 10 Jul 2023 14:44:30 +0800 Subject: [PATCH] Fix bug. --- app/controllers/asia_databases_controller.rb | 2 +- app/views/admin/asia_databases/asia_teachers.html.erb | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/app/controllers/asia_databases_controller.rb b/app/controllers/asia_databases_controller.rb index 07a0038..6c00075 100644 --- a/app/controllers/asia_databases_controller.rb +++ b/app/controllers/asia_databases_controller.rb @@ -1,5 +1,5 @@ class AsiaDatabasesController < ApplicationController - include Admin::AsiaTeachersHelper + include Admin::AsiaDatabasesHelper ExtraFields = { 'discipline_expertise'=> ['discipline_expertise'], 'project'=> ['project_name', 'start_date', 'sponsor'], diff --git a/app/views/admin/asia_databases/asia_teachers.html.erb b/app/views/admin/asia_databases/asia_teachers.html.erb index c203568..fa9956c 100644 --- a/app/views/admin/asia_databases/asia_teachers.html.erb +++ b/app/views/admin/asia_databases/asia_teachers.html.erb @@ -1,3 +1,8 @@ + @@ -15,7 +20,7 @@ <% @asia_teachers.each do |teacher| %> - +

<%= @asia_academy.academy_name %><%= " - #{@asia_depart.department_name}" if @asia_depart.department_name.present? %>

<%= teacher.teacher %>

<%= teacher.discipline_expertise %><%= teacher.discipline_expertise.join("\n") rescue nil %> <%= teacher.asia_projects.count %> <%= teacher.asia_papers.count %> <%= teacher.asia_patents.count %>