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

23 lines
1.2 KiB
Plaintext

<% if attachments.nil? || attachments.empty? %>
<% else %>
<% attachments.each do |attach| %>
<ul class="resourcesList">
<li class="resourcesListCheckbox fl">
<input name="checkbox1[]" type="checkbox" onclick="checkAllBox($(this));" value="<%= attach.id%>" class="resourcesCheckbox" />
</li>
<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),
:title => attach.filename,:class=>'resourcesBlack'%>
</li>
<li class="resourcesListSize fl"><%= number_to_human_size(attach.filesize) %></li>
<li class="resourcesListType fl"><%= get_resource_type(attach.container_type)%></li>
<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>
<li class="resourcesListTime fl"><%= format_date(attach.created_on) %></li>
<li style="display: none"><%= attach.id %></li>
</ul>
<% end %>
<% end %>