diff options
author | Bob Van Landuyt <bob@vanlanduyt.co> | 2018-04-25 17:54:26 +0300 |
---|---|---|
committer | Bob Van Landuyt <bob@vanlanduyt.co> | 2018-05-04 14:52:55 +0300 |
commit | 17b25bd263edaae70d5dae5fb035f5c28f9bb0cd (patch) | |
tree | 064cf11dafc8f56c40f797e2ccf89af685a7720e /qa | |
parent | 82eeb72c8c03727540b902d40e7e657d0a5ecb4c (diff) |
Make the user dropdown reusable
We will reuse the the dropdown, but exclude some menu items based on
permissions.
So moving the menu to a partial, and adding checks for each menu item here.
Diffstat (limited to 'qa')
-rw-r--r-- | qa/qa/page/menu/main.rb | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/qa/qa/page/menu/main.rb b/qa/qa/page/menu/main.rb index df93a5fa2d2..d3562effaab 100644 --- a/qa/qa/page/menu/main.rb +++ b/qa/qa/page/menu/main.rb @@ -2,12 +2,15 @@ module QA module Page module Menu class Main < Page::Base + view 'app/views/layouts/header/_current_user_dropdown.html.haml' do + element :user_sign_out_link, 'link_to _("Sign out")' + element :settings_link, 'link_to s_("CurrentUser|Settings")' + end + view 'app/views/layouts/header/_default.html.haml' do element :navbar element :user_avatar element :user_menu, '.dropdown-menu-nav' - element :user_sign_out_link, 'link_to "Sign out"' - element :settings_link, 'link_to "Settings"' end view 'app/views/layouts/nav/_dashboard.html.haml' do |