mirror of
https://gitlink.org.cn/Gitlink/forgeplus.git
synced 2026-05-03 20:00:49 +08:00
init project
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
<div class="modal fade admin-import-course-member-modal" tabindex="-1" role="dialog" aria-hidden="true">
|
||||
<div class="modal-dialog modal-dialog-centered" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title">导入课堂成员</h5>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<form class="admin-import-course-member-form" enctype="multipart/form-data">
|
||||
<div class="input-group">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text">文件</span>
|
||||
</div>
|
||||
<div class="custom-file">
|
||||
<input type="file" name="file" id="import-course-member-input" class="upload-file-input" accept="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet">
|
||||
<label class="custom-file-label file-names" for="import-course-member-input">选择文件</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="error text-danger"></div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">取消</button>
|
||||
<button type="button" class="btn btn-primary submit-btn">确认</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
37
app/views/admins/courses/shared/_list.html.erb
Normal file
37
app/views/admins/courses/shared/_list.html.erb
Normal file
@@ -0,0 +1,37 @@
|
||||
<table class="table table-hover text-center subject-list-table">
|
||||
<thead class="thead-light">
|
||||
<tr>
|
||||
<th width="4%">序号</th>
|
||||
<th width="4%">ID</th>
|
||||
<th width="10%" class="text-left">课堂名称</th>
|
||||
<th width="5%">成员</th>
|
||||
<th width="4%">资源</th>
|
||||
<th width="4%">普通作业</th>
|
||||
<th width="4%">分组作业</th>
|
||||
<th width="4%">实训作业</th>
|
||||
<th width="4%">试卷</th>
|
||||
<th width="6%">评测次数</th>
|
||||
<th width="4%">私有</th>
|
||||
<th width="6%">状态</th>
|
||||
<th width="10%">单位</th>
|
||||
<th width="7%">创建者</th>
|
||||
<th width="10%"><%= sort_tag('创建时间', name: 'created_at', path: admins_courses_path) %></th>
|
||||
<th width="4%">首页</th>
|
||||
<th width="5%">邮件通知</th>
|
||||
<th width="5%">操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<% if courses.present? %>
|
||||
<% courses.each_with_index do |course, index| %>
|
||||
<tr class="course-item-<%= course.id %>">
|
||||
<%= render partial: 'admins/courses/shared/td', locals: {course: course, no: index} %>
|
||||
</tr>
|
||||
<% end %>
|
||||
<% else %>
|
||||
<%= render 'admins/shared/no_data_for_table' %>
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<%= render partial: 'admins/shared/paginate', locals: { objects: courses } %>
|
||||
28
app/views/admins/courses/shared/_td.html.erb
Normal file
28
app/views/admins/courses/shared/_td.html.erb
Normal file
@@ -0,0 +1,28 @@
|
||||
<td><%= list_index_no((params[:page] || 1).to_i, no) %></td>
|
||||
<td><%= course.id %></td>
|
||||
<td class="text-left">
|
||||
<%= link_to(course.name, "/courses/#{course.id}", target: '_blank') %>
|
||||
</td>
|
||||
<td><%= course.course_members_count %></td>
|
||||
<td><%= get_attachment_count(course, 0) %></td>
|
||||
<td><%= course.course_homework_count(1) %></td>
|
||||
<td><%= course.course_homework_count(3) %></td>
|
||||
<td><%= course.course_homework_count(4) %></td>
|
||||
<td><%= course.exercises_count %></td>
|
||||
<td><%= course.evaluate_count %></td>
|
||||
<td><%= course.is_public == 1 ? "--" : "√" %></td>
|
||||
<td><%= course.is_end ? "已结束" : "正在进行" %></td>
|
||||
<td><%= course.school&.name %></td>
|
||||
<td><%= course.teacher&.real_name %></td>
|
||||
<td><%= course.created_at&.strftime('%Y-%m-%d %H:%M') %></td>
|
||||
<td>
|
||||
<%= check_box_tag :homepage_show,!course.homepage_show,course.homepage_show,remote:true,data:{id:course.id},class:"course-setting-form" %>
|
||||
</td>
|
||||
<td>
|
||||
<%= check_box_tag :email_notify,!course.email_notify,course.email_notify,remote:true,data:{id:course.id},class:"course-setting-form" %>
|
||||
</td>
|
||||
<td class="action-container">
|
||||
<% if course.is_delete == 0 %>
|
||||
<%= delete_link '删除', admins_course_path(course, element: ".course-item-#{course.id}"), class: 'delete-course-action' %>
|
||||
<% end %>
|
||||
</td>
|
||||
Reference in New Issue
Block a user