educoder/app/views/attachments/_activity_attach.html.erb

19 lines
933 B
Plaintext

<% if activity.attachments.any? %>
<% activity.attachments.each do |attachment| %>
<li class="color-grey">
<a href="javascript:void(0)" class="color-grey">
<i class="fa fa-folder" aria-hidden="true"></i>
<%= link_to_short_attachment attachment,:length=> 58, :class => 'color-grey', :download => true %>
<span class="color-grey">(
<%= number_to_human_size attachment.filesize %>)
</span>
<% user_name = attachment.author.show_real_name.empty? ? attachment.author : attachment.author.show_real_name %>
<span title="<%= user_name %>">
<%= link_to h(truncate(user_name, length: 15, omission: '...')),user_path(attachment.author),:class => "color-grey" %>,
<%= format_time(attachment.created_on) %>
</span>
</a>
</li>
<div class="cl"></div>
<% end %>
<% end %>