This commit is contained in:
BoHung Chiu 2023-07-10 14:44:30 +08:00
parent 976dcf6418
commit 0311726412
2 changed files with 7 additions and 2 deletions

View File

@ -1,5 +1,5 @@
class AsiaDatabasesController < ApplicationController
include Admin::AsiaTeachersHelper
include Admin::AsiaDatabasesHelper
ExtraFields = {
'discipline_expertise'=> ['discipline_expertise'],
'project'=> ['project_name', 'start_date', 'sponsor'],

View File

@ -1,3 +1,8 @@
<style type="text/css">
td.discipline_expertise{
white-space: break-spaces;
}
</style>
<table class="table main-list tablet footable-loaded">
<caption><h3><%= @asia_academy.academy_name %><%= " - #{@asia_depart.department_name}" if @asia_depart.department_name.present? %></h3></caption>
<thead>
@ -15,7 +20,7 @@
<% @asia_teachers.each do |teacher| %>
<tr>
<td><h4><%= teacher.teacher %></h4></td>
<td><%= teacher.discipline_expertise %></td>
<td class="discipline_expertise"><%= teacher.discipline_expertise.join("\n") rescue nil %></td>
<td><a href="<%=asia_projects_admin_asia_database_path(teacher)%>"><%= teacher.asia_projects.count %></a></td>
<td><a href="<%=asia_papers_admin_asia_database_path(teacher)%>"><%= teacher.asia_papers.count %></a></td>
<td><a href="<%=asia_patents_admin_asia_database_path(teacher)%>"><%= teacher.asia_patents.count %></a></td>