%# a nil @search_sharing means we got an AccessForbiddenException and should
disable this feature entirely. %>
<% if @search_sharing != nil %>
<% if @search_sharing.any? %>
Shared at:
<%= link_to "Unshare", unshare_collection_url, {
class: 'btn-xs btn-info',
remote: true,
method: 'post'
} %>
<%= link_to download_link, download_link %>
<% else %>
<%= link_to "Create sharing link", share_collection_url, {
class: 'btn-xs btn-info',
remote: true,
method: 'post'
} %>
<% end %>
<% end %>