From 50b9600b8080f408d46c741bd91ae9eba30e1229 Mon Sep 17 00:00:00 2001 From: p31729568 Date: Sat, 29 Jun 2019 10:20:40 +0800 Subject: [PATCH] fix competition --- app/views/competitions/_qg_second_competition.html.erb | 5 ++++- app/views/competitions/enroll.html.erb | 7 +------ public/stylesheets/educoder/edu-all.css | 2 +- 3 files changed, 6 insertions(+), 8 deletions(-) diff --git a/app/views/competitions/_qg_second_competition.html.erb b/app/views/competitions/_qg_second_competition.html.erb index 675fa41e..7c69854b 100644 --- a/app/views/competitions/_qg_second_competition.html.erb +++ b/app/views/competitions/_qg_second_competition.html.erb @@ -15,8 +15,11 @@

  • <% "@urls[i][j][k]表示: 第i个比赛的第j个对象,的第k个url入口" %> + <% is_start = Time.now > section.start_time %> <% section.competition_entries.each_with_index do |entry| %> - " <%= Time.now > section.start_time ? 'target="_blank"' : "" %> ><%= entry.name %> + " + <%= Time.now > section.start_time ? 'target="_blank"' : "" %> ><%= entry.name %> <% end %>
  • diff --git a/app/views/competitions/enroll.html.erb b/app/views/competitions/enroll.html.erb index 43e37099..1c5e68dc 100644 --- a/app/views/competitions/enroll.html.erb +++ b/app/views/competitions/enroll.html.erb @@ -109,11 +109,6 @@ <% end %> - <% elsif !User.current.admin? %> -
    -

    您还未参与报名哦,赶紧来挑战吧~

    - -
    <% end %> <% if User.current.admin? && @teams.present? %> @@ -124,7 +119,7 @@
    <%= render :partial => "competitions/team_list" %> <% else %> - <% unless @teams.present? %> + <% if @teams.blank? %>

    您还未参与报名哦,赶紧来挑战吧~

    diff --git a/public/stylesheets/educoder/edu-all.css b/public/stylesheets/educoder/edu-all.css index 0721252f..d014e4e4 100644 --- a/public/stylesheets/educoder/edu-all.css +++ b/public/stylesheets/educoder/edu-all.css @@ -748,7 +748,7 @@ li.challenge_box:last-child{ .enrollItemContent{padding: 0px 10px;width: 100%;box-sizing: border-box;height: 100%;overflow: hidden;} .enrollItemContent li{border-bottom: 1px solid #EAEAEA;padding: 20px;line-height: 20px} .team-p-s{width: 20px;height: 20px;line-height: 12px;text-align: center;border-radius: 50%;background: #BCBCBC;color: #fff;float: left} -.enroll-in-b{display: block;border:4px solid #fff;width: 216px;height: 62px;text-align: center;line-height: 62px;margin: 0px 40px;font-size: 32px;color: #fff!important;background: #4CACFF} +.enroll-in-b{display: block;border:4px solid #fff;width: 216px;height: 62px;text-align: center;line-height: 62px;margin: 0px 40px;font-size: 32px;color: #fff!important;background: #4CACFF;cursor: pointer;} .main_title{ font-size: 50px; font-family:MicrosoftYaHei-Bold;