From 9917e802cb651f3d20a505341489fd285411698c Mon Sep 17 00:00:00 2001 From: cxt Date: Fri, 18 Mar 2016 15:15:25 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AF=BE=E7=A8=8B=E6=8E=A8=E8=8D=90=E7=9A=84?= =?UTF-8?q?=E8=B5=84=E6=BA=90=E7=BB=9F=E8=AE=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/courses_controller.rb | 1 + app/views/courses/_recommendation.html.erb | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/app/controllers/courses_controller.rb b/app/controllers/courses_controller.rb index 24f5fd52c..dfa30915e 100644 --- a/app/controllers/courses_controller.rb +++ b/app/controllers/courses_controller.rb @@ -7,6 +7,7 @@ class CoursesController < ApplicationController helper :members helper :words helper :attachments + helper :files helper :activity_notifys before_filter :auth_login1, :only => [:show, :course_activity, :feedback] diff --git a/app/views/courses/_recommendation.html.erb b/app/views/courses/_recommendation.html.erb index 28cc54ab8..d92eb3cf4 100644 --- a/app/views/courses/_recommendation.html.erb +++ b/app/views/courses/_recommendation.html.erb @@ -8,8 +8,8 @@

<%=link_to e_course.name, course_path(e_course.id), :class => "hidden fl w170" %>

- <% if e_course.attachments.count > 0 %> - <%= l(:project_module_attachments) %>(<%= link_to e_course.attachments.count, course_files_path(e_course), :class => "linkBlue2" %>) + <% if visable_attachemnts(e_course.attachments).count > 0 %> + <%= l(:project_module_attachments) %>(<%= link_to visable_attachemnts(e_course.attachments).count, course_files_path(e_course), :class => "linkBlue2" %>) <% end %> <% if e_course.homework_commons.where("publish_time <= '#{Date.today}'").count > 0 %> <%= l(:label_homework_commont) %>(<%= link_to e_course.homework_commons.where("publish_time <= '#{Date.today}'").count, homework_common_index_path(:course=>e_course.id), :class => "linkBlue2" %>)