|
|
|
@ -5,12 +5,12 @@ json.challenges_count @subject.subject_challenge_count
|
|
|
|
|
json.subject_score @subject.all_score
|
|
|
|
|
json.member_count @subject.member_count
|
|
|
|
|
|
|
|
|
|
json.allow_delete @is_creator && (@subject.status != 2 || @user.admin?)
|
|
|
|
|
json.allow_delete (@subject.status != 2 && @is_creator) || @user.admin?
|
|
|
|
|
json.publish_status publish_status(@subject, @is_creator, @user, @shixuns)
|
|
|
|
|
json.allow_statistics @user.manager_of_subject?(@subject)
|
|
|
|
|
json.allow_statistics @is_manager
|
|
|
|
|
json.allow_send @user.logged?
|
|
|
|
|
json.allow_visit @user.manager_of_subject?(@subject) || @user.admin? || @subject.status > 1
|
|
|
|
|
json.allow_add_member @user.manager_of_subject?(@subject)
|
|
|
|
|
json.allow_visit @subject.status > 1 || @is_manager
|
|
|
|
|
json.allow_add_member @is_manager
|
|
|
|
|
|
|
|
|
|
json.members @members do |member|
|
|
|
|
|
json.partial! 'subject_member', locals: { user: member.user }
|
|
|
|
|