summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2016-04-16 20:40:28 +0000
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2016-04-16 20:40:28 +0000
commit7dce9b1dc2edde2b4381604a3d0e09ba5835c6cf (patch)
treea69442186f1d96cc724be60f440060bc9fba6000
parent05920a7964a039fd65d6b665c2ebd130d5ef949c (diff)
parente79b0dd762719828203bd48c253a88d876bcf61a (diff)
downloadgitlab-ce-7dce9b1dc2edde2b4381604a3d0e09ba5835c6cf.tar.gz
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.rb1
-rw-r--r--app/views/help/ui.html.haml12
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"}}