init project

This commit is contained in:
Jasder
2020-03-09 00:40:16 +08:00
commit 2937b2a94d
6549 changed files with 7215173 additions and 0 deletions

View File

@@ -0,0 +1,12 @@
<div class="box edit-mirror-script-container">
<%= simple_form_for([:admins, mirror, script], url: { action: form_action }, html: { class: 'script-form' }) do |f| %>
<%= f.input :script_type, label: '名称', input_html: { class: 'col-md-6' } %>
<%= f.input :description, as: :text, label: '说明', input_html: { class: 'col-md-6' } %>
<%= f.input :script, as: :text, label: '评测脚本' %>
<div class="form-row">
<%= f.button :submit, value: '保存', class: 'btn-primary mr-3 px-4', 'data-disable-with': '保存中...' %>
<%= link_to '取消', admins_mirror_repository_mirror_scripts_path(mirror), class: 'btn btn-secondary px-4' %>
</div>
<% end %>
</div>

View File

@@ -0,0 +1,32 @@
<table class="table table-hover text-center mirror-script-list-table">
<thead class="thead-light">
<tr>
<th width="10%">ID</th>
<th width="20%" class="text-left">名称</th>
<th width="34%" class="text-left">说明</th>
<th width="16%">更新时间</th>
<th width="20%">操作</th>
</tr>
</thead>
<tbody>
<% if scripts.present? %>
<% scripts.each do |script| %>
<tr class="mirror-script-item-<%= script.id %>">
<td><%= script.id %></td>
<td class="text-left"><%= overflow_hidden_span script.script_type, width: 200 %></td>
<td class="text-left"><%= overflow_hidden_span script.description, width: 400 %></td>
<td><%= script.updated_at.strftime('%Y-%m-%d %H:%M') %></td>
<td class="action-container">
<%= link_to '编辑', edit_admins_mirror_repository_mirror_script_path(mirror, script), class: 'action edit-action' %>
<%= delete_link '删除', admins_mirror_repository_mirror_script_path(mirror, script, element: ".mirror-script-item-#{script.id}"), class: 'delete-mirror-script-action' %>
</td>
</tr>
<% end %>
<% else %>
<%= render 'admins/shared/no_data_for_table' %>
<% end %>
</tbody>
</table>
<%= render partial: 'admins/shared/paginate', locals: { objects: scripts } %>