CollectionsController#choose. Adjust column width in collections file table.
+ # 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
params[:limit] ||= 40
find_objects_for_index
@objects = Collection.
filter([['uuid','in',@name_links.collect(&:head_uuid)]])
@objects = Collection.
filter([['uuid','in',@name_links.collect(&:head_uuid)]])
preload_links_for_objects (@collections.to_a + @objects.to_a)
super
end
preload_links_for_objects (@collections.to_a + @objects.to_a)
super
end
<table id="collections-index" class="topalign table table-condensed table-fixedlayout"> <!-- table-fixed-header-row -->
<colgroup>
<table id="collections-index" class="topalign table table-condensed table-fixedlayout"> <!-- table-fixed-header-row -->
<colgroup>
- <col width="34%" />
- <col width="11%" />
- <col width="29%" />
+ <col width="10%" />
+ <col width="40%" />
+ <col width="10%" />
+ <col width="30%" />
</colgroup>
<thead>
<tr class="contain-align-left">
</colgroup>
<thead>
<tr class="contain-align-left">
<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 %>">
<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>
<% 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>