|
|
|
@ -93,7 +93,10 @@ class OrganizationsController < ApplicationController
|
|
|
|
|
end
|
|
|
|
|
# 热门项目
|
|
|
|
|
if @organization.org_subfields.where(:field_type => "Comppro", :hide => 0).count > 0
|
|
|
|
|
@excellent_projects = Project.where(:is_public => true, :status => true, :hot => true)
|
|
|
|
|
# @excellent_projects = Project.where(:is_public => true, :status => true, :hot => true).order("project_score")
|
|
|
|
|
@excellent_projects = Project.find_by_sql("SELECT p.* FROM `projects` p, project_scores ps where p.id = ps.project_id and p.is_public =1 and
|
|
|
|
|
status =1 and hot =1 order by (ps.issue_num * 4 + ps.issue_journal_num + ps.changeset_num * 4 + ps.board_num * 2 +
|
|
|
|
|
ps.board_message_num + ps.news_num + ps.attach_num * 5) desc limit 5;")
|
|
|
|
|
end
|
|
|
|
|
# 最新动态, 来自我关联的项目和课程
|
|
|
|
|
if @organization.org_subfields.where(:field_type => "Compact", :hide => 0).count > 0
|
|
|
|
|