|
|
|
<%
|
|
|
|
define_admin_breadcrumbs do
|
|
|
|
add_admin_breadcrumb('竞赛列表', admins_competitions_path)
|
|
|
|
add_admin_breadcrumb(@competition.name)
|
|
|
|
end
|
|
|
|
%>
|
|
|
|
|
|
|
|
<div class="card mb-5">
|
|
|
|
<div class="card-header d-flex justify-content-between align-items-center">
|
|
|
|
<span class="flex-1">基础设置</span>
|
|
|
|
</div>
|
|
|
|
<div class="card-body row">
|
|
|
|
<%= form_tag(admins_competition_competition_settings_path(unsafe_params), method: :post, class: 'basic-setting-form flex-1', remote: true) do %>
|
|
|
|
<div class="container competition-mode-container">
|
|
|
|
<div class="row align-items-center mb-1">
|
|
|
|
<div class="col-1 text-right">
|
|
|
|
竞赛模式
|
|
|
|
</div>
|
|
|
|
<div class="col-5 text-left">
|
|
|
|
<%= radio_button_tag(:mode, 1, @competition.mode == 1, class: 'form-radio-input') %>
|
|
|
|
<label class="form-radio-label mb-0" for="mode_1">实训模式(参赛者报名参赛,挑战实训,系统评审)</label>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="row align-items-center mb-1">
|
|
|
|
<div class="col-1 text-right">
|
|
|
|
</div>
|
|
|
|
<div class="col-5 text-left">
|
|
|
|
<%= radio_button_tag(:mode, 2, @competition.mode == 2, class: 'form-radio-input') %>
|
|
|
|
<label class="form-radio-label mb-0" for="mode_2">课堂模式(参赛者加入课堂,提交作品,评委评审)</label>
|
|
|
|
</div>
|
|
|
|
<div class="col-6">
|
|
|
|
<%= text_field_tag(:course_id, @competition.competition_mode_setting&.course_id, autocomplete: 'off', class: 'form-control', placeholder: '课堂id') %>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="row align-items-center mb-1">
|
|
|
|
<div class="col-1 text-right">
|
|
|
|
</div>
|
|
|
|
<div class="col-5 text-left">
|
|
|
|
<%= radio_button_tag(:mode, 3, @competition.mode == 3, class: 'form-radio-input') %>
|
|
|
|
<label class="form-radio-label mb-0" for="mode_3">教学模式(参赛者报名参赛,统计战队课堂和实训数据)</label>
|
|
|
|
</div>
|
|
|
|
<div class="col-6 teaching-mode-date d-flex">
|
|
|
|
<%= text_field_tag :start_time, @competition.competition_mode_setting&.start_time, autocomplete: 'off', class: 'form-control start-date mx-0 mr-2', placeholder: '统计数据的开始时间' %>
|
|
|
|
<%= text_field_tag :end_time, @competition.competition_mode_setting&.end_time, autocomplete: 'off', class: 'form-control end-date mx-0', placeholder: '统计数据的结束时间' %>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="row align-items-center mb-1">
|
|
|
|
<div class="col-1 text-right">
|
|
|
|
</div>
|
|
|
|
<div class="col-5 text-left">
|
|
|
|
<%= radio_button_tag(:mode, 4, @competition.mode == 4, class: 'form-radio-input') %>
|
|
|
|
<label class="form-radio-label mb-0" for="mode_4">托管模式(参赛者报名参赛,在其他平台完成任务)</label>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="row align-items-center mb-1">
|
|
|
|
<div class="col-1 text-right">
|
|
|
|
URL
|
|
|
|
</div>
|
|
|
|
<div class="col-5 text-left mode-input">
|
|
|
|
<%= text_field_tag(:identifier, @competition.identifier, autocomplete: 'off', class: 'form-control', placeholder: '请输入url赛事网址') %>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="row align-items-center mb-1">
|
|
|
|
<div class="col-1 text-right">
|
|
|
|
主办方
|
|
|
|
</div>
|
|
|
|
<div class="col-5 text-left">
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="row align-items-center mb-1">
|
|
|
|
<div class="col-1 text-right">
|
|
|
|
奖金
|
|
|
|
</div>
|
|
|
|
<div class="col-5 text-left input-group">
|
|
|
|
<div class="input-group-prepend">
|
|
|
|
<div class="input-group-text">¥</div>
|
|
|
|
</div>
|
|
|
|
<%= number_field_tag(:bonus, @competition.bonus, autocomplete: 'off', step: 1, min: 0, class: 'form-control', placeholder: '请输入总奖金额') %>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="row align-items-center mb-1">
|
|
|
|
<div class="col-1 text-right">
|
|
|
|
获奖人数
|
|
|
|
</div>
|
|
|
|
<div class="col-5 text-left">
|
|
|
|
<%= number_field_tag(:bonus, @competition.bonus, autocomplete: 'off', step: 1, min: 0, class: 'form-control', placeholder: '请输入总奖金额') %>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="row des-row align-items-center mb-1">
|
|
|
|
<div class="col-1 text-right">
|
|
|
|
描述
|
|
|
|
</div>
|
|
|
|
<div class="col-11 text-left">
|
|
|
|
<%= text_area_tag(:description, @competition.description, class: 'form-control', placeholder: '请输入赛事简介') %>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="row des-row align-items-center mb-1">
|
|
|
|
<div class="col-1 text-right">
|
|
|
|
</div>
|
|
|
|
<div class="col-5 text-left">
|
|
|
|
<%= javascript_void_link '保存', class: 'btn btn-primary submit-btn' %>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<% end %>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|