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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
c98b8ec1
Commit
c98b8ec1
authored
Mar 07, 2017
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' into 'ce-to-ee'
# Conflicts: # app/helpers/preferences_helper.rb
parents
aa88789f
0f6d2ca8
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
12 deletions
+7
-12
app/helpers/preferences_helper.rb
app/helpers/preferences_helper.rb
+3
-4
changelogs/unreleased/remove-readme-option.yml
changelogs/unreleased/remove-readme-option.yml
+4
-0
spec/controllers/projects_controller_spec.rb
spec/controllers/projects_controller_spec.rb
+0
-8
No files found.
app/helpers/preferences_helper.rb
View file @
c98b8ec1
...
...
@@ -35,9 +35,8 @@ module PreferencesHelper
def
project_view_choices
[
[
'Readme'
,
:readme
],
[
'Activity view'
,
:activity
],
[
'Files and Readme (default)'
,
:files
]
[
'Files and Readme (default)'
,
:files
],
[
'Activity view'
,
:activity
]
]
end
...
...
@@ -66,4 +65,4 @@ module PreferencesHelper
def
anonymous_project_view
@project
.
empty_repo?
||
!
can?
(
current_user
,
:download_code
,
@project
)
?
'activity'
:
'readme'
end
end
end
\ No newline at end of file
changelogs/unreleased/remove-readme-option.yml
0 → 100644
View file @
c98b8ec1
---
title
:
Remove readme-only project view preference
merge_request
:
author
:
spec/controllers/projects_controller_spec.rb
View file @
c98b8ec1
...
...
@@ -158,14 +158,6 @@ describe ProjectsController do
expect
(
response
).
to
render_template
(
'_activity'
)
end
it
"renders the readme view"
do
allow
(
controller
).
to
receive
(
:current_user
).
and_return
(
user
)
allow
(
user
).
to
receive
(
:project_view
).
and_return
(
'readme'
)
get
:show
,
namespace_id:
public_project
.
namespace
,
id:
public_project
expect
(
response
).
to
render_template
(
'_readme'
)
end
it
"renders the files view"
do
allow
(
controller
).
to
receive
(
:current_user
).
and_return
(
user
)
allow
(
user
).
to
receive
(
:project_view
).
and_return
(
'files'
)
...
...
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