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
60243c39
Commit
60243c39
authored
Aug 26, 2016
by
Alejandro Rodríguez
Committed by
Robert Speicher
Sep 01, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix "Wiki" link not appearing in navigation for projects with external wiki
parent
a7657098
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
0 deletions
+17
-0
CHANGELOG
CHANGELOG
+1
-0
app/models/project.rb
app/models/project.rb
+4
-0
spec/models/project_spec.rb
spec/models/project_spec.rb
+12
-0
No files found.
CHANGELOG
View file @
60243c39
...
...
@@ -50,6 +50,7 @@ v 8.11.3 (unreleased)
- Allow system info page to handle case where info is unavailable
- Label list shows all issues (opened or closed) with that label
- Don't show resolve conflicts link before MR status is updated
- Fix "Wiki" link not appearing in navigation for projects with external wiki
- Fix IE11 fork button bug !598
- Don't prevent viewing the MR when git refs for conflicts can't be found on disk
- Fix external issue tracker "Issues" link leading to 404s
...
...
app/models/project.rb
View file @
60243c39
...
...
@@ -772,6 +772,10 @@ class Project < ActiveRecord::Base
update_column
(
:has_external_issue_tracker
,
services
.
external_issue_trackers
.
any?
)
end
def
has_wiki?
wiki_enabled?
||
has_external_wiki?
end
def
external_wiki
if
has_external_wiki
.
nil?
cache_has_external_wiki
# Populate
...
...
spec/models/project_spec.rb
View file @
60243c39
...
...
@@ -516,6 +516,18 @@ describe Project, models: true do
end
end
describe
'#has_wiki?'
do
let
(
:no_wiki_project
)
{
build
(
:project
,
wiki_enabled:
false
,
has_external_wiki:
false
)
}
let
(
:wiki_enabled_project
)
{
build
(
:project
,
wiki_enabled:
true
)
}
let
(
:external_wiki_project
)
{
build
(
:project
,
has_external_wiki:
true
)
}
it
'returns true if project is wiki enabled or has external wiki'
do
expect
(
wiki_enabled_project
).
to
have_wiki
expect
(
external_wiki_project
).
to
have_wiki
expect
(
no_wiki_project
).
not_to
have_wiki
end
end
describe
'#external_wiki'
do
let
(
:project
)
{
create
(
: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