申请项目,申请人接受到的消息调整为:申请人头像+申请姓名+消息
This commit is contained in:
parent
b4d4fa4e28
commit
a40b7f6fd0
|
@ -2059,11 +2059,11 @@ class UsersController < ApplicationController
|
|||
anonymous_evaluation_ids = student_work_scores.blank? ? "(-1)" : "(" + student_work_scores.map{|st| st.student_work_id}.join(",") + ")"
|
||||
unfinished_evaluations = @user.student_works_evaluation_distributions.where("student_work_id not in #{anonymous_evaluation_ids}")
|
||||
unfinished_evaluations_work_ids = unfinished_evaluations.blank? ? "(-1)" : "(" + unfinished_evaluations.map{|st| st.student_work_id}.join(",") + ")"
|
||||
@anonymous_evaluation_count = StudentWork.where("student_works.id in #{unfinished_evaluations_work_ids} and homework_common_id in #{homework_ids}").count
|
||||
homework_ids = StudentWork.where("id in #{unfinished_evaluations_work_ids} and homework_common_id in #{homework_ids}").blank? ? "(-1)" : "(" + StudentWork.where("id in #{unfinished_evaluations_work_ids} and homework_common_id in #{homework_ids}").map{|st| st.homework_common_id}.join(",") + ")"
|
||||
@anonymous_evaluation = HomeworkCommon.where("homework_commons.id in #{homework_ids}")
|
||||
@anonymous_evaluation_count = @anonymous_evaluation.count
|
||||
@limit = 20
|
||||
@anonymous_evaluation_pages = Paginator.new @anonymous_evaluation_count, @limit, params['page'] || 1
|
||||
@anonymous_evaluation_pages = Paginator.new @anonymous_evaluation.count, @limit, params['page'] || 1
|
||||
@offset ||= @anonymous_evaluation_pages.offset
|
||||
@anonymous_evaluation = paginateHelper @anonymous_evaluation, @limit
|
||||
respond_to do |format|
|
||||
|
|
|
@ -136,7 +136,7 @@ module UsersHelper
|
|||
def applied_project_users applied_message
|
||||
# case applied_message.status
|
||||
# when 3,2,1,5,4,7,6
|
||||
user = User.find(applied_message.applied_user_id).show_name
|
||||
user = User.find(applied_message.applied_user_id)
|
||||
# end
|
||||
end
|
||||
|
||||
|
|
|
@ -1,6 +1,10 @@
|
|||
<div class="shortMessageWidth">
|
||||
<li class="homepageNewsPortrait fl">
|
||||
<%=link_to image_tag(url_to_avatar(applied_project_users(ma)), :width => "30", :height => "30"), user_path(applied_project_users(ma)), :target => '_blank' %>
|
||||
<% if ma.status == 4 || ma.status == 6 %>
|
||||
<%= link_to image_tag(url_to_avatar(User.where(:id => ma.user_id).first), :width => "30", :height => "30"), user_path(User.where(:id => ma.user_id).first), :target => '_blank' %>
|
||||
<% else %>
|
||||
<%= link_to image_tag(url_to_avatar(applied_project_users(ma)), :width => "30", :height => "30"), user_path(applied_project_users(ma)), :target => '_blank' %>
|
||||
<% end %>
|
||||
</li>
|
||||
<li class="homepageNewsPubType fl">
|
||||
<%= render :partial => "users/user_message_applide_users", :locals =>{:ma => ma} %>
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
<% elsif ma.status == 2 %>
|
||||
<span class="fontGrey3" style="font-size:14px;">已处理</span>
|
||||
<% elsif ma.status == 4 %>
|
||||
<% operator_message = AppliedMessage.where("applied_id=? and status not in (2,4)", ma.applied_id).first %>
|
||||
<% operator_message = AppliedMessage.where("applied_id=? and status = 4", ma.applied_id).first %>
|
||||
<% operator = User.find(operator_message.applied_user_id).show_name %>
|
||||
<span class="fontGrey3" style="font-size:14px" title="<%= operator %>已拒绝">
|
||||
<%= operator %>已拒绝
|
||||
|
@ -19,7 +19,7 @@
|
|||
<%= operator %>已拒绝
|
||||
</span>
|
||||
<% elsif ma.status == 6 %>
|
||||
<% operator_message = AppliedMessage.where("applied_id=? and status not in (2,6)", ma.applied_id).first %>
|
||||
<% operator_message = AppliedMessage.where("applied_id=? and status = 6", ma.applied_id).first %>
|
||||
<% operator = User.find(operator_message.applied_user_id).show_name %>
|
||||
<span class="fontGrey3" style="font-size:14px" title="<%= operator %>已同意">
|
||||
<%= operator %>已同意
|
||||
|
|
|
@ -1,4 +1,8 @@
|
|||
<%=link_to applied_project_users(ma), user_path(applied_project_users(ma)), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %>
|
||||
<% if ma.status == 4 || ma.status == 6 %>
|
||||
<%= link_to User.where(:id => ma.user_id).first.show_name, user_path(User.where(:id => ma.user_id).first), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %>
|
||||
<% else %>
|
||||
<%= link_to applied_project_users(ma).show_name, user_path(applied_project_users(ma)), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %>
|
||||
<% end %>
|
||||
<span class="homepageNewsType fl">
|
||||
申请以“<%= applied_project_message_type(ma.role) %>”身份加入:
|
||||
</span>
|
Loading…
Reference in New Issue