2016-05-18 17:37:48 +08:00
|
|
|
|
<li class="homepageNewsPortrait fl">
|
|
|
|
|
<div class="navHomepageLogo fl">
|
|
|
|
|
<%= link_to image_tag(url_to_avatar(ma.course_message.user), :width => "30", :height => "30"), user_path(ma.course_message.user) %>
|
|
|
|
|
</div>
|
|
|
|
|
</li>
|
|
|
|
|
<li class="homepageNewsPubType fl">
|
|
|
|
|
<%= link_to ma.course_message.user.show_name, user_path(ma.course_message.user), :class => "newsBlue homepageNewsPublisher" %>
|
|
|
|
|
<span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl":"homepageNewsType fl" %>">申请引用资源:</span>
|
|
|
|
|
</li>
|
|
|
|
|
<li class="<%=(ma.apply_result == 0 || ma.apply_result.nil?) ? 'homepageHomeworkContent2' : 'homepageHomeworkContent' %> fl">
|
|
|
|
|
<% content = ma.course_message.content.nil? ? '' : ':'+ ma.course_message.content.to_s %>
|
2016-05-19 16:53:22 +08:00
|
|
|
|
<% show_content = ma.course_message.user.show_name + "申请引用资源\""+"#{ma.course_message.find_attachment(ma.course_message.attachment_id).try(:filename)}"+"\"#{content}" %>
|
|
|
|
|
<% if ma.course_message.container_type == "Course" %>
|
|
|
|
|
<%= link_to show_content, course_files_path(ma.course_message.container_id), :title => show_content, :class => " #{ma.viewed == 0 ? "newsBlack" : "newsGrey "}" %>
|
|
|
|
|
<% elsif ma.course_message.container_type == "Project" %>
|
|
|
|
|
<%= link_to show_content, project_files_path(ma.course_message.container_id), :title => show_content, :class => " #{ma.viewed == 0 ? "newsBlack" : "newsGrey "}" %>
|
|
|
|
|
<% elsif ma.course_message.container_type == "OrgSubfield" %>
|
|
|
|
|
<%= link_to show_content, org_subfield_files_path(ma.course_message.container_id), :title => show_content, :class => " #{ma.viewed == 0 ? "newsBlack" : "newsGrey "}" %>
|
|
|
|
|
<% else %>
|
|
|
|
|
<a title="<%= show_content %>" class = "<%= ma.viewed == 0 ? "newsBlack" : "newsGrey "%>">
|
|
|
|
|
<%= show_content %>
|
|
|
|
|
</a>
|
|
|
|
|
<% end %>
|
2016-05-18 17:37:48 +08:00
|
|
|
|
</li>
|
|
|
|
|
|
|
|
|
|
<li class="<%=(ma.apply_result == 0 || ma.apply_result.nil?) ? 'homepageHomeworkContentWarn2' : 'homepageHomeworkContentWarn' %> fl">
|
2016-05-19 11:32:58 +08:00
|
|
|
|
<span id="deal_info_<%= ma.id %>">
|
|
|
|
|
<% if ma.apply_result == 0 || ma.apply_result.nil? %>
|
|
|
|
|
<%= link_to '同意', deal_with_apply_resource_user_path(User.current, :agree => 'Y', :msg_id => ma.id, :apply_user_id => ma.course_message.apply_user_id), :remote => 'true' %> |
|
|
|
|
|
<%= link_to '拒绝', deal_with_apply_resource_user_path(User.current, :agree => 'N', :msg_id => ma.id, :apply_user_id => ma.course_message.apply_user_id), :remote => 'true' %>
|
2016-05-18 17:37:48 +08:00
|
|
|
|
<% elsif ma.apply_result == 1 %>
|
|
|
|
|
您已经同意了该申请
|
|
|
|
|
<% elsif ma.apply_result == 2 %>
|
|
|
|
|
您已经拒绝了该申请
|
|
|
|
|
<%end %>
|
|
|
|
|
</span>
|
|
|
|
|
</li>
|
|
|
|
|
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
|