[ARVADOS] updated: f792be9bcab60e7cc917d9461d46317d7d210ed6
git at public.curoverse.com
git at public.curoverse.com
Mon Aug 25 14:41:55 EDT 2014
Summary of changes:
apps/workbench/app/views/layouts/body.html.erb | 2 ++
apps/workbench/test/integration/search_box_test.rb | 8 ++++++++
2 files changed, 10 insertions(+)
via f792be9bcab60e7cc917d9461d46317d7d210ed6 (commit)
from 32e4350b4ea4c111ae95d9a99712fb86bf0ecb86 (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 f792be9bcab60e7cc917d9461d46317d7d210ed6
Author: radhika <radhika at curoverse.com>
Date: Mon Aug 25 14:32:46 2014 -0400
3642: display search box in topnav only to active users
diff --git a/apps/workbench/app/views/layouts/body.html.erb b/apps/workbench/app/views/layouts/body.html.erb
index 3f95be3..8645e59 100644
--- a/apps/workbench/app/views/layouts/body.html.erb
+++ b/apps/workbench/app/views/layouts/body.html.erb
@@ -18,6 +18,7 @@
</li>
<% if current_user %>
+ <% if current_user.is_active %>
<li>
<form class="navbar-form" role="search"
data-search-modal=
@@ -36,6 +37,7 @@
</div>
</form>
</li>
+ <% end %>
<li class="dropdown notification-menu">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" id="notifications-menu">
diff --git a/apps/workbench/test/integration/search_box_test.rb b/apps/workbench/test/integration/search_box_test.rb
index dcdce15..663e3f1 100644
--- a/apps/workbench/test/integration/search_box_test.rb
+++ b/apps/workbench/test/integration/search_box_test.rb
@@ -14,6 +14,7 @@ class ApplicationLayoutTest < ActionDispatch::IntegrationTest
if user && user['is_active']
# let's search for a valid uuid
within('.navbar-fixed-top') do
+ page.has_field?('search')
page.find_field('search').set user['uuid']
page.find('.glyphicon-search').click
end
@@ -78,10 +79,17 @@ class ApplicationLayoutTest < ActionDispatch::IntegrationTest
# seeing "Unrestricted public data" now
assert page.has_text?(publicly_accessible_project['name']), 'No text - publicly accessible project name'
assert page.has_text?(publicly_accessible_project['description']), 'No text - publicly accessible project description'
+ else
+ within('.navbar-fixed-top') do
+ page.has_no_field?('search')
+ end
end
end
[
+ [nil, nil],
+ ['inactive', api_fixture('users')['inactive']],
+ ['inactive_uninvited', api_fixture('users')['inactive_uninvited']],
['active', api_fixture('users')['active']],
['admin', api_fixture('users')['admin']],
].each do |token, user|
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list