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

26 lines
1.4 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? %>
2015-09-01 16:37:43 +08:00
<!--<p class="nodata">-->
<!--<%#= l(:label_no_data) %>-->
<!--</p>-->
2015-08-15 17:07:50 +08:00
<% else %>
<% attachments.each do |attach| %>
2015-09-01 16:37:43 +08:00
<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 %>
2015-08-20 17:38:30 +08:00
<% end %>