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.
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'
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',
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',