41 lines
2.2 KiB
Plaintext
41 lines
2.2 KiB
Plaintext
<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">
|
||
<%= message_user.user_extensions.school_id.blank? ? "" : "来自"+message_user.user_extensions.school.name+"," %>
|
||
申请以"<%= get_role_str ma.role %>"的身份加入竞赛:
|
||
</span>
|
||
</li>
|
||
<li class="messageInformationContents">
|
||
<% content = message_user.show_name + "申请成为班级\"" + "#{contest.name}" + "\"的" + get_role_str(ma.role) %>
|
||
<%= 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%>">
|
||
<% if ma.status == 0 %>
|
||
<%= 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%> <!-- 同意 -->
|
||
<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>
|
||
<% elsif ma.status == 2%> <!-- 拒绝 -->
|
||
<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>
|
||
<%end %>
|
||
</span>
|
||
</li>
|
||
<li class="homepageNewsTime fr"><%= time_tag(ma.created_at).html_safe %> </li>
|
||
|