From da4aaca1ea4f37c4efd2dcd5426b57cbe2ae558f Mon Sep 17 00:00:00 2001 From: cxt Date: Wed, 22 Feb 2017 12:26:56 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B6=88=E6=81=AF=E9=A6=96=E9=A1=B5=E6=8A=A550?= =?UTF-8?q?0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/layouts/_show_messages_list.html.erb | 6 +++--- app/views/users/_join_contest_applied_message.html.erb | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/views/layouts/_show_messages_list.html.erb b/app/views/layouts/_show_messages_list.html.erb index 6292db7d6..d51f5e9e1 100644 --- a/app/views/layouts/_show_messages_list.html.erb +++ b/app/views/layouts/_show_messages_list.html.erb @@ -132,7 +132,7 @@ role_str = "参赛者" end end %> -
  • <%= user.show_name%> <%= user.user_extensions.school_id.blank? ? "" : "来自"+user.user_extensions.school.name+"," %>申请以"<%= role_str%>"的身份加入竞赛:<%=Contest.find(ma.contest_id).name %> <%= User.find(ma.contest_message_id).show_name %><%= ma.status == 1 ? "已同意" : "已拒绝"%>
  • +
  • <%= user.show_name%> <%= user.user_extensions.school_id.blank? || user.user_extensions.school.nil? ? "" : "来自"+user.user_extensions.school.name+"," %>申请以"<%= role_str%>"的身份加入竞赛:<%=Contest.find(ma.contest_id).name %> <%= User.find(ma.contest_message_id).show_name %><%= ma.status == 1 ? "已同意" : "已拒绝"%>
  • <% elsif ma.contest_message_type == "JoinContest" and ma.status == 0 %>
  • <%=User.find(ma.contest_message_id).show_name %> 将您加入了竞赛:<%= ma.contest.name%>
  • <% elsif ma.contest_message_type == "JoinContest" and ma.status == 1 %> @@ -177,8 +177,8 @@ <% applied_contest = ma.applied %> <% contest = Contest.find applied_contest.contest_id %> <% message_user = User.find(applied_contest.user_id) %> - <% content = ''+message_user.show_name+' '+(message_user.user_extensions.school_id.blank? ? "" : "来自")+message_user.user_extensions.school.name+","+'申请以"'+ get_role_str(ma.role) + '"的身份加入竞赛:' + contest.name%> - <%= link_to content.html_safe, contest_path(contest.id), :title => "#{message_user.show_name} #{message_user.user_extensions.school_id.blank? ? '' : '来自'+message_user.user_extensions.school.name},申请以'#{get_role_str(ma.role)}'的身份加入竞赛:#{contest.name}", :target => '_blank' %> + <% content = ''+message_user.show_name+' '+(message_user.user_extensions.school_id.blank? || message_user.user_extensions.school.nil? ? "" : "来自"+message_user.user_extensions.school.name+",")+'申请以"'+ get_role_str(ma.role) + '"的身份加入竞赛:' + contest.name%> + <%= link_to content.html_safe, contest_path(contest.id), :title => "#{message_user.show_name} #{message_user.user_extensions.school_id.blank? || message_user.user_extensions.school.nil? ? '' : '来自'+message_user.user_extensions.school.name+","}申请以'#{get_role_str(ma.role)}'的身份加入竞赛:#{contest.name}", :target => '_blank' %> <% end %> <% elsif ma.class == ForgeMessage %> diff --git a/app/views/users/_join_contest_applied_message.html.erb b/app/views/users/_join_contest_applied_message.html.erb index 6ec2ab642..6ee35b1af 100644 --- a/app/views/users/_join_contest_applied_message.html.erb +++ b/app/views/users/_join_contest_applied_message.html.erb @@ -13,7 +13,7 @@ :class => "newsBlue homepageNewsPublisher", :target => '_blank' %> - <%= message_user.user_extensions.school_id.blank? ? "" : "来自"+message_user.user_extensions.school.name+"," %> + <%= message_user.user_extensions.school_id.blank? || message_user.user_extensions.school.nil? ? "" : "来自"+message_user.user_extensions.school.name+"," %> 申请以"<%= get_role_str ma.role %>"的身份加入竞赛: