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

28 lines
2.1 KiB
Plaintext
Raw Normal View History

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| %>
2016-03-01 17:33:44 +08:00
<ul class="resource-list" onmouseover="if($('#contextMenu').css('display') != 'block')$(this).children().css('background-color', '#e1e1e1')" onmouseout=" if($('#contextMenu').css('display') == 'none')$(this).children().css('background-color', 'white')">
<li class="resource-list-checkbox fl">
<input name="checkbox1[]" type="checkbox" data-has-history="<%= attach.attachment_histories.count == 0 ? 'N' : 'Y' %>" data-deleteble="<%= User.current.id ==attach.author_id ? 'Y' : 'N' %>" onclick="checkAllBox($(this));" value="<%= attach.id%>" class="resourcesCheckbox" />
2016-03-01 17:33:44 +08:00
<!--<input name="checkbox2" type="checkbox" value="" class="resourcesCheckbox" />-->
2015-09-01 16:37:43 +08:00
</li>
2016-03-01 17:33:44 +08:00
<li class="resource-list-name fl hidden">
<%= link_to truncate(attach.filename, :length => 30), download_named_attachment_path(attach.id, attach.filename), :title => attach.filename, :class => 'resourcesBlack' %>
2015-09-01 16:37:43 +08:00
</li>
2016-03-01 17:33:44 +08:00
<li class="resource-list-time fr"><%= format_date(attach.created_on) %></li>
<li class="resource-list-quote fr"><%= attach.quotes.nil? ? 0 : attach.quotes %></li>
<li class="resource-list-download fr"><%= attach.downloads %></li>
<li style="display: none"><%= attach.author_id %></li>
2016-03-02 18:20:36 +08:00
<li class="resource-list-size fr"><%= number_to_human_size(attach.filesize) %></li>
2016-03-01 17:33:44 +08:00
<li class="resource-list-uploader fr hidden"><%=User.find(attach.author_id).realname.blank? ? User.find(attach.author_id).nickname : User.find(attach.author_id).realname %></li>
<li class="resource-list-type fr"><%= get_resource_type(attach.container_type)%></li>
<li class="resource-list-from fr hidden" title="<%= get_resource_origin(attach) %>"><%= get_resource_origin(attach) %></li>
2016-03-03 23:56:06 +08:00
<li style="display: none"><%= attach.id %></li>
2015-09-01 16:37:43 +08:00
</ul>
2016-03-01 17:33:44 +08:00
<div class="cl"></div>
2015-09-01 16:37:43 +08:00
<% end %>
2015-08-20 17:38:30 +08:00
<% end %>