Commit 6f085653 authored by Douwe Maan's avatar Douwe Maan

Remove redundant helper method.

parent cfa3602a
......@@ -47,13 +47,7 @@ module PreferencesHelper
Gitlab::ColorSchemes.for_user(current_user).css_class
end
def prefer_readme?
!current_user ||
current_user.project_view == 'readme'
end
def current_user_default_project_view
(current_user && current_user.project_view) ||
'readme'
def default_project_view
current_user ? current_user.project_view : 'readme'
end
end
......@@ -27,7 +27,7 @@
= link_to project_files_path(@project) do
= repository_size
- if !prefer_readme? && @repository.readme
- if default_project_view != 'readme' && @repository.readme
%li
= link_to 'Readme', readme_path(@project)
......@@ -67,9 +67,8 @@
.content-block.second-block.white
= render 'projects/last_commit', commit: @repository.commit, project: @project
%section
%div{class: "project-show-#{current_user_default_project_view}"}
= render current_user_default_project_view
%div{class: "project-show-#{default_project_view}"}
= render default_project_view
- if current_user
- access = user_max_access_in_project(current_user, @project)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment