悲剧 下面竞赛里没文件, 作业不能让人搜
This commit is contained in:
parent
6edfda3a95
commit
9d1940427f
|
@ -34,9 +34,14 @@ class StoresController < ApplicationController
|
|||
# @courses_attach = Attachment.includes(:project).where("projects.project_type=? AND projects.is_public = ?", 1, 1).
|
||||
# reorder("#{Attachment.table_name}.downloads DESC").
|
||||
# limit(LIMIT)
|
||||
@homeworks_attach = Attachment.where("container_type = 'HomeworkAttach'").
|
||||
reorder("downloads DESC").
|
||||
limit(LIMIT)
|
||||
# 悲剧 下面竞赛里没文件
|
||||
# @homeworks_attach = Attachment.
|
||||
# joins("LEFT JOIN homework_attaches ON homework_attaches.id=attachments.container_id
|
||||
# LEFT JOIN bids ON homework_attaches.bid_id=bids.id").
|
||||
# where("container_type = 'HomeworkAttach' AND bids.reward_type <> 3").
|
||||
# reorder("downloads DESC").
|
||||
# limit(LIMIT)
|
||||
@homeworks_attach = join_tools_project Message, 0
|
||||
@memos_attach = Attachment.where("container_type = 'Memo'").
|
||||
reorder("downloads DESC").
|
||||
limit(LIMIT)
|
||||
|
@ -44,7 +49,7 @@ class StoresController < ApplicationController
|
|||
@attach_array.push(@projects_attach, @courses_attach, @homeworks_attach, @memos_attach)
|
||||
@str_arr = [ l(:label_project_deposit),
|
||||
l(:label_course_practice),
|
||||
l(:label_contest_innovate),
|
||||
l(:label_borad_project), #l(:label_contest_innovate),
|
||||
l(:label_forum) ]
|
||||
end
|
||||
|
||||
|
@ -58,7 +63,7 @@ class StoresController < ApplicationController
|
|||
pro_attach = join_tools_project Project, project_type
|
||||
doc_attach = join_tools_project Document, project_type
|
||||
issue_attach = join_tools_project Issue, project_type
|
||||
mess_attach = join_tools_project Message, project_type
|
||||
mess_attach = []#join_tools_project Message, project_type
|
||||
news_attach = join_tools_project News, project_type
|
||||
vers_attach = join_tools_project Version, project_type
|
||||
wiki_attach = join_tools_project WikiPage, project_type
|
||||
|
|
Loading…
Reference in New Issue