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

23 lines
1.2 KiB
Plaintext
Raw Normal View History

2015-08-20 17:38:30 +08:00
2015-08-15 17:07:50 +08:00
<% if attachments.nil? || attachments.empty? %>
<% else %>
<% attachments.each do |attach| %>
2015-08-19 17:13:57 +08:00
<ul class="resourcesList">
<li class="resourcesListCheckbox fl">
2015-08-20 14:01:33 +08:00
<input name="checkbox1[]" type="checkbox" onclick="checkAllBox($(this));" value="<%= attach.id%>" class="resourcesCheckbox" />
2015-08-19 17:13:57 +08:00
</li>
2015-08-15 17:07:50 +08:00
<li class="resourcesListName fl">
<!--<a href="javascript:void(0);" class="resourcesBlack"><%#=truncate(attach.filename,:length=>18)%></a>-->
<%= link_to truncate(attach.filename,:length=>18), download_named_attachment_path(attach.id, attach.filename),
2015-08-18 15:25:36 +08:00
:title => attach.filename,:class=>'resourcesBlack'%>
2015-08-15 17:07:50 +08:00
</li>
<li class="resourcesListSize fl"><%= number_to_human_size(attach.filesize) %></li>
<li class="resourcesListType fl"><%= get_resource_type(attach.container_type)%></li>
2015-08-21 17:13:42 +08:00
<li class="resourcesListUploader fl"><%=User.find(attach.author_id).realname.blank? ? User.find(attach.author_id).nickname : User.find(attach.author_id).realname %></li>
<li style="display: none"><%= attach.author_id %></li>
2015-08-15 17:07:50 +08:00
<li class="resourcesListTime fl"><%= format_date(attach.created_on) %></li>
<li style="display: none"><%= attach.id %></li>
</ul>
<% end %>
2015-08-20 17:38:30 +08:00
<% end %>