You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
json.(@subject, :id, :name, :description, :learning_notes, :stages_count, :stage_shixuns_count, :shixuns_count)
|
|
|
|
|
|
|
|
json.challenge_choose_count @subject.subject_challenge_choose_count
|
|
|
|
json.challenges_count @subject.subject_challenge_count
|
|
|
|
json.subject_score @subject.all_score
|
|
|
|
json.member_count @subject.member_count
|
|
|
|
|
|
|
|
json.allow_delete (@subject.status != 2 && @is_creator) || @user.admin?
|
|
|
|
json.publish_status publish_status(@subject, @is_creator, @user, @shixuns)
|
|
|
|
json.allow_statistics @is_manager
|
|
|
|
json.allow_send @user.logged?
|
|
|
|
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 }
|
|
|
|
json.role member.role
|
|
|
|
end
|
|
|
|
|
|
|
|
# 技能标签
|
|
|
|
json.tags @tags do |tag|
|
|
|
|
unless tag.blank?
|
|
|
|
json.tag_name tag
|
|
|
|
json.status @user_tags.include?(tag)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
# 我的进展
|
|
|
|
json.progress do
|
|
|
|
json.my_score @subject.my_subject_score
|
|
|
|
json.all_score @subject.all_score
|
|
|
|
json.learned @subject.my_subject_progress
|
|
|
|
json.time @subject.my_consume_time
|
|
|
|
end
|