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

38 lines
2.2 KiB
Plaintext

<% if ma.class == AppliedMessage %>
<!--申请加入项目-->
<% if ma.applied_type == "ApplyAddSchools" %>
<ul class="homepageNewsList fl">
<li class="homepageNewsPortrait fl">
<a href="javascript:void(0);"><%= link_to image_tag(url_to_avatar(ma.user), :width => "30", :height => "30"), user_path(ma.user), :target => '_blank' %></a>
</li>
<li class="homepageNewsPubType fl">
<%=link_to ma.user, user_path(ma.user), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %>
<span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl" : "homepageNewsType fl" %>">批准你加入项目:</span>
</li>
<li class="homepageNewsContent fl">
<a class ="#{ma.viewed == 0 ? 'newsBlack' : 'newsGrey'}" target = '_blank'><%= ma.applied.name %></a>
</li>
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
</ul>
<% elsif ma && ma.applied_type == "AppliedProject" %>
<ul class="homepageNewsList fl">
<li class="homepageNewsPortrait fl">
<a href="javascript:void(0);"><%=link_to image_tag(url_to_avatar(ma.applied.user), :width => "30", :height => "30"), user_path(ma.applied.user), :target => '_blank' %></a>
</li>
<li class="homepageNewsPubType fl">
<%= render :partial => "users/user_message_applide_users", :locals =>{:ma => ma} %>
</li>
<li class="homepageNewsContent fl" style="width:283px;"><a href="javascript:void(0);" class="newsGrey">
以“<%= applied_project_message_type(ma.applied.role) %>”身份加入
<%= link_to ma.applied.project, project_path(ma.applied.project), :class => "link-blue", :target => '_blank' %>
</a>
</li>
<li class="fl" style="width:71px; height:49px;">
<span id="applied_project_<%= ma.id %>">
<%= render :partial => "users/user_message_applide_action", :locals =>{:ma => ma} %>
</span>
</li>
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
</ul>
<% end %>
<% end %>