|
|
@ -44,6 +44,12 @@ class Competitions::CompetitionsController < Competitions::BaseController
|
|
|
|
def common_header
|
|
|
|
def common_header
|
|
|
|
@competition = current_competition
|
|
|
|
@competition = current_competition
|
|
|
|
@competition_modules = @competition.unhidden_competition_modules
|
|
|
|
@competition_modules = @competition.unhidden_competition_modules
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# 未登录、未获奖用户,不展示获奖证书栏目
|
|
|
|
|
|
|
|
if !current_user.logged? || !current_competition.finished? || !current_competition.competition_prize_users.exists?(user: current_user)
|
|
|
|
|
|
|
|
@competition_modules = @competition_modules.select { |mod| mod.name != '获奖证书' }
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
@user = current_user
|
|
|
|
@user = current_user
|
|
|
|
|
|
|
|
|
|
|
|
current_competition.increment!(:visits)
|
|
|
|
current_competition.increment!(:visits)
|
|
|
|