[ARVADOS] created: b79c440b6af5cf4855e3fb3fb510b3eb8de1da9c
git at public.curoverse.com
git at public.curoverse.com
Fri Aug 8 16:45:16 EDT 2014
at b79c440b6af5cf4855e3fb3fb510b3eb8de1da9c (commit)
commit b79c440b6af5cf4855e3fb3fb510b3eb8de1da9c
Author: Tom Clegg <tom at curoverse.com>
Date: Fri Aug 8 16:45:12 2014 -0400
3489: Indicate initially selected project in chooser. closes #3544
diff --git a/apps/workbench/app/helpers/application_helper.rb b/apps/workbench/app/helpers/application_helper.rb
index 1130036..428c14f 100644
--- a/apps/workbench/app/helpers/application_helper.rb
+++ b/apps/workbench/app/helpers/application_helper.rb
@@ -267,7 +267,7 @@ module ApplicationHelper
end
modal_path = choose_collections_path \
({ title: chooser_title,
- filters: [['tail_uuid', '=', object.owner_uuid]].to_json,
+ filters: [['owner_uuid', '=', object.owner_uuid]].to_json,
action_name: 'OK',
action_href: pipeline_instance_path(id: object.uuid),
action_method: 'patch',
diff --git a/apps/workbench/app/views/application/_choose.html.erb b/apps/workbench/app/views/application/_choose.html.erb
index d8d2032..1883658 100644
--- a/apps/workbench/app/views/application/_choose.html.erb
+++ b/apps/workbench/app/views/application/_choose.html.erb
@@ -9,9 +9,21 @@
<div class="modal-body">
<div class="input-group">
<% if params[:by_project].to_s != "false" %>
+ <% selected_project_name = 'All projects'
+ @filters.andand.each do |attr, op, val|
+ if attr == 'owner_uuid' and op == '='
+ if val == current_user.uuid
+ selected_project_name = "Home"
+ else
+ selected_project_name = Group.find?(val).name
+ end
+ end
+ end
+ %>
<div class="input-group-btn" data-filterable-target=".modal.arv-choose .selectable-container">
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
- All projects <span class="caret"></span>
+ <%= selected_project_name %> <span class="caret"></span>
+ <!-- <%= @filters.inspect %> -->
</button>
<ul class="dropdown-menu" role="menu">
<li>
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list