修复分页问题

This commit is contained in:
huang 2016-03-02 14:56:25 +08:00
parent b3fea3e229
commit 6893b3dcab
1 changed files with 21 additions and 19 deletions

View File

@ -57,25 +57,27 @@ module UsersHelper
def get_resource_origin attach
type = attach.container_type
content = attach.container
case type
when 'Course'
result = current_time_and_term_resource content
when 'Project'
result = content.name
when 'Issue'
result = content.subject
when 'Message'
result = content.subject
when 'News'
result = content.title
when 'HomewCommon'
result = content.name
when 'StudentWorkScore'
result = content.name
when 'Principal'
result = content.name
when 'OrgSubfield'
result = content.name
unless content.nil?
case type
when 'Course'
result = current_time_and_term_resource content
when 'Project'
result = content.name
when 'Issue'
result = content.subject
when 'Message'
result = content.subject
when 'News'
result = content.title
when 'HomewCommon'
result = content.name
when 'StudentWorkScore'
result = content.name
when 'Principal'
result = content.name
when 'OrgSubfield'
result = content.name
end
end
end