[ARVADOS] created: 02676af9f5a2580710e9ae062e7028f661740c3a
git at public.curoverse.com
git at public.curoverse.com
Thu Apr 30 14:20:49 EDT 2015
at 02676af9f5a2580710e9ae062e7028f661740c3a (commit)
commit 02676af9f5a2580710e9ae062e7028f661740c3a
Author: Radhika Chippada <radhika at curoverse.com>
Date: Thu Apr 30 14:19:42 2015 -0400
4458: breadcrumbs now visible in small window sizes; also, use user icon instead of email for my account menu.
diff --git a/apps/workbench/app/views/layouts/application.html.erb b/apps/workbench/app/views/layouts/application.html.erb
index cdc47c1..67756e7 100644
--- a/apps/workbench/app/views/layouts/application.html.erb
+++ b/apps/workbench/app/views/layouts/application.html.erb
@@ -37,9 +37,9 @@
@media (max-width: 979px) { body { padding-top: 0; } }
@media (max-width: 767px) {
- .breadcrumbs {
- display: none;
- }
+ .breadcrumbs {
+ padding-top: 0;
+ }
}
</style>
<link href="//netdna.bootstrapcdn.com/font-awesome/4.1.0/css/font-awesome.css" rel="stylesheet">
diff --git a/apps/workbench/app/views/layouts/body.html.erb b/apps/workbench/app/views/layouts/body.html.erb
index 0509da8..9f253a4 100644
--- a/apps/workbench/app/views/layouts/body.html.erb
+++ b/apps/workbench/app/views/layouts/body.html.erb
@@ -47,9 +47,13 @@
<li class="dropdown notification-menu">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" id="notifications-menu">
<span class="badge badge-alert notification-count"><%= user_notifications.length if user_notifications.any? %></span>
- <%= current_user.email %> <span class="caret"></span>
+ <span class="fa fa-lg fa-user"></span>
+ <span class="caret"></span>
</a>
<ul class="dropdown-menu" role="menu">
+ <li role="presentation" class="dropdown-header">
+ <%= current_user.email %>
+ </li>
<% if current_user.is_active %>
<li role="menuitem"><a href="/projects/<%=current_user.uuid%>" role="menuitem"><i class="fa fa-home fa-fw"></i> Home project </a></li>
<li role="menuitem"><a href="/manage_account" role="menuitem"><i class="fa fa-key fa-fw"></i> Manage account</a></li>
@@ -72,6 +76,7 @@
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" id="system-menu">
<span class="fa fa-lg fa-gear"></span>
+ <span class="caret"></span>
</a>
<ul class="dropdown-menu" role="menu">
<li role="presentation" class="dropdown-header">
@@ -127,8 +132,12 @@
<li class="dropdown help-menu">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" id="arv-help">
<span class="fa fa-lg fa-question-circle"></span>
+ <span class="caret"></span>
</a>
<ul class="dropdown-menu">
+ <li role="presentation" class="dropdown-header">
+ Help
+ </li>
<li>
<%= link_to raw('<i class="fa fa-fw fa-info"></i> Getting Started ...'), "#",
{'data-toggle' => "modal", 'data-target' => '#getting-started-modal-window'} %>
diff --git a/apps/workbench/test/integration/anonymous_access_test.rb b/apps/workbench/test/integration/anonymous_access_test.rb
index 18c5b7d..1e486d8 100644
--- a/apps/workbench/test/integration/anonymous_access_test.rb
+++ b/apps/workbench/test/integration/anonymous_access_test.rb
@@ -23,8 +23,8 @@ class AnonymousAccessTest < ActionDispatch::IntegrationTest
end
within('.navbar-fixed-top') do
assert_selector 'a', text: Rails.configuration.site_name.downcase
- assert_selector 'a', text: "#{user['email']}"
- find('a', text: "#{user['email']}").click
+ assert(page.has_link?("notifications-menu"), 'no user menu')
+ page.find("#notifications-menu").click
within('.dropdown-menu') do
assert_selector 'a', text: 'Log out'
end
diff --git a/apps/workbench/test/integration/application_layout_test.rb b/apps/workbench/test/integration/application_layout_test.rb
index 3b449b9..b6a501f 100644
--- a/apps/workbench/test/integration/application_layout_test.rb
+++ b/apps/workbench/test/integration/application_layout_test.rb
@@ -40,8 +40,8 @@ class ApplicationLayoutTest < ActionDispatch::IntegrationTest
else
# my account menu
assert_selector 'a', text: Rails.configuration.site_name.downcase
- assert page.has_link?("#{user['email']}"), 'Not found link - email'
- find('a', text: "#{user['email']}").click
+ assert(page.has_link?("notifications-menu"), 'no user menu')
+ page.find("#notifications-menu").click
within('.dropdown-menu') do
if user['is_active']
assert page.has_no_link?('Not active'), 'Found link - Not active'
diff --git a/apps/workbench/test/integration/errors_test.rb b/apps/workbench/test/integration/errors_test.rb
index d2b8fd6..06e17d6 100644
--- a/apps/workbench/test/integration/errors_test.rb
+++ b/apps/workbench/test/integration/errors_test.rb
@@ -9,7 +9,7 @@ class ErrorsTest < ActionDispatch::IntegrationTest
test "error page renders user navigation" do
visit(page_with_token("active", "/collections/#{BAD_UUID}"))
- assert(page.has_text?(api_fixture("users")["active"]["email"]),
+ assert(page.has_link?("notifications-menu"),
"User information missing from error page")
assert(page.has_no_text?(/log ?in/i),
"Logged in user prompted to log in on error page")
@@ -17,7 +17,7 @@ class ErrorsTest < ActionDispatch::IntegrationTest
test "no user navigation with expired token" do
visit(page_with_token("expired", "/collections/#{BAD_UUID}"))
- assert(page.has_no_text?(api_fixture("users")["active"]["email"]),
+ assert(page.has_no_link?("notifications-menu"),
"Page visited with expired token included user information")
assert(page.has_selector?("a", text: /log ?in/i),
"Login prompt missing on expired token error page")
diff --git a/apps/workbench/test/integration/user_manage_account_test.rb b/apps/workbench/test/integration/user_manage_account_test.rb
index 6d680e2..e50907b 100644
--- a/apps/workbench/test/integration/user_manage_account_test.rb
+++ b/apps/workbench/test/integration/user_manage_account_test.rb
@@ -9,7 +9,7 @@ class UserManageAccountTest < ActionDispatch::IntegrationTest
def verify_manage_account user
if user['is_active']
within('.navbar-fixed-top') do
- find('a', text: "#{user['email']}").click
+ page.find("#notifications-menu").click
within('.dropdown-menu') do
find('a', text: 'Manage account').click
end
@@ -24,7 +24,7 @@ class UserManageAccountTest < ActionDispatch::IntegrationTest
add_and_verify_ssh_key
else # inactive user
within('.navbar-fixed-top') do
- find('a', text: "#{user['email']}").click
+ page.find("#notifications-menu").click
within('.dropdown-menu') do
assert page.has_no_link?('Manage profile'), 'Found link - Manage profile'
end
@@ -162,7 +162,7 @@ class UserManageAccountTest < ActionDispatch::IntegrationTest
# Revisit the page and verify the request sent message along with
# the request button.
within('.navbar-fixed-top') do
- find('a', text: 'spectator').click
+ page.find("#notifications-menu").click
within('.dropdown-menu') do
find('a', text: 'Manage account').click
end
diff --git a/apps/workbench/test/integration/user_profile_test.rb b/apps/workbench/test/integration/user_profile_test.rb
index 9fa7afa..3aac6a0 100644
--- a/apps/workbench/test/integration/user_profile_test.rb
+++ b/apps/workbench/test/integration/user_profile_test.rb
@@ -47,8 +47,8 @@ class UserProfileTest < ActionDispatch::IntegrationTest
assert page.has_link?('Log in'), 'Not found link - Log in'
else
# my account menu
- assert page.has_link?("#{user['email']}"), 'Not found link - email'
- find('a', text: "#{user['email']}").click
+ assert(page.has_link?("notifications-menu"), 'no user menu')
+ page.find("#notifications-menu").click
within('.dropdown-menu') do
if user['is_active']
assert page.has_no_link?('Not active'), 'Found link - Not active'
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list