课程、项目列表修改

This commit is contained in:
yuanke 2016-05-03 14:30:35 +08:00
parent d5805e8103
commit 2468010125
2 changed files with 2 additions and 2 deletions

View File

@ -75,7 +75,7 @@
<% end%>
<script type="text/javascript">
var coursecount = <%= @user.courses.visible.count%>;
var coursecount = <%= @user.courses.visible.where("is_delete =?", 0).select("courses.* FROM `course_activities` WHERE course_activities.course_id = courses.id) ").count %>;
var courseshowcount = document.getElementsByClassName("coursesLineGrey").length;
if((coursecount == courseshowcount)&&(coursecount > 5) ){

View File

@ -56,7 +56,7 @@
<% end%>
<script type="text/javascript">
var projectcount = <%= @user.projects.visible.count%>;
var projectcount = <%= @user.projects.visible.select("projects.* FROM `forge_activities` WHERE forge_activities.project_id = projects.id) ").count %>;
var projectshowcount = document.getElementsByClassName("projectsLineGrey").length;
if((projectcount == projectshowcount)&&(projectcount > 5)){