3504: Remove link to links index page on tags. Add comment to
authorPeter Amstutz <peter.amstutz@curoverse.com>
Thu, 21 Aug 2014 19:08:38 +0000 (15:08 -0400)
committerPeter Amstutz <peter.amstutz@curoverse.com>
Thu, 21 Aug 2014 19:09:11 +0000 (15:09 -0400)
CollectionsController#choose.  Adjust column width in collections file table.

apps/workbench/app/controllers/collections_controller.rb
apps/workbench/app/views/collections/_show_recent.html.erb
apps/workbench/app/views/projects/_show_contents_rows.html.erb

index 1cc4966ac88d5d260c01b1e3772d9dc1478ffcd1..010cd220e7d481e5342cc910ec9a67de7df5630c 100644 (file)
@@ -44,6 +44,13 @@ class CollectionsController < ApplicationController
   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
@@ -59,6 +66,7 @@ class CollectionsController < ApplicationController
 
     @objects = Collection.
       filter([['uuid','in',@name_links.collect(&:head_uuid)]])
+
     preload_links_for_objects (@collections.to_a + @objects.to_a)
     super
   end
index d963114e84dc67879e20915d31947c62f468a063..54fc9f3da5c5b3f182ced62f16db8313240cb8d0 100644 (file)
@@ -6,11 +6,11 @@
 
 <table id="collections-index" class="topalign table table-condensed table-fixedlayout"> <!-- table-fixed-header-row -->
   <colgroup>
-    <col width="8%" />
     <col width="10%" />
-    <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">
index 638fe14859b4b997fc228671d4e800ae49d6edf4..2afbf3ffae754447f312c3a8bb004583e623f680 100644 (file)
@@ -32,7 +32,8 @@
     <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">
               &nbsp;<a title="Delete tag"><i class="fa fa-fw fa-trash-o"></i></a>