52 lines
2.2 KiB
Plaintext
52 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">
|
||
|
<% if applied_contest.role
|
||
|
role_str = ""
|
||
|
if applied_contest.role.include?('13') && applied_contest.role.include?('14')
|
||
|
role_str = "管理员、评委"
|
||
|
elsif applied_contest.role.include?('13')
|
||
|
role_str = "管理员"
|
||
|
elsif applied_contest.role.include?('14')
|
||
|
role_str = "评委"
|
||
|
elsif applied_contest.role.include?('15')
|
||
|
role_str = "参赛者"
|
||
|
end
|
||
|
end %>
|
||
|
申请以<%= role_str %>的身份加入班级:
|
||
|
</span>
|
||
|
</li>
|
||
|
<li class="messageInformationContents">
|
||
|
<% content = message_user.show_name + "申请成为班级\"" + "#{contest.name}" + "\"的" + role_str %>
|
||
|
<%= 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 || ma.status.nil?%>
|
||
|
<%= 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%> <!-- 同意 -->
|
||
|
已同意申请
|
||
|
<% elsif ma.status == 2%> <!-- 拒绝 -->
|
||
|
已拒绝申请
|
||
|
<%end %>
|
||
|
</span>
|
||
|
</li>
|
||
|
<li class="homepageNewsTime fr"><%= time_tag(ma.created_at).html_safe %> </li>
|
||
|
|