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

28 lines
1.6 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-11-06 15:06:14 +08:00
<ul class="resourcesList" onmouseover="$(this).children().css('background-color', '#e1e1e1')" onmouseout="$(this).children().css('background-color', 'white')">
2015-09-01 16:37:43 +08:00
<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=>30), download_named_attachment_path(attach.id, attach.filename),
2015-09-01 16:37:43 +08:00
: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>
2015-11-09 14:04:51 +08:00
<ul class="resourcesListDashLine"></ul>
2015-09-01 16:37:43 +08:00
<% end %>
2015-08-20 17:38:30 +08:00
<% end %>