个人主页:如图值为0时,这些字段不要显示

This commit is contained in:
zhangshenjerry 2015-07-24 16:33:53 +08:00
parent 7f8f957a71
commit 6b3882aff8
2 changed files with 54 additions and 19 deletions

View File

@ -149,29 +149,65 @@
<div class="leftbox mt10">
<ul class="leftbox_ul_left">
<% if !@user.user_extensions.nil? && @user.user_extensions.identity == 0 %>
<li>创建课程&nbsp;:</li>
<li>发布作业&nbsp;:</li>
<% if(get_create_course_count(@user)) == 0 %>
<li>创建课程&nbsp;:</li>
<% end %>
<% if(get_homework_commons_count(@user)) == 0 %>
<li>发布作业&nbsp;:</li>
<% end %>
<% end %>
<% if (get_join_course_count(@user) != 0) %>
<li>加入课程&nbsp;:</li>
<% end %>
<% if @user.user_extensions.identity == 0 %>
<li>参加匿评&nbsp;:</li>
<% end %>
<% if (get_projectandcourse_attachment_count(@user) != 0) %>
<li>发布资源&nbsp;:</li>
<% end %>
<% if (get_create_project_count(@user) != 0) %>
<li>创建项目&nbsp;:</li>
<% end %>
<% if (get_join_project_count(@user) != 0) %>
<li>加入项目&nbsp;:</li>
<% end %>
<% if (get_create_issue_count(@user) != 0) %>
<li>发布缺陷&nbsp;:</li>
<% end %>
<% if (get_resolve_issue_count(@user) != 0) %>
<li>解决缺陷&nbsp;:</li>
<% end %>
<li>加入课程&nbsp;:</li>
<li>参加匿评&nbsp;:</li>
<li>发布资源&nbsp;:</li>
<li>创建项目&nbsp;:</li>
<li>加入项目&nbsp;:</li>
<li>发布缺陷&nbsp;:</li>
<li>解决缺陷&nbsp;:</li>
</ul>
<ul class="leftbox_ul_right c_dgrey">
<% if !@user.user_extensions.nil? && @user.user_extensions.identity == 0 %>
<li><%= get_create_course_count(@user) %></li>
<li><%= get_homework_commons_count(@user) %></li>
<% if(get_create_course_count(@user)) == 0 %>
<li><%= get_create_course_count(@user) %></li>
<% end %>
<% if(get_homework_commons_count(@user)) == 0 %>
<li><%= get_homework_commons_count(@user) %></li>
<% end %>
<% end %>
<% if (get_join_course_count(@user) != 0) %>
<li><%= get_join_course_count(@user) %></li>
<% end %>
<% if @user.user_extensions.identity == 0 %>
<li><%= get_anonymous_evaluation_count(@user) %></li>
<% end %>
<% if (get_projectandcourse_attachment_count(@user) != 0) %>
<li><%= get_projectandcourse_attachment_count(@user) %></li>
<% end %>
<% if (get_create_project_count(@user) != 0) %>
<li><%= get_create_project_count(@user) %></li>
<% end %>
<% if (get_join_project_count(@user) != 0) %>
<li><%= get_join_project_count(@user) %></li>
<% end %>
<% if (get_create_issue_count(@user) != 0) %>
<li><%= get_create_issue_count(@user) %></li>
<% end %>
<% if (get_resolve_issue_count(@user) != 0) %>
<li><%= get_resolve_issue_count(@user) %></li>
<% end %>
<li><%= get_join_course_count(@user) %></li>
<li><%= get_anonymous_evaluation_count(@user) %></li>
<li><%= get_projectandcourse_attachment_count(@user) %></li>
<li><%= get_create_project_count(@user) %></li>
<li><%= get_join_project_count(@user) %></li>
<li><%= get_create_issue_count(@user) %></li>
<li><%= get_resolve_issue_count(@user) %></li>
</ul>
<div class="cl"></div>
</div>

View File

@ -540,7 +540,6 @@
$('#my_account_form_btn').click();
});
$('#my_password_form_link').click(function(){
alert("密码修改成功,请重新登录!");
$('#my_password_form_btn').click();
});
});