2016-12-22 16:02:36 +08:00
|
|
|
|
<div class="shortMessageWidth">
|
|
|
|
|
<% applied_contest = ma.applied %>
|
|
|
|
|
<% contest = Contest.find applied_contest.contest_id %>
|
|
|
|
|
<% message_user = User.find(applied_contest.user_id) %>
|
|
|
|
|
<li class="homepageNewsPortrait fl">
|
|
|
|
|
<div class="navHomepageLogo fl">
|
|
|
|
|
<%= link_to image_tag(url_to_avatar(message_user), :width => "30", :height => "30"), user_path(message_user), :target => '_blank' %>
|
|
|
|
|
</div>
|
|
|
|
|
</li>
|
|
|
|
|
<li class="homepageNewsPubType fl">
|
|
|
|
|
<span class="newsBlue homepageNewsPublisher">
|
|
|
|
|
<%=link_to message_user.show_name, user_path(applied_contest.user_id),
|
|
|
|
|
:class => "newsBlue homepageNewsPublisher", :target => '_blank' %>
|
|
|
|
|
</span>
|
|
|
|
|
<span class="homepageNewsType fl">
|
2017-02-22 12:26:56 +08:00
|
|
|
|
<%= message_user.user_extensions.school_id.blank? || message_user.user_extensions.school.nil? ? "" : "来自"+message_user.user_extensions.school.name+"," %>
|
2016-12-28 11:30:31 +08:00
|
|
|
|
申请以"<%= get_role_str ma.role %>"的身份加入竞赛:
|
2016-12-22 16:02:36 +08:00
|
|
|
|
</span>
|
|
|
|
|
</li>
|
|
|
|
|
<li class="messageInformationContents">
|
2017-01-18 15:14:26 +08:00
|
|
|
|
<% content = message_user.show_name + "申请成为竞赛\"" + "#{contest.name}" + "\"的" + get_role_str(ma.role) %>
|
2016-12-22 16:02:36 +08:00
|
|
|
|
<%= link_to contest.name, contest_path(contest.id),
|
|
|
|
|
:class => "#{ma.viewed==0 ? "newsBlack" : "newsGrey"}", :target => '_blank', :title => "#{content}" %>
|
|
|
|
|
</li>
|
|
|
|
|
</div>
|
|
|
|
|
<li class="messageOperateContents fl">
|
|
|
|
|
<span id="deal_info_<%=ma.id%>">
|
2016-12-22 17:13:10 +08:00
|
|
|
|
<% if ma.status == 0 %>
|
2016-12-22 16:02:36 +08:00
|
|
|
|
<%= link_to '同意',dealwith_apply_request_contest_path(contest,:agree=>'Y',:msg_id=>ma.id),:remote=>'true',:class=>'linkBlue'%>
|
|
|
|
|
|
|
|
|
|
|
<%= link_to '拒绝',dealwith_apply_request_contest_path(contest,:agree=>'N',:msg_id=>ma.id),:remote=>'true',:class=>'linkBlue'%>
|
|
|
|
|
<% elsif ma.status == 1%> <!-- 同意 -->
|
2016-12-28 11:30:31 +08:00
|
|
|
|
<span title="<%= ma.applied_user_id ? User.find(ma.applied_user_id).show_name : '管理员' %>已同意"><%= ma.applied_user_id ? User.find(ma.applied_user_id).show_name : "管理员" %>已同意</span>
|
2016-12-22 16:02:36 +08:00
|
|
|
|
<% elsif ma.status == 2%> <!-- 拒绝 -->
|
2016-12-28 11:30:31 +08:00
|
|
|
|
<span title="<%= ma.applied_user_id ? User.find(ma.applied_user_id).show_name : '管理员' %>已拒绝"><%= ma.applied_user_id ? User.find(ma.applied_user_id).show_name : "管理员" %>已拒绝</span>
|
2016-12-22 16:02:36 +08:00
|
|
|
|
<%end %>
|
|
|
|
|
</span>
|
|
|
|
|
</li>
|
|
|
|
|
<li class="homepageNewsTime fr"><%= time_tag(ma.created_at).html_safe %> </li>
|
|
|
|
|
|