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
Boxiang Sun
gitlab-ce
Commits
f6cff8f7
Commit
f6cff8f7
authored
Nov 01, 2016
by
Adam Niedzielski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix relative links in Markdown wiki when displayed in "Project" tab
Refers to #23806.
parent
266fcfb1
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
47 additions
and
1 deletion
+47
-1
CHANGELOG.md
CHANGELOG.md
+1
-0
app/controllers/projects_controller.rb
app/controllers/projects_controller.rb
+2
-1
spec/features/projects/wiki/user_views_wiki_in_project_page_spec.rb
...res/projects/wiki/user_views_wiki_in_project_page_spec.rb
+44
-0
No files found.
CHANGELOG.md
View file @
f6cff8f7
...
...
@@ -43,6 +43,7 @@ Please view this file on the master branch, on stable branches it's out of date.
## 8.13.3
-
Fix relative links in Markdown wiki when displayed in "Project" tab !7218
-
Reduce the overhead to calculate number of open/closed issues and merge requests within the group or project
## 8.13.2 (2016-10-31)
...
...
app/controllers/projects_controller.rb
View file @
f6cff8f7
...
...
@@ -289,7 +289,8 @@ class ProjectsController < Projects::ApplicationController
render
'projects/empty'
if
@project
.
empty_repo?
else
if
@project
.
wiki_enabled?
@wiki_home
=
@project
.
wiki
.
find_page
(
'home'
,
params
[
:version_id
])
@project_wiki
=
@project
.
wiki
@wiki_home
=
@project_wiki
.
find_page
(
'home'
,
params
[
:version_id
])
elsif
@project
.
feature_available?
(
:issues
,
current_user
)
@issues
=
issues_collection
@issues
=
@issues
.
page
(
params
[
:page
])
...
...
spec/features/projects/wiki/user_views_wiki_in_project_page_spec.rb
0 → 100644
View file @
f6cff8f7
require
'spec_helper'
describe
'Projects > Wiki > User views wiki in project page'
,
feature:
true
do
let
(
:user
)
{
create
(
:user
)
}
let
(
:project
)
{
create
(
:empty_project
)
}
before
do
project
.
team
<<
[
user
,
:master
]
login_as
(
user
)
end
context
'when repository is disabled for project'
do
before
do
project
.
project_feature
.
update!
(
repository_access_level:
ProjectFeature
::
DISABLED
,
merge_requests_access_level:
ProjectFeature
::
DISABLED
,
builds_access_level:
ProjectFeature
::
DISABLED
)
end
context
'when wiki homepage contains a link'
do
before
do
WikiPages
::
CreateService
.
new
(
project
,
user
,
title:
'home'
,
content:
'[some link](other-page)'
).
execute
end
it
'displays the correct URL for the link'
do
visit
namespace_project_path
(
project
.
namespace
,
project
)
expect
(
page
).
to
have_link
(
'some link'
,
href:
namespace_project_wiki_path
(
project
.
namespace
,
project
,
'other-page'
)
)
end
end
end
end
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