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

28 lines
1.7 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| %>
<ul class="resourcesList" onmouseover="if($('#contextMenu').css('display') != 'block')$(this).children().css('background-color', '#e1e1e1')" onmouseout=" if($('#contextMenu').css('display') == 'none')$(this).children().css('background-color', 'white')">
2015-09-01 16:37:43 +08:00
<li class="resourcesListCheckbox fl">
2015-11-13 14:56:18 +08:00
<input name="checkbox1[]" type="checkbox" data-deleteble="<%= User.current.id ==attach.author_id ? 'Y' : 'N' %>" onclick="checkAllBox($(this));" value="<%= attach.id%>" class="resourcesCheckbox" />
2015-09-01 16:37:43 +08:00
</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 %>