教学案例的封面图片显示

dev_aliyun
cxt 5 years ago
parent e480e06d1b
commit e17dabc2d4

@ -4381,7 +4381,7 @@ module ApplicationHelper
elsif attachment.container_type == "Bid" && attachment.container && attachment.container.courses elsif attachment.container_type == "Bid" && attachment.container && attachment.container.courses
course = attachment.container.courses.first course = attachment.container.courses.first
candown = User.current.member_of_course?(attachment.container.courses.first) || (course.is_public == 1 && attachment.is_public == 1) candown = User.current.member_of_course?(attachment.container.courses.first) || (course.is_public == 1 && attachment.is_public == 1)
elsif attachment.container_type == "Library" #教学案例允许下载 elsif attachment.container_type == "Library" || attachment.container.class.to_s == "Library" #教学案例允许下载
candown = true candown = true
elsif attachment.container_type == "ProjectPackage" #教学案例允许下载 elsif attachment.container_type == "ProjectPackage" #教学案例允许下载
candown = true candown = true

Loading…
Cancel
Save