socialforge/app/views/users/_user_message_applied.html.erb

57 lines
3.0 KiB
Plaintext

<!-- 申请添加单位 -->
<% if ma.applied_type == "ApplyAddSchools" && ma.status != 4 %>
<ul class="homepageNewsList fl">
<div class="longMessageWidth">
<li class="homepageNewsPortrait fl">
<% if ma.status == 0 %>
<% applied_user = User.find(ma.applied_user_id) %>
<%= link_to image_tag(url_to_avatar(applied_user), :width => "30", :height => "30"), user_path(applied_user), :target => '_blank' %>
<% else %>
<%= image_tag("/images/trustie_logo1.png", width: "30px", height: "30px", class: "mt3") %>
<% end %>
</li>
<li class="homepageNewsPubType fl">
<%= render :partial => "users/user_message_applied_schools", :locals =>{:ma => ma} %>
</li>
<li class = "messageInformationContents">
<%= render :partial => "users/user_message_applied_school_action", :locals =>{:ma => ma} %>
</li>
</div>
<li class="homepageNewsTime fr"><%= time_tag(ma.created_at).html_safe %> </li>
</ul>
<!-- 申请加入项目 -->
<% elsif ma && ma.applied_type == "AppliedProject" %>
<ul class="homepageNewsList fl" id="applied_project_<%= ma.id %>">
<%= render :partial => "users/applied_project_content", :locals =>{:ma => ma} %>
</ul>
<% elsif ma && ma.applied_type == "Organization" %>
<ul class="homepageNewsList fl" id="applied_project_<%= ma.id %>">
<%= render :partial => "users/applied_organization_sundomain", :locals =>{:ma => ma} %>
</ul>
<!-- 匿评成绩申诉 -->
<% elsif ma && ma.applied_type == "StudentWorksScoresAppeal" %>
<ul class="homepageNewsList fl">
<div class="longMessageWidth">
<% applied_user = User.find(ma.applied_user_id) %>
<li class="homepageNewsPortrait fl">
<%= link_to image_tag(url_to_avatar(applied_user), :width => "30", :height => "30"), user_path(applied_user), :target => '_blank' %>
</li>
<li class="homepageNewsPubType fl">
<%=link_to applied_user.show_name, user_path(applied_user), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %>
<span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl" : "homepageNewsType fl" %>">申诉匿评成绩:</span>
</li>
<li class="messageInformationContents fl">
<% homework = ma.applied.student_works_score.student_work.homework_common %>
<%= link_to homework.name, student_work_index_path(:homework => homework.id, :show_work_id => ma.applied.student_works_score.student_work_id, :tab => 2), :class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}", :target => '_blank' %>
</li>
</div>
<li class="homepageNewsTime fr"><%= time_tag(ma.created_at).html_safe %>
</li>
</ul>
<% elsif ma && ma.applied_type == "AppliedContest" %>
<ul class="homepageNewsList fl" id="contest_message_join_<%=ma.id %>">
<%= render :partial => 'join_contest_applied_message', :locals => {:ma => ma} %>
</ul>
<% end %>