+ <%= list_index_no(@params_page.to_i, index) %> |
<%= myshixun.id %> |
<%= myshixun.identifier %> |
From 1d67530fa6956693c09b4c36c4cf6c0a22d9b297 Mon Sep 17 00:00:00 2001
From: cxt <853663049@qq.com>
Date: Tue, 10 Dec 2019 12:45:31 +0800
Subject: [PATCH 3/8] =?UTF-8?q?=E8=B5=84=E6=BA=90=E7=9A=84=E7=AB=8B?=
=?UTF-8?q?=E5=8D=B3=E5=8F=91=E5=B8=83?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/controllers/files_controller.rb | 30 ++++++++++++++---------------
1 file changed, 15 insertions(+), 15 deletions(-)
diff --git a/app/controllers/files_controller.rb b/app/controllers/files_controller.rb
index 9a3eec9ca..25e0de44a 100644
--- a/app/controllers/files_controller.rb
+++ b/app/controllers/files_controller.rb
@@ -47,26 +47,26 @@ class FilesController < ApplicationController
def bulk_publish
return normal_status(403, "您没有权限进行操作") if current_user.course_identity(@course) >= 5
- tip_exception("请至少选择一个分班") if params[:group_ids].blank? && @course.course_groups.size != 0
+ # tip_exception("请至少选择一个分班") if params[:group_ids].blank? && @course.course_groups.size != 0
attachments = @course.attachments.by_ids(@attachment_ids)
ActiveRecord::Base.transaction do
# 有分班设置时
- if @course.course_group_module? && @course.course_groups_count != 0 && params[:group_ids]
- group_ids = params[:group_ids]&.reject(&:blank?)
- charge_group_ids = @course.charge_group_ids(current_user)
- publish_groups = charge_group_ids & group_ids if group_ids
-
- attachments.each do |atta|
- if atta.published? && !atta.unified_setting || !atta.published?
- create_atta_group_settings atta
- atta.update_all(unified_setting: 0) if atta.unified_setting
- none_publish_settings = atta.attachment_group_settings.where(course_group_id: publish_groups).none_published
- none_publish_settings.update_all(publish_time: Time.now)
- end
- end
- end
+ # if @course.course_group_module? && @course.course_groups_count != 0 && params[:group_ids]
+ # group_ids = params[:group_ids]&.reject(&:blank?)
+ # charge_group_ids = @course.charge_group_ids(current_user)
+ # publish_groups = charge_group_ids & group_ids if group_ids
+ #
+ # attachments.each do |atta|
+ # if atta.published? && !atta.unified_setting || !atta.published?
+ # create_atta_group_settings atta
+ # atta.update_attributes!(unified_setting: 0) if atta.unified_setting
+ # none_publish_settings = atta.attachment_group_settings.where(course_group_id: publish_groups).none_published
+ # none_publish_settings.update_all(publish_time: Time.now)
+ # end
+ # end
+ # end
# 未发布的资源更新状态
attachments.where(is_publish: 0).update_all(is_publish: 1, publish_time: Time.now)
From d50634bb924448dd41638ec53aab320893002469 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com>
Date: Tue, 10 Dec 2019 12:45:46 +0800
Subject: [PATCH 4/8] =?UTF-8?q?=E8=B0=83=E6=95=B4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
public/react/src/modules/courses/Resource/index.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/public/react/src/modules/courses/Resource/index.js b/public/react/src/modules/courses/Resource/index.js
index c4ec4df02..ce4fb8dc2 100644
--- a/public/react/src/modules/courses/Resource/index.js
+++ b/public/react/src/modules/courses/Resource/index.js
@@ -756,7 +756,7 @@ class Fileslists extends Component{
Savesname={this.state.Savesname}
Cancel={this.state.Cancel}
Saves={this.state.Saves}
- course_groups={this.state.course_groups}
+ // course_groups={this.state.course_groups}
/>:""}
{/*发送*/}
From 6578478715ce58ac6268dc6fcb4035097ceafac8 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com>
Date: Tue, 10 Dec 2019 14:26:51 +0800
Subject: [PATCH 5/8] =?UTF-8?q?=E8=B0=83=E6=95=B4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../react/src/modules/courses/coursesPublic/NewShixunModel.js | 3 +++
1 file changed, 3 insertions(+)
diff --git a/public/react/src/modules/courses/coursesPublic/NewShixunModel.js b/public/react/src/modules/courses/coursesPublic/NewShixunModel.js
index 99a8ad232..a20f7733c 100644
--- a/public/react/src/modules/courses/coursesPublic/NewShixunModel.js
+++ b/public/react/src/modules/courses/coursesPublic/NewShixunModel.js
@@ -428,6 +428,9 @@ class NewShixunModel extends Component{
.ant-drawer-body {
padding:15px 24px 24px 0px;
}
+ .ant-dropdown {
+ z-index:11000
+ }
`
}
From 40fd4cdbb7643092680877664243c75bff024b72 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com>
Date: Tue, 10 Dec 2019 15:10:09 +0800
Subject: [PATCH 6/8] =?UTF-8?q?=E8=B0=83=E6=95=B4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../react/src/modules/courses/elearning/YslDetailCards.js | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/public/react/src/modules/courses/elearning/YslDetailCards.js b/public/react/src/modules/courses/elearning/YslDetailCards.js
index e705894e6..55bed2b5e 100644
--- a/public/react/src/modules/courses/elearning/YslDetailCards.js
+++ b/public/react/src/modules/courses/elearning/YslDetailCards.js
@@ -492,13 +492,13 @@ class YslDetailCards extends Component{
:
}
-
+
{key+1}-{index+1} {line.shixun_name}
{
- this.props.current_user&&this.props.current_user.admin===false&&line.shixun_status==="暂未公开"?
+ this.props.current_user&&this.props.current_user.admin===false&&this.props.current_user&&this.props.current_user.business===false&&line.shixun_status==="暂未公开"?
暂未公开
:
@@ -512,7 +512,7 @@ class YslDetailCards extends Component{
}
- {this.props.current_user&&this.props.current_user.admin===false&&line.shixun_status==="暂未公开"?"":
+ {this.props.current_user&&this.props.current_user.admin===false&&this.props.current_user&&this.props.current_user.business===false&&line.shixun_status==="暂未公开"?"":
{
showparagraphkey === key && showparagraphindex === index ? "" :
实验任务
Date: Tue, 10 Dec 2019 15:43:12 +0800
Subject: [PATCH 7/8] =?UTF-8?q?=E8=B6=85=E7=BA=A7=E7=AE=A1=E7=90=86?=
=?UTF-8?q?=E5=91=98=E9=A1=B5=E9=9D=A2=E5=A2=9E=E5=8A=A0=E5=BA=8F=E5=8F=B7?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/views/admins/courses/shared/_list.html.erb | 13 +++++++------
app/views/admins/courses/shared/_td.html.erb | 1 +
app/views/admins/courses/update.js.erb | 4 +++-
app/views/admins/customers/shared/_list.html.erb | 6 ++++--
.../admins/department_applies/shared/_list.html.erb | 6 ++++--
app/views/admins/department_members/create.js.erb | 4 +++-
.../departments/shared/_department_item.html.erb | 1 +
app/views/admins/departments/shared/_list.html.erb | 7 ++++---
app/views/admins/departments/update.js.erb | 4 +++-
.../identity_authentications/shared/_list.html.erb | 6 ++++--
.../laboratories/shared/_laboratory_item.html.erb | 1 +
app/views/admins/laboratories/shared/_list.html.erb | 7 ++++---
app/views/admins/laboratories/update.js.erb | 4 +++-
.../admins/laboratories/update_sync_course.js.erb | 4 +++-
.../admins/laboratory_shixuns/shared/_list.html.erb | 9 +++++----
.../admins/laboratory_shixuns/shared/_td.html.erb | 1 +
.../laboratory_subjects/shared/_list.html.erb | 6 ++++--
app/views/admins/laboratory_users/create.js.erb | 4 +++-
.../admins/library_applies/shared/_list.html.erb | 6 ++++--
app/views/admins/partners/shared/_list.html.erb | 6 ++++--
.../shared/_list.html.erb | 6 ++++--
.../project_package_applies/shared/_list.html.erb | 6 ++++--
app/views/admins/projects/shared/_list.html.erb | 6 ++++--
app/views/admins/schools/index.html.erb | 2 +-
app/views/admins/schools/shared/_list.html.erb | 6 ++++--
.../shixun_authorizations/shared/_list.html.erb | 6 ++++--
.../admins/shixun_recycles/shared/_list.html.erb | 6 ++++--
.../subject_authorizations/shared/_list.html.erb | 6 ++++--
app/views/admins/subjects/shared/_list.html.erb | 12 +++++++-----
.../admins/unit_applies/shared/_apply_item.html.erb | 1 +
app/views/admins/unit_applies/shared/_list.html.erb | 7 ++++---
.../admins/user_statistics/shared/_list.html.erb | 12 +++++++-----
app/views/admins/users/shared/_user_list.html.erb | 8 +++++---
.../admins/video_applies/shared/_list.html.erb | 6 ++++--
34 files changed, 123 insertions(+), 67 deletions(-)
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 @@
+ 序号 |
ID |
课堂名称 |
- 成员 |
+ 成员 |
资源 |
普通作业 |
分组作业 |
实训作业 |
试卷 |
- 评测次数 |
+ 评测次数 |
私有 |
状态 |
单位 |
创建者 |
<%= sort_tag('创建时间', name: 'created_at', path: admins_courses_path) %> |
首页 |
- 邮件通知 |
- 操作 |
+ 邮件通知 |
+ 操作 |
<% 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 @@
+<%= 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 @@
- 客户名称 |
+ 序号 |
+ 客户名称 |
<%= sort_tag('添加时间', name: 'created_at', path: admins_partner_customers_path(current_partner)) %> |
操作 |
<% if customers.present? %>
- <% customers.each do |customer| %>
+ <% customers.each_with_index do |customer, index| %>
+ <%= 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 @@
+ 序号 |
ID |
部门名称 |
单位名称 |
- 创建者 |
+ 创建者 |
<%= sort_tag('创建于', name: 'created_at', path: admins_department_applies_path) %> |
操作 |
<% if applies.present? %>
- <% applies.each do |apply| %>
+ <% applies.each_with_index do |apply, index| %>
+ <%= list_index_no((params[:page] || 1).to_i, index) %> |
<%= apply.id %> |
<%= apply.name %> |
<%= apply.school.try(:name) %> |
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 @@
+<%= list_index_no((params[:page] || 1).to_i, index) %> |
<% not_list = defined?(:users_count) %>
<%= overflow_hidden_span department.name, width: 150 %> |
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 @@
+ 序号 |
部门名称 |
单位名称 |
用户数 |
- 已职业认证 |
+ 已职业认证 |
部门管理员 |
统计链接 |
云主机数 |
@@ -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 %>
<%= check_box_tag('all-check', 1, false, id: nil, class: 'batch-all-check-box',
@@ -13,7 +14,7 @@
| 姓名 |
身份证号 |
学校/单位 |
- 职称 |
+ 职称 |
<% unless is_processed %>
照片
@@ -33,9 +34,10 @@
|
<% if applies.present? %>
- <% applies.each do |apply| %>
+ <% applies.each_with_index do |apply, index| %>
<% user = apply.user %>
+ <%= list_index_no((params[:page] || 1).to_i, index) %> |
<% unless is_processed %>
<%= check_box_tag('ids[]', apply.id, false, id: nil, class: 'batch-check-box') %> |
<% 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 %>
+<%= 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 @@
- 名称 |
+ 序号 |
+ 名称 |
<%= sort_tag('添加时间', name: 'created_at', path: admins_partners_path) %> |
操作 |
<% if partners.present? %>
- <% partners.each do |partner| %>
+ <% partners.each_with_index do |partner, index| %>
+ <%= list_index_no((params[:page] || 1).to_i, index) %> |
<%= link_to partner.school&.name || partner.name, customers_partner_path(partner), target: '_blank' %>
|
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 @@
+ 序号 |
<% unless is_processed %>
<%= check_box_tag('all-check', 1, false, id: nil, class: 'batch-all-check-box',
@@ -12,7 +13,7 @@
| 头像 |
姓名 |
学校/单位 |
- 职称 |
+ 职称 |
<% unless is_processed %>
照片
@@ -31,9 +32,10 @@
|
<% if applies.present? %>
- <% applies.each do |apply| %>
+ <% applies.each_with_index do |apply, index| %>
<% user = apply.user %>
+ <%= list_index_no((params[:page] || 1).to_i, index) %> |
<% unless is_processed %>
<%= check_box_tag('ids[]', apply.id, false, id: nil, class: 'batch-check-box') %> |
<% 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 @@
+ 序号 |
头像 |
姓名 |
众包需求 |
需求描述 |
- 时间 |
+ 时间 |
<% 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 @@
+ 序号 |
ID |
项目名称 |
公开 |
@@ -11,14 +12,15 @@
里程碑 |
成员 |
管理员 |
- <%= sort_tag('创建时间', name: 'created_at', path: admins_projects_path) %> |
+ <%= sort_tag('创建时间', name: 'created_at', path: admins_projects_path) %> |
操作 |
<% if projects.present? %>
- <% projects.each do |project| %>
+ <% projects.each_with_index do |project, index| %>
+ <%= 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 @@
| | | | | | | | |