[ARVADOS] updated: 780560ca57ad92e01edd23301750b8c1623d41db

git at public.curoverse.com git at public.curoverse.com
Wed Aug 6 19:16:16 EDT 2014


Summary of changes:
 apps/workbench/app/controllers/search_controller.rb              | 7 ++++++-
 .../workbench/app/views/application/_projects_tree_menu.html.erb | 9 +++++----
 2 files changed, 11 insertions(+), 5 deletions(-)

       via  780560ca57ad92e01edd23301750b8c1623d41db (commit)
      from  b20cc78fe133ad073edaa1f07effa90297015e99 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


commit 780560ca57ad92e01edd23301750b8c1623d41db
Author: Tom Clegg <tom at curoverse.com>
Date:   Wed Aug 6 19:16:03 2014 -0400

    3499: Show Home at root of projects tree. closes #3517

diff --git a/apps/workbench/app/controllers/search_controller.rb b/apps/workbench/app/controllers/search_controller.rb
index 31c6663..6f209a5 100644
--- a/apps/workbench/app/controllers/search_controller.rb
+++ b/apps/workbench/app/controllers/search_controller.rb
@@ -6,7 +6,12 @@ class SearchController < ApplicationController
       @filters = @filters.select do |attr, operator, operand|
         not (attr == 'owner_uuid' and operator == '=')
       end
-      search_what = Group.find(params[:project_uuid])
+      # Special case for project_uuid is a user uuid:
+      if ArvadosBase::resource_class_for_uuid(params[:project_uuid]) == User
+        search_what = User.find params[:project_uuid]
+      else
+        search_what = Group.find params[:project_uuid]
+      end
     end
     @objects = search_what.contents(limit: @limit,
                                     offset: @offset,
diff --git a/apps/workbench/app/views/application/_projects_tree_menu.html.erb b/apps/workbench/app/views/application/_projects_tree_menu.html.erb
index ee96d27..600c6ab 100644
--- a/apps/workbench/app/views/application/_projects_tree_menu.html.erb
+++ b/apps/workbench/app/views/application/_projects_tree_menu.html.erb
@@ -1,12 +1,13 @@
-              <li role="presentation" class="dropdown-header">
-                <%= top_button.andand.call %>
-                My projects
+              <li>
+                <%= project_link_to.call({object: current_user, depth: 0}) do %>
+                  <span style="padding-left: 0"></span>Home
+                <% end %>
               </li>
               <% my_project_tree.each do |pnode| %>
                 <% next if pnode[:object].class != Group %>
                 <li>
                   <%= project_link_to.call pnode do %>
-                    <span style="padding-left: <%= pnode[:depth]-1 %>em"></span><%= pnode[:object].name %>
+                    <span style="padding-left: <%= pnode[:depth] %>em"></span><%= pnode[:object].name %>
                   <% end %>
                 </li>
               <% end %>

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list