diff options
author | tiagonbotelho <tiagonbotelho@hotmail.com> | 2016-11-11 22:57:23 +0000 |
---|---|---|
committer | tiagonbotelho <tiagonbotelho@hotmail.com> | 2016-11-11 22:57:23 +0000 |
commit | 062c9a08c44f2e178476cace0ebd8a55aa27e866 (patch) | |
tree | c908b63b39dab76b5a6058023dea543bd7ee88bd /app/helpers/preferences_helper.rb | |
parent | 0527ea09920d49bb9e1574e7a61958ba70dbe24e (diff) | |
download | gitlab-ce-062c9a08c44f2e178476cace0ebd8a55aa27e866.tar.gz |
change empty project view to annonymous user from activity to empty partial
Diffstat (limited to 'app/helpers/preferences_helper.rb')
-rw-r--r-- | app/helpers/preferences_helper.rb | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/app/helpers/preferences_helper.rb b/app/helpers/preferences_helper.rb index a721f8957cb..f7189e0c5a1 100644 --- a/app/helpers/preferences_helper.rb +++ b/app/helpers/preferences_helper.rb @@ -50,9 +50,7 @@ module PreferencesHelper end def default_project_view - unless current_user - return @repository.head_commit ? 'readme' : 'activity' - end + return annonymous_project_view unless current_user user_view = current_user.project_view @@ -68,4 +66,8 @@ module PreferencesHelper "customize_workflow" end end + + def annonymous_project_view + @project.empty_repo? ? 'empty' : 'readme' + end end |