You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
<% define_admin_breadcrumbs do %>
|
|
|
|
<% add_admin_breadcrumb('竞赛列表', admins_competitions_path) %>
|
|
|
|
<% end %>
|
|
|
|
|
|
|
|
<div class="box mb-5">
|
|
|
|
<div class="d-flex flex-column w-100">
|
|
|
|
<div class="d-flex">
|
|
|
|
<% imageExists = File.exist?(disk_filename("Competition", "banner")) %>
|
|
|
|
<% imageUrl = imageExists ? '/' + banner_img("Competition") + "?#{Time.now.to_i}" : '' %>
|
|
|
|
<span class="mr-3">竞赛主页banner</span>
|
|
|
|
<%= image_tag(imageUrl, width: 150, height: 50, class: "preview-image competition-image-banner mr-1", data: { toggle: 'tooltip', title: '点击预览' }) %>
|
|
|
|
<%= javascript_void_link imageExists ? '重新上传' : '上传图片', class: 'action upload-competition-image-action', data: { source_id: "banner", source_type: 'Competition', toggle: 'modal', target: '.admin-upload-file-modal' } %>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="d-flex">
|
|
|
|
<label for="hot">
|
|
|
|
<%= check_box_tag :hot, (@competition_hot ? "1" : "0"), @competition_hot, class:"shixun-settings-select" %>
|
|
|
|
<span class="only_view">只看可ssh</span>
|
|
|
|
</label>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="box competitions-list-container">
|
|
|
|
<%= render partial: 'admins/competitions/shared/list', locals: { competitions: @competitions } %>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<%= render partial: 'admins/shared/modal/upload_file_modal', locals: { title: '上传图片' } %>
|