申请类消息冲突问题、user base几个取值的修改
This commit is contained in:
parent
5f57e99b1d
commit
fbc70614ed
File diff suppressed because it is too large
Load Diff
|
@ -2906,8 +2906,7 @@ module ApplicationHelper
|
|||
|
||||
# 用户竞赛总数
|
||||
def user_contest_count
|
||||
count = @user.favorite_contests.visible.where("is_delete =?", 0).count
|
||||
return count
|
||||
@user.favorite_contests.visible.where("is_delete =?", 0).count
|
||||
end
|
||||
|
||||
# 用户项目总数
|
||||
|
@ -2946,14 +2945,12 @@ module ApplicationHelper
|
|||
|
||||
# 用户发布的issue数
|
||||
def issues_author_is_self_count
|
||||
@issues = Issue.where( :author_id => @user.id )
|
||||
@issues_author_is_self_count = @issues.count
|
||||
Issue.where(:author_id => @user.id).count
|
||||
end
|
||||
|
||||
# 用户收到的issue数
|
||||
def issues_assigned_is_self_count
|
||||
@issues = Issue.where( :assigned_to_id => @user.id )
|
||||
@issues_assigned_is_self_count = @issues.count
|
||||
Issue.where( :assigned_to_id => @user.id ).count
|
||||
end
|
||||
|
||||
def get_user_roll user
|
||||
|
|
|
@ -94,10 +94,10 @@
|
|||
</div>
|
||||
|
||||
<div class="navHomepageNews" id="user_messages">
|
||||
<%= link_to "", user_message_path(User.current), :class => "homepageNewsIcon", :target => "_Blank", :title => "您的所有消息" %>
|
||||
<%= link_to "", user_path(User.current), :class => "homepageNewsIcon", :target => "_Blank", :title => "您的所有消息" %>
|
||||
<% new_message_count = User.current.count_new_message.to_i %>
|
||||
<% if new_message_count > 0 %>
|
||||
<div ><%= link_to new_message_count, user_message_path(User.current), :class => "newsActive", :target => "_Blank" %></div>
|
||||
<div ><%= link_to new_message_count, user_path(User.current), :class => "newsActive", :target => "_Blank" %></div>
|
||||
<% end %>
|
||||
<%#= link_to User.current.count_new_message, user_message_path(User.current), :class => "homepageNewsIcon" %>
|
||||
<div class="shadowbox_news undis" id="user_messages_list">
|
||||
|
|
|
@ -37,27 +37,6 @@
|
|||
$("#relateProject,.relatePInfo").mouseout(function(){
|
||||
$(".relatePInfo").css("display","none");
|
||||
});
|
||||
// $(".homepagePostPortrait").mouseover(function(){
|
||||
// onImage = true;
|
||||
// $(this).children(".userCard").css("display","block");
|
||||
// });
|
||||
// $(".homepagePostPortrait").mouseout(function(){
|
||||
// var cur = $(this);
|
||||
// onImage = false;
|
||||
// setTimeout(function(){
|
||||
// if (onUserCard == false && onImage == false) {
|
||||
// $(cur).children(".userCard").css("display","none");
|
||||
// }
|
||||
// },500);
|
||||
// });
|
||||
// $(".userCard").mouseover(function(){
|
||||
// onUserCard = true;
|
||||
// $(this).css("display","block");
|
||||
// });
|
||||
// $(".userCard").mouseout(function(){
|
||||
// onUserCard = false;
|
||||
// $(this).css("display","none");
|
||||
// });
|
||||
$(".coursesLineGrey").mouseover(function(){
|
||||
$(this).css("color","#ffffff");
|
||||
})
|
||||
|
@ -102,7 +81,7 @@
|
|||
<div class="homepageContent">
|
||||
<div class="homepageLeft mt10" id="LSide">
|
||||
<div class="user_leftinfo mb10">
|
||||
<% if User.current.logged? && User.current == @user%>
|
||||
<% if User.current.logged? && User.current == @user %>
|
||||
<div class="pr" style="width: 80px; margin:0 auto;">
|
||||
<%= link_to image_tag(url_to_avatar(@user),width:"74", height: "74", :id => 'nh_source_tx'),
|
||||
my_clear_user_avatar_temp_path, :class => "user_leftinfo_img", :remote => true %>
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
<%# 系统消息总显示在最上面 %>
|
||||
<%= render :partial => 'users/user_message_system' %>
|
||||
<%= render :partial => 'users/user_message_system' if !@system_messages.nil? %>
|
||||
|
||||
<% message_alls.each do |ma| %>
|
||||
<% ma = ma.try(:message) %>
|
||||
<% ma = ma.try(:message) if ma.is_a?(MessageAll) %>
|
||||
<% if ma.class == AtMessage && ma.at_valid? && ma.at_message %>
|
||||
<%= render :partial => 'users/user_at_message', :locals => {:ma => ma} %>
|
||||
<% end %>
|
||||
|
@ -45,7 +45,11 @@
|
|||
<% end %>
|
||||
|
||||
<ul class="pages" style="width: auto;display: table;margin-left: auto;margin-right: auto; padding-top: 10px">
|
||||
<%= pagination_links_full @message_all_pages, @messages_count, :per_page_links => false, :remote => true, :flag => true, :is_new => true %>
|
||||
<% if params[:action] == "unapproval_applied_list" %>
|
||||
<%= pagination_links_full @obj_pages, @obj_count, :per_page_links => false, :remote => true, :flag => true, :is_new => true %>
|
||||
<% else %>
|
||||
<%= pagination_links_full @message_all_pages, @messages_count, :per_page_links => false, :remote => true, :flag => true, :is_new => true %>
|
||||
<% end %>
|
||||
</ul>
|
||||
<script>
|
||||
$(function(){
|
||||
|
|
Loading…
Reference in New Issue