[ARVADOS] updated: ca080c94faecaaff538846773aad82575bbe1916

git at public.curoverse.com git at public.curoverse.com
Tue Jul 8 21:32:59 EDT 2014


Summary of changes:
 apps/workbench/app/views/projects/_choose.html.erb                | 2 +-
 apps/workbench/app/views/projects/_show_contents.html.erb         | 1 +
 apps/workbench/app/views/projects/_show_data_collections.html.erb | 1 +
 3 files changed, 3 insertions(+), 1 deletion(-)

       via  ca080c94faecaaff538846773aad82575bbe1916 (commit)
      from  cacc4e9a3cfacb7a4951cc3f6dc32444116b913e (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 ca080c94faecaaff538846773aad82575bbe1916
Author: Brett Smith <brett at curoverse.com>
Date:   Tue Jul 8 21:32:40 2014 -0400

    3201: Simplify logic to decide "My Projects" is selectable.
    
    Thinking about it on the commute home, I decided that my previous
    implementation that inspected action_href (e007ef71) was too clever by
    half.  Following the adage that explicit is better than implicit, this
    version provides a knob you can turn to just say whether or not "My
    Projects" is selectable.
    
    Closes #3201.

diff --git a/apps/workbench/app/views/projects/_choose.html.erb b/apps/workbench/app/views/projects/_choose.html.erb
index 4bae8aa..3f20271 100644
--- a/apps/workbench/app/views/projects/_choose.html.erb
+++ b/apps/workbench/app/views/projects/_choose.html.erb
@@ -21,7 +21,7 @@
                  folder_class = "fa-folder-o"
                  if projectnode[:object].uuid == current_user.uuid
                    row_name = "My Projects"
-                   row_selectable &&= (resource_class_for_uuid(params[:action_href].split("/").last) == Group) rescue false
+                   row_selectable &&= params[:my_root_selectable]
                    folder_class = "fa-folder-open-o" if not row_selectable
                  else
                    row_name = projectnode[:object].friendly_link_name || 'New project'
diff --git a/apps/workbench/app/views/projects/_show_contents.html.erb b/apps/workbench/app/views/projects/_show_contents.html.erb
index c3d509f..0c8fab2 100644
--- a/apps/workbench/app/views/projects/_show_contents.html.erb
+++ b/apps/workbench/app/views/projects/_show_contents.html.erb
@@ -41,6 +41,7 @@
 	choose_projects_path(
 	 title: 'Move this project to...',
 	 editable: true,
+	 my_root_selectable: true,
 	 action_name: 'Move',
 	 action_href: project_path(@object.uuid),
 	 action_method: 'put',
diff --git a/apps/workbench/app/views/projects/_show_data_collections.html.erb b/apps/workbench/app/views/projects/_show_data_collections.html.erb
index a8b58b8..c632324 100644
--- a/apps/workbench/app/views/projects/_show_data_collections.html.erb
+++ b/apps/workbench/app/views/projects/_show_data_collections.html.erb
@@ -41,6 +41,7 @@
 	choose_projects_path(
 	 title: 'Move this project to...',
 	 editable: true,
+	 my_root_selectable: true,
 	 action_name: 'Move',
 	 action_href: project_path(@object.uuid),
 	 action_method: 'put',

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list