From 4d642391c48f61244a6db21f29b3a2947d6de96b Mon Sep 17 00:00:00 2001 From: p31729568 Date: Sat, 29 Jun 2019 08:42:37 +0800 Subject: [PATCH 1/3] competition index show subtitle --- app/views/competitions/index.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/competitions/index.html.erb b/app/views/competitions/index.html.erb index 1931b3ef..3f03f6ef 100644 --- a/app/views/competitions/index.html.erb +++ b/app/views/competitions/index.html.erb @@ -8,7 +8,7 @@ <%= image_tag(url_to_avatar(competition), :width => "100%", :height => "100%") %>
- <%= competition.name %> + <%= [competition.name, competition.sub_title.presence].compact.join('——') %> <% if competition.start_time > Time.now %> <% unless competition.enroll_end_time.present? && competition.enroll_end_time < Time.now %>
From 50b9600b8080f408d46c741bd91ae9eba30e1229 Mon Sep 17 00:00:00 2001 From: p31729568 Date: Sat, 29 Jun 2019 10:20:40 +0800 Subject: [PATCH 2/3] 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; From 054c00767f61dc60f1c3905b39859d542b16d1c7 Mon Sep 17 00:00:00 2001 From: p31729568 Date: Sat, 29 Jun 2019 10:32:56 +0800 Subject: [PATCH 3/3] fix --- app/views/competitions/enroll.html.erb | 39 ++++++++++++++++---------- 1 file changed, 24 insertions(+), 15 deletions(-) diff --git a/app/views/competitions/enroll.html.erb b/app/views/competitions/enroll.html.erb index 1c5e68dc..075bfe40 100644 --- a/app/views/competitions/enroll.html.erb +++ b/app/views/competitions/enroll.html.erb @@ -109,22 +109,31 @@
    <% end %> + <% elsif !User.current.admin? %> +
    +

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

    + +
    <% end %> - <% if User.current.admin? && @teams.present? %> - - 搜索 - 战队数: - 成员数: - <%= @maximum_staff > 1 ? "战队总数" : "报名人数" %>:<%= @team_count %> -
    - <%= render :partial => "competitions/team_list" %> - <% else %> - <% if @teams.blank? %> -
    -

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

    - -
    - <% end %> + + <% if User.current.admin?%> +
    + + 搜索 + 战队数: + 成员数: + <%= @maximum_staff > 1 ? "战队总数" : "报名人数" %>:<%= @team_count %> +
    + + <% if @teams.present? %> + <%= render :partial => "competitions/team_list" %> + <% else %> +
    +

    还没有人报名~

    + +
    + <% end %> +
    <% end %>