From 2bbffda6677efa8dddd70a69e25c7e1119f7c003 Mon Sep 17 00:00:00 2001 From: caishi <1149225589@qq.com> Date: Thu, 4 Jul 2019 17:25:28 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E6=88=98=E9=98=9F=E8=AF=A6=E6=83=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../competitions/_competition_team_detail.html.erb | 10 ++++++++++ .../_qg_second_course_competition.html.erb | 4 ++-- public/stylesheets/educoder/edu-all.css | 2 +- 3 files changed, 13 insertions(+), 3 deletions(-) create mode 100644 app/views/competitions/_competition_team_detail.html.erb diff --git a/app/views/competitions/_competition_team_detail.html.erb b/app/views/competitions/_competition_team_detail.html.erb new file mode 100644 index 00000000..88dd992d --- /dev/null +++ b/app/views/competitions/_competition_team_detail.html.erb @@ -0,0 +1,10 @@ +
+ 战队详情 + 返回 +
+实训项目
+<%= @competition.name %>
- <% if @minimum_staff > 1 %> + <% if @maximum_staff > 1 %><%= @competition.sub_title %>
<% unless User.current.logged? %> <%= link_to "创建战队", signin_path, :remote => true, :class => "enroll-in-b enroll-in-b-green fr" %> <% else %> <% unless @competition.enroll_end_time.present? && @competition.enroll_end_time < Time.now %> - <% if @is_enroll.present? && !@user.is_teacher %> + <% if !@can_enroll %> 创建战队 <% else %> 创建战队 @@ -23,7 +23,7 @@ <%= link_to "加入战队", signin_path, :remote => true, :class => "enroll-in-b fr" %> <% else %> <% unless @competition.enroll_end_time.present? && @competition.enroll_end_time < Time.now %> - <% if @is_enroll.present? && !@user.is_teacher %> + <% if !@can_enroll %> 加入战队 <% else %> 加入战队 @@ -40,7 +40,7 @@ <% else %>
<% unless @competition.enroll_end_time.present? && @competition.enroll_end_time < Time.now %> - <% if @is_enroll.present? %> + <% if !@can_enroll %> 立即报名 <% else %> <%= link_to "立即报名", personal_enroll_competition_teams_path(:com_id => @competition.id), :remote => true, :class => "enroll-in-b enroll-in-b-green fr" %> @@ -97,6 +97,10 @@ 退出 <% end %> <% end %> + + <% if @competition.identifier == 'gcc-course-2019' %> + <%= link_to '战队详情', competition_team_path(id: @competition.id) %> + <% end %> <% end %>