From 5e600380c7834e26c5fa11544cd4446b9b8d8eec Mon Sep 17 00:00:00 2001 From: linhk <304431313@.com> Date: Tue, 19 Aug 2014 15:10:04 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AF=BE=E7=A8=8B=E5=AE=9E=E8=B7=B5=E5=B9=B3?= =?UTF-8?q?=E5=8F=B0=E8=AF=BE=E7=A8=8B=E5=90=8D=E7=A7=B0=E4=B8=8E=E5=AD=A6?= =?UTF-8?q?=E6=A0=A1=E8=B0=83=E6=8D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/welcome/_course_list.html.erb | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/app/views/welcome/_course_list.html.erb b/app/views/welcome/_course_list.html.erb index f590cf868..8d31f7c4c 100644 --- a/app/views/welcome/_course_list.html.erb +++ b/app/views/welcome/_course_list.html.erb @@ -6,11 +6,8 @@
- <% if (course.school == nil) %> -               - <% else %> - <%= link_to course.school.name.try(:gsub, /(.+)$/, '\1:'), options={:action => 'course', :school_id => course.school.id}, html_options={:method => 'get'} %> - <% end %> + <%= link_to(course.name.truncate(30, omission: '...')+":", course_path(course.id), :class => "d-g-blue d-p-project-name", :title => "#{course.name}") %> + <%= link_to(course.try(:teacher).try(:realname), user_path(course.teacher)) %> @@ -19,7 +16,11 @@
[<%= get_course_term course %>] - <%= link_to(course.name.truncate(30, omission: '...'), course_path(course.id), :class => "d-g-blue d-p-project-name", :title => "#{course.name}") %> + <% if (course.school == nil) %> +               + <% else %> + <%= link_to course.school.name.try(:gsub, /(.+)$/, '\1'), options={:action => 'course', :school_id => course.school.id}, html_options={:method => 'get'} %> + <% end %> (<%= course.members.count %>人) <%# files_count = course.attachments.count.to_s %> (<%= link_to "#{course.attachments.count.to_s}份", course_files_path(course) %>资料)