Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Léo-Paul Géneau
gitlab-ce
Commits
6f085653
Commit
6f085653
authored
Oct 17, 2015
by
Douwe Maan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove redundant helper method.
parent
cfa3602a
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
12 deletions
+5
-12
app/helpers/preferences_helper.rb
app/helpers/preferences_helper.rb
+2
-8
app/views/projects/show.html.haml
app/views/projects/show.html.haml
+3
-4
No files found.
app/helpers/preferences_helper.rb
View file @
6f085653
...
@@ -47,13 +47,7 @@ module PreferencesHelper
...
@@ -47,13 +47,7 @@ module PreferencesHelper
Gitlab
::
ColorSchemes
.
for_user
(
current_user
).
css_class
Gitlab
::
ColorSchemes
.
for_user
(
current_user
).
css_class
end
end
def
prefer_readme?
def
default_project_view
!
current_user
||
current_user
?
current_user
.
project_view
:
'readme'
current_user
.
project_view
==
'readme'
end
def
current_user_default_project_view
(
current_user
&&
current_user
.
project_view
)
||
'readme'
end
end
end
end
app/views/projects/show.html.haml
View file @
6f085653
...
@@ -27,7 +27,7 @@
...
@@ -27,7 +27,7 @@
=
link_to
project_files_path
(
@project
)
do
=
link_to
project_files_path
(
@project
)
do
=
repository_size
=
repository_size
-
if
!
prefer_readme?
&&
@repository
.
readme
-
if
default_project_view
!=
'readme'
&&
@repository
.
readme
%li
%li
=
link_to
'Readme'
,
readme_path
(
@project
)
=
link_to
'Readme'
,
readme_path
(
@project
)
...
@@ -67,9 +67,8 @@
...
@@ -67,9 +67,8 @@
.content-block.second-block.white
.content-block.second-block.white
=
render
'projects/last_commit'
,
commit:
@repository
.
commit
,
project:
@project
=
render
'projects/last_commit'
,
commit:
@repository
.
commit
,
project:
@project
%section
%div
{
class:
"project-show-#{default_project_view}"
}
%div
{
class:
"project-show-#{current_user_default_project_view}"
}
=
render
default_project_view
=
render
current_user_default_project_view
-
if
current_user
-
if
current_user
-
access
=
user_max_access_in_project
(
current_user
,
@project
)
-
access
=
user_max_access_in_project
(
current_user
,
@project
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment