end
def choose
+ # Find collections using default find_objects logic, then search for name
+ # links, and preload any other links connected to the collections that are
+ # found.
+ # Name links will be obsolete when issue #3036 is merged,
+ # at which point this entire custom #choose function can probably be
+ # eliminated.
+
params[:limit] ||= 40
find_objects_for_index
@objects = Collection.
filter([['uuid','in',@name_links.collect(&:head_uuid)]])
+
preload_links_for_objects (@collections.to_a + @objects.to_a)
super
end
<span class="removable-tag-container">
<% links_for_object(object).select{|link|link.link_class=='tag'}.each do |tag_link| %>
<span class="label label-info" data-tag-link-uuid="<%= tag_link.uuid %>">
- <%= link_to tag_link.name, controller: "links", filters: [["link_class", "=", "tag"], ["name", "=", tag_link.name]].to_json %>
+ <%# FIXME: link tag to search dialog or something # link_to tag_link.name, controller: "links", filters: [["link_class", "=", "tag"], ["name", "=", tag_link.name]].to_json %>
+ <%= tag_link.name %>
<% if tag_link.owner_uuid == current_user.uuid or current_user.is_admin %>
<span class="removable-tag">
<a title="Delete tag"><i class="fa fa-fw fa-trash-o"></i></a>