diff --git a/app/views/admins/courses/shared/_list.html.erb b/app/views/admins/courses/shared/_list.html.erb index 633616462..4105c8153 100644 --- a/app/views/admins/courses/shared/_list.html.erb +++ b/app/views/admins/courses/shared/_list.html.erb @@ -1,30 +1,31 @@ + - + - + - - + + <% if courses.present? %> - <% courses.each do |course| %> + <% courses.each_with_index do |course, index| %> - <%= render 'admins/courses/shared/td', course: course %> + <%= render partial: 'admins/courses/shared/td', locals: {course: course, no: index} %> <% end %> <% else %> diff --git a/app/views/admins/courses/shared/_td.html.erb b/app/views/admins/courses/shared/_td.html.erb index 1d2da2a33..51cc4b199 100644 --- a/app/views/admins/courses/shared/_td.html.erb +++ b/app/views/admins/courses/shared/_td.html.erb @@ -1,3 +1,4 @@ +
序号 ID 课堂名称成员成员 资源 普通作业 分组作业 实训作业 试卷评测次数评测次数 私有 状态 单位 创建者 <%= sort_tag('创建时间', name: 'created_at', path: admins_courses_path) %> 首页邮件通知操作邮件通知操作
<%= list_index_no((params[:page] || 1).to_i, no) %> <%= course.id %> <%= link_to(course.name, "/courses/#{course.id}", target: '_blank') %> diff --git a/app/views/admins/courses/update.js.erb b/app/views/admins/courses/update.js.erb index 1278a2e1f..983ac22f0 100644 --- a/app/views/admins/courses/update.js.erb +++ b/app/views/admins/courses/update.js.erb @@ -1 +1,3 @@ -$("#course-item-<%= @course.id %>").html("<%= j render partial: "admins/courses/shared/td",locals: {course: @course} %>") \ No newline at end of file +var index = $("#course-item-<%= @course.id %>").children(":first").html(); +$("#course-item-<%= @course.id %>").html("<%= j render partial: "admins/courses/shared/td",locals: {course: @course, no: 1} %>"); +$("#course-item-<%= @course.id %>").children(":first").html(index); \ No newline at end of file diff --git a/app/views/admins/customers/shared/_list.html.erb b/app/views/admins/customers/shared/_list.html.erb index 0ba5638cb..6f84db4e5 100644 --- a/app/views/admins/customers/shared/_list.html.erb +++ b/app/views/admins/customers/shared/_list.html.erb @@ -1,15 +1,17 @@ - + + <% if customers.present? %> - <% customers.each do |customer| %> + <% customers.each_with_index do |customer, index| %> +
客户名称序号客户名称 <%= sort_tag('添加时间', name: 'created_at', path: admins_partner_customers_path(current_partner)) %> 操作
<%= list_index_no((params[:page] || 1).to_i, index) %> <%= customer.school&.name %> <%= customer.created_at&.strftime('%Y-%m-%d %H:%M') %> diff --git a/app/views/admins/department_applies/shared/_list.html.erb b/app/views/admins/department_applies/shared/_list.html.erb index 0a1d803be..87d5ab66f 100644 --- a/app/views/admins/department_applies/shared/_list.html.erb +++ b/app/views/admins/department_applies/shared/_list.html.erb @@ -1,18 +1,20 @@ + - + <% if applies.present? %> - <% applies.each do |apply| %> + <% applies.each_with_index do |apply, index| %> + diff --git a/app/views/admins/department_members/create.js.erb b/app/views/admins/department_members/create.js.erb index 4355c7432..6bf0a6ac3 100644 --- a/app/views/admins/department_members/create.js.erb +++ b/app/views/admins/department_members/create.js.erb @@ -1,4 +1,6 @@ $('.modal.admin-add-department-member-modal').modal('hide'); $.notify({ message: '操作成功' }); -$('.department-list-table .department-item-<%= current_department.id %>').html("<%= j(render partial: 'admins/departments/shared/department_item', locals: { department: current_department }) %>") \ No newline at end of file +var index = $(".department-item-<%= current_department.id %>").children(":first").html(); +$('.department-list-table .department-item-<%= current_department.id %>').html("<%= j(render partial: 'admins/departments/shared/department_item', locals: { department: current_department, index: 1 }) %>"); +$(".department-item-<%= current_department.id %>").children(":first").html(index); \ No newline at end of file diff --git a/app/views/admins/departments/shared/_department_item.html.erb b/app/views/admins/departments/shared/_department_item.html.erb index 64b4ee70b..62f3a81ac 100644 --- a/app/views/admins/departments/shared/_department_item.html.erb +++ b/app/views/admins/departments/shared/_department_item.html.erb @@ -1,3 +1,4 @@ + <% not_list = defined?(:users_count) %> diff --git a/app/views/admins/departments/shared/_list.html.erb b/app/views/admins/departments/shared/_list.html.erb index 6af63d6f4..09ba2a65f 100644 --- a/app/views/admins/departments/shared/_list.html.erb +++ b/app/views/admins/departments/shared/_list.html.erb @@ -1,10 +1,11 @@
序号 ID 部门名称 单位名称创建者创建者 <%= sort_tag('创建于', name: 'created_at', path: admins_department_applies_path) %> 操作
<%= list_index_no((params[:page] || 1).to_i, index) %> <%= apply.id %> <%= apply.name %> <%= apply.school.try(:name) %><%= list_index_no((params[:page] || 1).to_i, index) %><%= overflow_hidden_span department.name, width: 150 %>
+ - + @@ -14,9 +15,9 @@ <% if departments.present? %> - <% departments.each do |department| %> + <% departments.each_with_index do |department, index| %> - <%= render 'admins/departments/shared/department_item', department: department %> + <%= render partial: 'admins/departments/shared/department_item', locals: {department: department, index: index} %> <% end %> <% else %> diff --git a/app/views/admins/departments/update.js.erb b/app/views/admins/departments/update.js.erb index 359bac59c..d20ca9524 100644 --- a/app/views/admins/departments/update.js.erb +++ b/app/views/admins/departments/update.js.erb @@ -1,4 +1,6 @@ $('.modal.admin-edit-department-modal').modal('hide'); $.notify({ message: '操作成功' }); -$('.department-list-table .department-item-<%= current_department.id %>').html("<%= j(render partial: 'admins/departments/shared/department_item', locals: { department: current_department }) %>") \ No newline at end of file +var index = $(".department-item-<%= current_department.id %>").children(":first").html(); +$('.department-list-table .department-item-<%= current_department.id %>').html("<%= j(render partial: 'admins/departments/shared/department_item', locals: {department: current_department, index: 1}) %>"); +$(".department-item-<%= current_department.id %>").children(":first").html(index); \ No newline at end of file diff --git a/app/views/admins/identity_authentications/shared/_list.html.erb b/app/views/admins/identity_authentications/shared/_list.html.erb index 607feb93a..6e12d1c54 100644 --- a/app/views/admins/identity_authentications/shared/_list.html.erb +++ b/app/views/admins/identity_authentications/shared/_list.html.erb @@ -3,6 +3,7 @@
序号 部门名称 单位名称 用户数已职业认证已职业认证 部门管理员 统计链接 云主机数
+ <% unless is_processed %> - + <% unless is_processed %> <% if applies.present? %> - <% applies.each do |apply| %> + <% applies.each_with_index do |apply, index| %> <% user = apply.user %> + <% unless is_processed %> <% end %> diff --git a/app/views/admins/laboratories/shared/_laboratory_item.html.erb b/app/views/admins/laboratories/shared/_laboratory_item.html.erb index 81a45ca71..765616926 100644 --- a/app/views/admins/laboratories/shared/_laboratory_item.html.erb +++ b/app/views/admins/laboratories/shared/_laboratory_item.html.erb @@ -1,4 +1,5 @@ <% school = laboratory.school %> +
序号 <%= check_box_tag('all-check', 1, false, id: nil, class: 'batch-all-check-box', @@ -13,7 +14,7 @@ 姓名 身份证号 学校/单位职称职称 照片 @@ -33,9 +34,10 @@
<%= list_index_no((params[:page] || 1).to_i, index) %><%= check_box_tag('ids[]', apply.id, false, id: nil, class: 'batch-check-box') %><%= list_index_no((params[:page] || 1).to_i, index) %> <%= school&.name || 'EduCoder主站' %> <% if laboratory.identifier %> diff --git a/app/views/admins/laboratories/shared/_list.html.erb b/app/views/admins/laboratories/shared/_list.html.erb index 2520b3276..a731be44a 100644 --- a/app/views/admins/laboratories/shared/_list.html.erb +++ b/app/views/admins/laboratories/shared/_list.html.erb @@ -1,6 +1,7 @@ + @@ -9,14 +10,14 @@ - + <% if laboratories.present? %> - <% laboratories.each do |laboratory| %> + <% laboratories.each_with_index do |laboratory, index| %> - <%= render 'admins/laboratories/shared/laboratory_item', laboratory: laboratory %> + <%= render partial: 'admins/laboratories/shared/laboratory_item', locals: {laboratory: laboratory, index: index} %> <% end %> <% else %> diff --git a/app/views/admins/laboratories/update.js.erb b/app/views/admins/laboratories/update.js.erb index 1b9f307a6..149539ad6 100644 --- a/app/views/admins/laboratories/update.js.erb +++ b/app/views/admins/laboratories/update.js.erb @@ -1 +1,3 @@ -$(".laboratory-item-<%= @laboratory.id %>").html("<%= j render partial: "admins/laboratories/shared/laboratory_item",locals: {laboratory: @laboratory} %>") \ No newline at end of file +var index = $(".laboratory-item-<%= @laboratory.id %>").children(":first").html(); +$(".laboratory-item-<%= @laboratory.id %>").html("<%= j render partial: "admins/laboratories/shared/laboratory_item",locals: {laboratory: @laboratory, index: 1} %>"); +$(".laboratory-item-<%= @laboratory.id %>").children(":first").html(index); \ No newline at end of file diff --git a/app/views/admins/laboratories/update_sync_course.js.erb b/app/views/admins/laboratories/update_sync_course.js.erb index 5ae68f673..663f56ee1 100644 --- a/app/views/admins/laboratories/update_sync_course.js.erb +++ b/app/views/admins/laboratories/update_sync_course.js.erb @@ -1 +1,3 @@ -$("#laboratory-item-<%= @laboratory.id %>").html("<%= j render partial: 'admins/laboratories/shared/laboratory_item', locals: {laboratory: @laboratory} %>") \ No newline at end of file +var index = $(".laboratory-item-<%= @laboratory.id %>").children(":first").html(); +$("#laboratory-item-<%= @laboratory.id %>").html("<%= j render partial: 'admins/laboratories/shared/laboratory_item', locals: {laboratory: @laboratory, index: 1} %>"); +$(".laboratory-item-<%= @laboratory.id %>").children(":first").html(index); \ No newline at end of file diff --git a/app/views/admins/laboratory_shixuns/shared/_list.html.erb b/app/views/admins/laboratory_shixuns/shared/_list.html.erb index e1244c472..462486f4b 100644 --- a/app/views/admins/laboratory_shixuns/shared/_list.html.erb +++ b/app/views/admins/laboratory_shixuns/shared/_list.html.erb @@ -1,21 +1,22 @@
序号 单位名称 域名 统计链接同步课堂 同步实践课程 同步实训操作操作
- + + - + <% if laboratory_shixuns.present? %> - <% laboratory_shixuns.each do |laboratory_shixun| %> + <% laboratory_shixuns.each_with_index do |laboratory_shixun, index| %> - <%= render partial: 'admins/laboratory_shixuns/shared/td', locals: { laboratory_shixun: laboratory_shixun } %> + <%= render partial: 'admins/laboratory_shixuns/shared/td', locals: { laboratory_shixun: laboratory_shixun, index: index } %> <% end %> <% else %> diff --git a/app/views/admins/laboratory_shixuns/shared/_td.html.erb b/app/views/admins/laboratory_shixuns/shared/_td.html.erb index dbdf0df75..d987b53b4 100644 --- a/app/views/admins/laboratory_shixuns/shared/_td.html.erb +++ b/app/views/admins/laboratory_shixuns/shared/_td.html.erb @@ -1,5 +1,6 @@ <%- shixun = laboratory_shixun.shixun -%> +
实训名称序号实训名称 技术平台 技术体系 封面 创建者状态状态 执行时间 操作
<%= list_index_no((params[:page] || 1).to_i, index) %> <%= link_to "/shixuns/#{shixun.identifier}", target: '_blank' do %> <%= shixun.name %> diff --git a/app/views/admins/laboratory_subjects/shared/_list.html.erb b/app/views/admins/laboratory_subjects/shared/_list.html.erb index 55f67dea8..c40d02260 100644 --- a/app/views/admins/laboratory_subjects/shared/_list.html.erb +++ b/app/views/admins/laboratory_subjects/shared/_list.html.erb @@ -1,7 +1,8 @@ - + + @@ -13,10 +14,11 @@ <% if laboratory_subjects.present? %> - <% laboratory_subjects.each do |laboratory_subject| %> + <% laboratory_subjects.each_with_index do |laboratory_subject, index| %> <%- subject = laboratory_subject.subject -%> +
课程名称序号课程名称 技术体系 等级体系 封面
<%= list_index_no((params[:page] || 1).to_i, index) %> <%= link_to(subject.name, "/paths/#{subject.id}", target: '_blank') %> 首页 diff --git a/app/views/admins/laboratory_users/create.js.erb b/app/views/admins/laboratory_users/create.js.erb index f43fd7887..604e62943 100644 --- a/app/views/admins/laboratory_users/create.js.erb +++ b/app/views/admins/laboratory_users/create.js.erb @@ -1,4 +1,6 @@ $('.modal.admin-add-laboratory-user-modal').modal('hide'); $.notify({ message: '操作成功' }); -$('.laboratory-list-table .laboratory-item-<%= current_laboratory.id %>').html("<%= j(render partial: 'admins/laboratories/shared/laboratory_item', locals: { laboratory: current_laboratory }) %>") \ No newline at end of file +var index = $(".laboratory-item-<%= current_laboratory.id %>").children(":first").html(); +$('.laboratory-list-table .laboratory-item-<%= current_laboratory.id %>').html("<%= j(render partial: 'admins/laboratories/shared/laboratory_item', locals: {laboratory: current_laboratory, index: 1}) %>"); +$(".laboratory-item-<%= current_laboratory.id %>").children(":first").html(index); \ No newline at end of file diff --git a/app/views/admins/library_applies/shared/_list.html.erb b/app/views/admins/library_applies/shared/_list.html.erb index 783d0db30..fde3d1d1a 100644 --- a/app/views/admins/library_applies/shared/_list.html.erb +++ b/app/views/admins/library_applies/shared/_list.html.erb @@ -3,11 +3,12 @@ + - + <% if is_processed %> @@ -18,10 +19,11 @@ <% if applies.present? %> - <% applies.each do |apply| %> + <% applies.each_with_index do |apply, index| %> <% user = apply.library.user %> <% library = apply.library %> +
序号 头像 姓名 教学案例 案例描述时间时间拒绝原因 状态
<%= list_index_no((params[:page] || 1).to_i, index) %> <%= link_to "/users/#{user.login}", class: 'professional-authentication-avatar', target: '_blank', data: { toggle: 'tooltip', title: '个人主页' } do %> diff --git a/app/views/admins/partners/shared/_list.html.erb b/app/views/admins/partners/shared/_list.html.erb index 0bebc2a4b..71153c175 100644 --- a/app/views/admins/partners/shared/_list.html.erb +++ b/app/views/admins/partners/shared/_list.html.erb @@ -1,15 +1,17 @@ - + + <% if partners.present? %> - <% partners.each do |partner| %> + <% partners.each_with_index do |partner, index| %> + diff --git a/app/views/admins/professional_authentications/shared/_list.html.erb b/app/views/admins/professional_authentications/shared/_list.html.erb index 6ec6355ba..7ffa5837e 100644 --- a/app/views/admins/professional_authentications/shared/_list.html.erb +++ b/app/views/admins/professional_authentications/shared/_list.html.erb @@ -3,6 +3,7 @@
名称序号名称 <%= sort_tag('添加时间', name: 'created_at', path: admins_partners_path) %> 操作
<%= list_index_no((params[:page] || 1).to_i, index) %> <%= link_to partner.school&.name || partner.name, customers_partner_path(partner), target: '_blank' %>
+ <% unless is_processed %> - + <% unless is_processed %> <% if applies.present? %> - <% applies.each do |apply| %> + <% applies.each_with_index do |apply, index| %> <% user = apply.user %> + <% unless is_processed %> <% end %> diff --git a/app/views/admins/project_package_applies/shared/_list.html.erb b/app/views/admins/project_package_applies/shared/_list.html.erb index d94c96184..bec0912ca 100644 --- a/app/views/admins/project_package_applies/shared/_list.html.erb +++ b/app/views/admins/project_package_applies/shared/_list.html.erb @@ -3,11 +3,12 @@
序号 <%= check_box_tag('all-check', 1, false, id: nil, class: 'batch-all-check-box', @@ -12,7 +13,7 @@ 头像 姓名 学校/单位职称职称 照片 @@ -31,9 +32,10 @@
<%= list_index_no((params[:page] || 1).to_i, index) %><%= check_box_tag('ids[]', apply.id, false, id: nil, class: 'batch-check-box') %>
+ - + <% if is_processed %> @@ -18,10 +19,11 @@ <% if applies.present? %> - <% applies.each do |apply| %> + <% applies.each_with_index do |apply, index| %> <% package = apply.project_package %> <% user = package.creator %> +
序号 头像 姓名 众包需求 需求描述时间时间拒绝原因 状态
<%= list_index_no((params[:page] || 1).to_i, index) %> <%= link_to "/users/#{user.login}", class: 'professional-authentication-avatar', target: '_blank', data: { toggle: 'tooltip', title: '个人主页' } do %> diff --git a/app/views/admins/projects/shared/_list.html.erb b/app/views/admins/projects/shared/_list.html.erb index 8a84a72d0..e2a6307ad 100644 --- a/app/views/admins/projects/shared/_list.html.erb +++ b/app/views/admins/projects/shared/_list.html.erb @@ -1,6 +1,7 @@ + @@ -11,14 +12,15 @@ - + <% if projects.present? %> - <% projects.each do |project| %> + <% projects.each_with_index do |project, index| %> +
序号 ID 项目名称 公开里程碑 成员 管理员<%= sort_tag('创建时间', name: 'created_at', path: admins_projects_path) %><%= sort_tag('创建时间', name: 'created_at', path: admins_projects_path) %> 操作
<%= list_index_no((params[:page] || 1).to_i, index) %> <%= project.id %> <%= link_to(project.name, "/projects/#{project.id}", target: '_blank') %> diff --git a/app/views/admins/schools/index.html.erb b/app/views/admins/schools/index.html.erb index 9c41067ee..56cbadd9d 100644 --- a/app/views/admins/schools/index.html.erb +++ b/app/views/admins/schools/index.html.erb @@ -4,7 +4,7 @@
<%= form_tag(admins_schools_path, method: :get, class: 'form-inline search-form flex-1', remote: true) do %> - <%= text_field_tag(:keyword, params[:keyword], class: 'form-control col-sm-2 ml-3', placeholder: '部门名称检索') %> + <%= text_field_tag(:keyword, params[:keyword], class: 'form-control col-sm-2 ml-3', placeholder: '单位名称检索') %> <%= submit_tag('搜索', class: 'btn btn-primary ml-3', 'data-disable-with': '搜索中...') %> <% end %> diff --git a/app/views/admins/schools/shared/_list.html.erb b/app/views/admins/schools/shared/_list.html.erb index ec7475028..ff0b17992 100644 --- a/app/views/admins/schools/shared/_list.html.erb +++ b/app/views/admins/schools/shared/_list.html.erb @@ -1,6 +1,7 @@ + @@ -11,13 +12,14 @@ - + <% if schools.present? %> - <% schools.each do |school| %> + <% schools.each_with_index do |school, index| %> +
序号 ID LOGO 标识码<%= sort_tag('用户数', name: 'users_count', path: admins_schools_path) %> 部门数 <%= sort_tag('创建时间', name: 'created_at', path: admins_schools_path) %>操作操作
<%= list_index_no((params[:page] || 1).to_i, index) %> <%= school.id %> <% if Util::FileManage.exists?(school) %> diff --git a/app/views/admins/shixun_authorizations/shared/_list.html.erb b/app/views/admins/shixun_authorizations/shared/_list.html.erb index c1dec5f45..c3828ec86 100644 --- a/app/views/admins/shixun_authorizations/shared/_list.html.erb +++ b/app/views/admins/shixun_authorizations/shared/_list.html.erb @@ -3,11 +3,12 @@ + - + <% if is_processed %> @@ -19,12 +20,13 @@ <% if applies.present? %> - <% applies.each do |apply| %> + <% applies.each_with_index do |apply, index| %> <% user = apply.user %> <% shixun = shixun_map[apply.container_id] %> <% content_review = shixun.shixun_reviews.select{|sr| sr.review_type == 'Content'}.first %> <% perference_review = shixun.shixun_reviews.select{|sr| sr.review_type == 'Performance'}.first %> +
序号 头像 创建者 实训名称 审核情况任务数任务数 时间拒绝原因
<%= list_index_no((params[:page] || 1).to_i, index) %> <%= link_to "/users/#{user.login}", class: 'shixun-authorization-avatar', target: '_blank', data: { toggle: 'tooltip', title: '个人主页' } do %> diff --git a/app/views/admins/shixun_recycles/shared/_list.html.erb b/app/views/admins/shixun_recycles/shared/_list.html.erb index 60d2742e9..5518fc753 100644 --- a/app/views/admins/shixun_recycles/shared/_list.html.erb +++ b/app/views/admins/shixun_recycles/shared/_list.html.erb @@ -1,16 +1,18 @@ + - + <% if shixuns.present? %> - <% shixuns.each do |shixun| %> + <% shixuns.each_with_index do |shixun, index| %> + diff --git a/app/views/admins/subject_authorizations/shared/_list.html.erb b/app/views/admins/subject_authorizations/shared/_list.html.erb index 28a699e22..94503dad7 100644 --- a/app/views/admins/subject_authorizations/shared/_list.html.erb +++ b/app/views/admins/subject_authorizations/shared/_list.html.erb @@ -3,9 +3,10 @@
序号 ID 实训名称子站源子站源 创建者 <%= sort_tag('创建于', name: 'created_at', path: admins_shixun_recycles_path) %> 操作
<%= list_index_no((params[:page] || 1).to_i, index) %> <%= shixun.identifier %> <%= link_to overflow_hidden_span(shixun.name), "/shixuns/#{shixun.identifier}", :target => "_blank", :title => shixun.name %> <%= shixun.laboratory&.school&.name %>
+ - + @@ -20,10 +21,11 @@ <% if applies.present? %> - <% applies.each do |apply| %> + <% applies.each_with_index do |apply, index| %> <% user = apply.user %> <% subject = subject_map[apply.container_id] %> +
序号 头像 创建者实践课程名称实践课程名称 阶段数 实训数 关卡数
<%= list_index_no((params[:page] || 1).to_i, index) %> <%= link_to "/users/#{user.login}", class: 'subject-authorization-avatar', target: '_blank', data: { toggle: 'tooltip', title: '个人主页' } do %> diff --git a/app/views/admins/subjects/shared/_list.html.erb b/app/views/admins/subjects/shared/_list.html.erb index 5a37b64e7..33d37f21d 100644 --- a/app/views/admins/subjects/shared/_list.html.erb +++ b/app/views/admins/subjects/shared/_list.html.erb @@ -1,11 +1,12 @@ + - - - - + + + + @@ -17,8 +18,9 @@ <% if subjects.present? %> - <% subjects.each do |subject| %> + <% subjects.each_with_index do |subject, index| %> +
序号 名称阶段数实训数技术体系等级体系阶段数实训数技术体系等级体系 封面 创建者 单位
<%= list_index_no((params[:page] || 1).to_i, index) %> <%= link_to(subject.name, "/paths/#{subject.id}", target: '_blank') %> 首页 diff --git a/app/views/admins/unit_applies/shared/_apply_item.html.erb b/app/views/admins/unit_applies/shared/_apply_item.html.erb index 084826d72..b7d38b776 100644 --- a/app/views/admins/unit_applies/shared/_apply_item.html.erb +++ b/app/views/admins/unit_applies/shared/_apply_item.html.erb @@ -1,3 +1,4 @@ +<%= list_index_no((params[:page] || 1).to_i, index) %> <%= apply.id %> <%= overflow_hidden_span apply.name %> diff --git a/app/views/admins/unit_applies/shared/_list.html.erb b/app/views/admins/unit_applies/shared/_list.html.erb index c28ce7967..75b9c720b 100644 --- a/app/views/admins/unit_applies/shared/_list.html.erb +++ b/app/views/admins/unit_applies/shared/_list.html.erb @@ -1,9 +1,10 @@ + - + @@ -12,9 +13,9 @@ <% if applies.present? %> - <% applies.each do |apply| %> + <% applies.each_with_index do |apply, index| %> - <%= render partial: "admins/unit_applies/shared/apply_item", locals: {apply: apply} %> + <%= render partial: "admins/unit_applies/shared/apply_item", locals: {apply: apply, index: index} %> <% end %> <% else %> diff --git a/app/views/admins/user_statistics/shared/_list.html.erb b/app/views/admins/user_statistics/shared/_list.html.erb index 5759d2f38..1e63fd0ac 100644 --- a/app/views/admins/user_statistics/shared/_list.html.erb +++ b/app/views/admins/user_statistics/shared/_list.html.erb @@ -1,20 +1,22 @@
序号 ID 单位名称地区地区 详细地址 申请者 <%= sort_tag('创建于', name: 'created_at', path: admins_unit_applies_path) %>
+ - - - - + + + + <% if users.present? %> - <% users.each do |user| %> + <% users.each_with_index do |user, index| %> +
序号 姓名 单位部门 学习关卡数<%#= sort_tag('学习关卡数', name: 'study_challenge_count', path: admins_user_statistics_path) %>完成关卡数<%#= sort_tag('完成关卡数', name: 'finish_challenge_count', path: admins_user_statistics_path) %><%= sort_tag('学习实训数', name: 'study_shixun_count', path: admins_user_statistics_path) %><%= sort_tag('完成实训数', name: 'finish_shixun_count', path: admins_user_statistics_path) %>评测次数完成关卡数<%#= sort_tag('完成关卡数', name: 'finish_challenge_count', path: admins_user_statistics_path) %><%= sort_tag('学习实训数', name: 'study_shixun_count', path: admins_user_statistics_path) %><%= sort_tag('完成实训数', name: 'finish_shixun_count', path: admins_user_statistics_path) %>评测次数 实战时间
<%= list_index_no((params[:page] || 1).to_i, index) %> <%= link_to "/users/#{user.login}", target: '_blank' do %> <%= overflow_hidden_span user.real_name, width: 100 %> diff --git a/app/views/admins/users/shared/_user_list.html.erb b/app/views/admins/users/shared/_user_list.html.erb index 0a21baafe..36243e547 100644 --- a/app/views/admins/users/shared/_user_list.html.erb +++ b/app/views/admins/users/shared/_user_list.html.erb @@ -1,8 +1,9 @@ - - + + + @@ -15,8 +16,9 @@ <% if users.present? %> - <% users.each do |user| %> + <% users.each_with_index do |user, index| %> +
真实姓名邮件地址序号真实姓名邮件地址 手机号码 单位 角色
<%= list_index_no((params[:page] || 1).to_i, index) %> <%= link_to "/users/#{user.login}", target: '_blank' do %> <%= overflow_hidden_span user.real_name, width: 100 %> diff --git a/app/views/admins/video_applies/shared/_list.html.erb b/app/views/admins/video_applies/shared/_list.html.erb index 5e472bd4b..3466d21ba 100644 --- a/app/views/admins/video_applies/shared/_list.html.erb +++ b/app/views/admins/video_applies/shared/_list.html.erb @@ -3,12 +3,13 @@ + - + <% if is_processed %> @@ -19,10 +20,11 @@ <% if applies.present? %> - <% applies.each do |v| %> + <% applies.each_with_index do |v, index| %> <% video = v.video %> <% user = video.user %> +
序号 头像 姓名 视频名称 视频大小 播放链接时间时间拒绝原因 状态
<%= list_index_no((params[:page] || 1).to_i, index) %> <%= link_to "/users/#{user.login}", class: 'professional-authentication-avatar', target: '_blank', data: { toggle: 'tooltip', title: '个人主页' } do %>