diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2016-04-16 23:40:28 +0300 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2016-04-16 23:40:28 +0300 |
commit | 7dce9b1dc2edde2b4381604a3d0e09ba5835c6cf (patch) | |
tree | a69442186f1d96cc724be60f440060bc9fba6000 | |
parent | 05920a7964a039fd65d6b665c2ebd130d5ef949c (diff) | |
parent | e79b0dd762719828203bd48c253a88d876bcf61a (diff) |
Merge branch 'fivehundred_on_ui_help' into 'master'
Make a user available for the user variable
Fixes: #15289
`current_user` is not available if one is signed out.
Look for @dzaporozhets's user if available or just user with id `1`. Dz will work on GitLab.com and user with id 1 will work on dev.
See merge request !3766
-rw-r--r-- | app/controllers/help_controller.rb | 1 | ||||
-rw-r--r-- | app/views/help/ui.html.haml | 12 |
2 files changed, 7 insertions, 6 deletions
diff --git a/app/controllers/help_controller.rb b/app/controllers/help_controller.rb index 55050615473..9b5c43b17e2 100644 --- a/app/controllers/help_controller.rb +++ b/app/controllers/help_controller.rb @@ -51,6 +51,7 @@ class HelpController < ApplicationController end def ui + @user = User.new(id: 0, name: 'John Doe', username: '@johndoe') end private diff --git a/app/views/help/ui.html.haml b/app/views/help/ui.html.haml index d084559abc3..f12df5c8ffe 100644 --- a/app/views/help/ui.html.haml +++ b/app/views/help/ui.html.haml @@ -345,11 +345,11 @@ %ul %li %a.dropdown-menu-user-link.is-active{href: "#"} - = link_to_member_avatar(current_user, size: 30) + = link_to_member_avatar(@user, size: 30) %strong.dropdown-menu-user-full-name - = current_user.name + = @user.name .dropdown-menu-user-username - = current_user.to_reference + = @user.to_reference .example %div @@ -372,11 +372,11 @@ %ul %li %a.dropdown-menu-user-link.is-active{href: "#"} - = link_to_member_avatar(current_user, size: 30) + = link_to_member_avatar(@user, size: 30) %strong.dropdown-menu-user-full-name - = current_user.name + = @user.name .dropdown-menu-user-username - = current_user.to_reference + = @user.to_reference .dropdown-page-two .dropdown-title %button.dropdown-title-button.dropdown-menu-back{aria: {label: "Go back"}} |