[ARVADOS] updated: e007ef71a69c0429eb936a1393dc9e7ec1cc4db1

git at public.curoverse.com git at public.curoverse.com
Tue Jul 8 18:05:35 EDT 2014


Summary of changes:
 apps/workbench/app/views/projects/_choose.html.erb | 20 ++++++++++++--------
 1 file changed, 12 insertions(+), 8 deletions(-)

       via  e007ef71a69c0429eb936a1393dc9e7ec1cc4db1 (commit)
      from  b5b0f8c9822435fa5faf0e59b65495806ea82dcb (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 e007ef71a69c0429eb936a1393dc9e7ec1cc4db1
Author: Brett Smith <brett at curoverse.com>
Date:   Tue Jul 8 18:06:45 2014 -0400

    3201: Only Projects can be moved to "My Projects."
    
    Before this commit, it was possible to move any object that goes in
    folders to "My Projects."  If you did, it would be removed from any
    project, and owned by the user directly.  This is non-obvious.  Data
    should be removed from projects by using the trash icon on the project
    page instead.
    
    Closes #3201.

diff --git a/apps/workbench/app/views/projects/_choose.html.erb b/apps/workbench/app/views/projects/_choose.html.erb
index de72c41..4bae8aa 100644
--- a/apps/workbench/app/views/projects/_choose.html.erb
+++ b/apps/workbench/app/views/projects/_choose.html.erb
@@ -16,15 +16,19 @@
                   <i class="fa fa-fw fa-folder-open-o"></i>
                   <%= projectnode[:object] %>
                 </div>
-              <% else %>
-                <div class="<%= 'selectable project' if !params[:editable] || projectnode[:object].editable? %> row"
+              <% else
+                 row_selectable = !params[:editable] || projectnode[:object].editable?
+                 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
+                   folder_class = "fa-folder-open-o" if not row_selectable
+                 else
+                   row_name = projectnode[:object].friendly_link_name || 'New project'
+                 end %>
+                <div class="<%= 'selectable project' if row_selectable %> row"
                      style="padding-left: <%= 1 + projectnode[:depth] %>em; margin-right: 0px" data-object-uuid="<%= projectnode[:object].uuid %>">
-                  <i class="fa fa-fw fa-folder-o"></i>
-                  <% if projectnode[:object].uuid == current_user.uuid %>
-                    My Projects
-                  <% else %>
-                    <%= projectnode[:object].friendly_link_name || 'New project' %>
-                  <% end %>
+                  <i class="fa fa-fw <%= folder_class %>"></i> <%= row_name %>
                 </div>
               <% end %>
             <% end %>

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list