<%= page_no %> <%= link_to competition.name, admins_competition_enroll_lists_path(competition), :title => competition.name %> <%= competition.sub_title %> <%= competition.mode_type %> <%= @member_count_map&.fetch(competition.id, 0) || competition.team_members.count %> <%= competition.teacher_staff_num %> <%= competition.member_staff_num %> <% imageExists = File.exist?(disk_filename("Competition", competition.id)) %> <% imageUrl = imageExists ? '/' + url_to_avatar(competition) + "?#{Time.now.to_i}" : '' %> <%= image_tag(imageUrl, width: 60, height: 40, class: "preview-image competition-image-#{competition.id}", data: { toggle: 'tooltip', title: '点击预览' }, style: imageExists ? '' : 'display:none') %> <%= javascript_void_link imageExists ? '重新上传' : '上传图片', class: 'action upload-competition-image-action', data: { source_id: competition.id, source_type: 'Competition', toggle: 'modal', target: '.admin-upload-file-modal' } %> <%= competition.created_at.strftime('%Y-%m-%d %H:%M') %> <%= link_to '配置', admins_competition_competition_settings_path(competition), class: 'action edit-action' %> <% if !competition.status? && competition.published_at.blank? %> <%= link_to '发布', publish_admins_competition_path(competition), class: 'action publish-action', method: :post, remote: true %> <% else %> <%= link_to '取消发布', unpublish_admins_competition_path(competition), class: 'action unpublish-action', method: :post, remote: true %> <% end %> <%= link_to competition.published? ? "下架" : "上架", online_switch_admins_competition_path(competition), class: 'action online-action', method: :post, remote: true %>