diff --git a/app/controllers/managements_controller.rb b/app/controllers/managements_controller.rb
index 58190b14a..5afefc51c 100644
--- a/app/controllers/managements_controller.rb
+++ b/app/controllers/managements_controller.rb
@@ -136,7 +136,7 @@ class ManagementsController < ApplicationController
end
if params[:support_shixuns]
- @major = @major.where(:support_shixuns => params[:support_shixuns].to_i)
+ @major = @major.where(:support_shixuns => params[:support_shixuns].to_i,:major_level=> 1)
end
@major = @major.order("created_at #{@sx_order}")
@@ -603,6 +603,7 @@ end
def class_shixuns
@menu_type = 4
@sub_type = 1
+ @sx_order = params[:sx_order].blank? ? "desc" : params[:sx_order]
@edit_class_sx_num=Subject.where(:status => 0).count
@audit_class_sx_num=Subject.where(:status => 1).count
@publish_class_sx_num=Subject.where(:status => 2).count
@@ -631,6 +632,8 @@ end
user_exs = UserExtensions.where(:user_id => @c_shixuns.map(&:user_id))
@schools = School.where(:id => user_exs.map(&:school_id))
end
+ @c_shixuns = @c_shixuns.order("created_at #{@sx_order}")
+
@c_shixuns_count = @c_shixuns.count
limit = 20
@c_shixuns_pages = Paginator.new @c_shixuns_count, limit, params['page'] || 1
@@ -651,6 +654,7 @@ end
def class_publish_shixuns
@menu_type = 4
@sub_type = 2
+ @sx_order = params[:sx_order].blank? ? "desc" : params[:sx_order]
search = params[:search] # 搜索字
keyword = params[:keyword].blank? ? "u_name" : params[:keyword] # 根据姓名/课程名搜索
if params[:school_id] && params[:school_id] != '0'
@@ -670,7 +674,7 @@ end
user_exs = UserExtensions.where(:user_id => @c_shixuns.map(&:user_id))
@schools = School.where(:id => user_exs.map(&:school_id))
end
- @c_shixuns = @c_shixuns.order("created_at desc")
+ @c_shixuns = @c_shixuns.order("created_at #{@sx_order}")
@c_shixuns_count = @c_shixuns.count
limit = 20
@c_shixuns_pages = Paginator.new @c_shixuns_count, limit, params['page'] || 1
@@ -1106,6 +1110,7 @@ end
format.html
end
end
+
# 课程实训发布审批
def deal_subject_authorization
apply_action = ApplyAction.find(params[:apply_id])
@@ -1131,6 +1136,7 @@ end
format.js
end
end
+
# 项目实训发布审批
def deal_shixun_authorization
apply_action = ApplyAction.find(params[:apply_id])
diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb
index d2df3f69f..b7ed11076 100644
--- a/app/controllers/users_controller.rb
+++ b/app/controllers/users_controller.rb
@@ -668,7 +668,8 @@ class UsersController < ApplicationController
@offset ||= @course_result_pages.offset
@course_result = paginateHelper @course_result, @limit
else
- @shixuns_result = Shixun.where(:status => [2,3]).where("name like ?", "%#{@search}%").reorder("created_at desc")
+ # @shixuns_result = Shixun.where(:status => [2,3]).where("name like ?", "%#{@search}%").reorder("created_at desc")
+ @shixuns_result = Shixun.where("name like ?", "%#{@search}%").reorder("created_at desc")
@shixuns_result_count = @shixuns_result.count
@shixun_pages = Paginator.new @shixuns_result_count, @limit, params['page'] || 1
@offset ||= @shixun_pages.offset
diff --git a/app/views/challenges/_edit_skill.html.erb b/app/views/challenges/_edit_skill.html.erb
index 599337fa2..27b3a53cf 100644
--- a/app/views/challenges/_edit_skill.html.erb
+++ b/app/views/challenges/_edit_skill.html.erb
@@ -1,28 +1,28 @@
diff --git a/app/views/challenges/_skill_form.html.erb b/app/views/challenges/_skill_form.html.erb
index 682901801..8540374d9 100644
--- a/app/views/challenges/_skill_form.html.erb
+++ b/app/views/challenges/_skill_form.html.erb
@@ -31,7 +31,7 @@
-
+
@@ -57,6 +57,7 @@
// 获取父节点的id
var obj = $(thisObj).parent();
$(obj).remove();
+ $("#challenge_skill_update").submit();
}
$(document).click(function(e){
if(e.target.id==$("#edit_skill").attr("id")||e.target.id==$("#add_knowledge").attr("id")||e.target.className==$(".knowledge_frame").attr("class")||e.target.className==$(".close").attr("class")||e.target.id==$("#shixun_skill_input").attr("id")){
diff --git a/app/views/layouts/_logined_header.html.erb b/app/views/layouts/_logined_header.html.erb
index 3861be090..de597ba44 100644
--- a/app/views/layouts/_logined_header.html.erb
+++ b/app/views/layouts/_logined_header.html.erb
@@ -111,8 +111,8 @@
var keyword = $("input[name='search_keyword']").val(); // 搜索关键字
var index = $("#all_status_show_value").text(); // 搜索课程/项目
index = index == "课堂" ? 1 : 2;
- console.log("课堂" === index);
- console.log("实训" === index);
+// console.log("课堂" === index);
+// console.log("实训" === index);
window.location.href = "<%= search_shixuns_or_courses_users_path %>" + "?search=" + keyword + "&index=" + index;
/* $.ajax({
url: "<%#= search_shixuns_or_courses_users_path %>",
diff --git a/app/views/managements/_class_publish_shixuns_list.html.erb b/app/views/managements/_class_publish_shixuns_list.html.erb
index ab4fd8871..2a57856d7 100644
--- a/app/views/managements/_class_publish_shixuns_list.html.erb
+++ b/app/views/managements/_class_publish_shixuns_list.html.erb
@@ -5,7 +5,7 @@
实训套件名称
单位
创建者
- 发布时间
+ 发布时间 color-light-green ml5">
@@ -29,3 +29,15 @@
+
\ No newline at end of file
diff --git a/app/views/managements/_class_shixuns_list.html.erb b/app/views/managements/_class_shixuns_list.html.erb
index de0d67b18..8d36b085e 100644
--- a/app/views/managements/_class_shixuns_list.html.erb
+++ b/app/views/managements/_class_shixuns_list.html.erb
@@ -51,17 +51,6 @@
diff --git a/app/views/managements/_close_shixun_list.html.erb b/app/views/managements/_close_shixun_list.html.erb
index bbaae10a5..155fe70a7 100644
--- a/app/views/managements/_close_shixun_list.html.erb
+++ b/app/views/managements/_close_shixun_list.html.erb
@@ -1,7 +1,7 @@
ID
- 实训名称
+ 实训名称
顶
踩
未通关
@@ -14,7 +14,7 @@
<% @shixuns.each do |shixun| %>
<%= shixun.identifier %>
- <%= link_to shixun.name, shixun_path(shixun), :target => "_blank", :title => shixun.name %>
+ <%= link_to shixun.name, shixun_path(shixun), :target => "_blank", :title => shixun.name %>
<%= PraiseTread.where(:praise_tread_object_id => shixun.challenges, :praise_tread_object_type => "Challenge").count %>
diff --git a/app/views/managements/_depart_list.html.erb b/app/views/managements/_depart_list.html.erb
index 6473af2a5..2e0d468cc 100644
--- a/app/views/managements/_depart_list.html.erb
+++ b/app/views/managements/_depart_list.html.erb
@@ -1,3 +1,4 @@
+<% unless @apply_status.blank? %>
@@ -24,6 +25,9 @@
<% end %>
+<% else %>
+ <%= render :partial => "welcome/no_data" %>
+<% end %>
diff --git a/app/views/managements/_publish_shixun_list.html.erb b/app/views/managements/_publish_shixun_list.html.erb
index 3f65e7f56..8d3844909 100644
--- a/app/views/managements/_publish_shixun_list.html.erb
+++ b/app/views/managements/_publish_shixun_list.html.erb
@@ -1,7 +1,7 @@
ID
- 实训名称
+ 实训名称
顶
踩
已通关
@@ -15,7 +15,7 @@
<% @shixuns.each do |shixun| %>
<%= shixun.identifier %>
- <%= link_to shixun.name, shixun_path(shixun), :target => "_blank", :title => shixun.name %>
+ <%= link_to shixun.name, shixun_path(shixun), :target => "_blank", :title => shixun.name %>
<%= PraiseTread.where(:praise_tread_object_id => shixun.challenges, :praise_tread_object_type => "Challenge").count %>
diff --git a/app/views/managements/_shixun_list.html.erb b/app/views/managements/_shixun_list.html.erb
index 8b99c3603..d83b7801a 100644
--- a/app/views/managements/_shixun_list.html.erb
+++ b/app/views/managements/_shixun_list.html.erb
@@ -1,7 +1,7 @@
ID
- 实训名称
+ 实训名称
技术平台
任务
状态
@@ -13,7 +13,7 @@
<% @shixuns.each do |shixun| %>
<%= shixun.identifier %>
- <%= link_to shixun.name, shixun_path(shixun), :target => "_blank", :title => shixun.name %>
+ <%= link_to shixun.name, shixun_path(shixun), :target => "_blank", :title => shixun.name %>
<%= shixun.language %>
<%= shixun.challenges.count %>
<%= shixun_authentication_status shixun %>
@@ -22,7 +22,7 @@
<% if shixun.status == 0 %>
- <%= link_to(l(:button_delete), shixun_path(shixun), :method => :delete, :data => { confirm: "确认删除" } ) %>
+ <%= link_to(l(:button_delete), shixun_path(shixun), :method => :delete, :data => { confirm: "您确定要删除吗?" } ) %>
<% end %>
value="0" id="shixun_hidden_<%= shixun.id %>" name="hidden" class="ml-3 mr5 magic-checkbox">
diff --git a/app/views/managements/_subject_authorization_list.html.erb b/app/views/managements/_subject_authorization_list.html.erb
index 403933b91..63671bc55 100644
--- a/app/views/managements/_subject_authorization_list.html.erb
+++ b/app/views/managements/_subject_authorization_list.html.erb
@@ -1,3 +1,4 @@
+<% unless @authorizations.blank? %>
<% @authorizations.each do |authorization| %>
<% user = authorization.user %>
@@ -34,6 +35,9 @@
<% end %>
+<% else %>
+ <%= render :partial => "welcome/no_data" %>
+<% end %>
\ No newline at end of file
+
+
+
\ No newline at end of file
diff --git a/app/views/users/show.html.erb b/app/views/users/show.html.erb
index 793c37db9..16769deff 100644
--- a/app/views/users/show.html.erb
+++ b/app/views/users/show.html.erb
@@ -103,7 +103,7 @@
-
+
<% update_visiti_count @user %>
<%= @user.visits.to_i %> 次访问
diff --git a/app/views/users/user_fanslist.html.erb b/app/views/users/user_fanslist.html.erb
index 3a70d0244..f04106015 100644
--- a/app/views/users/user_fanslist.html.erb
+++ b/app/views/users/user_fanslist.html.erb
@@ -1,10 +1,10 @@
- <% str = current_user ? '我' : 'TA' %>
+ <% str = (current_user == @user) ? '我' : 'TA' %>
- <%= str %>的关注 <%= @user_watchlist_count %>
+ <%= str %>的关注 <%= @user_watchlist_count %>
<%= str %>的粉丝 <%= @user_fanlist_count %>
@@ -29,4 +29,5 @@
$(this).html() == "关注" ? $(this).html("关注") : $(this).html("已关注");
}
});
+
\ No newline at end of file
diff --git a/public/stylesheets/css/edu-common.css b/public/stylesheets/css/edu-common.css
index f8aefdebb..eae14c436 100644
--- a/public/stylesheets/css/edu-common.css
+++ b/public/stylesheets/css/edu-common.css
@@ -437,3 +437,5 @@ input::-ms-clear{display:none;}
.transform90{transform: rotate(90deg);}
/*---------------------编辑器边框------------------------*/
.kindeditor{background: #F0F0EE;height:22px;border:1px solid #CCCCCC;border-bottom: none}
+/**/
+#edu-tab-nav .edu-position-hidebox li a{font-size: 12px}
\ No newline at end of file