2015-01-08 12:15:50 -05:00
|
|
|
module ExternalWikiHelper
|
|
|
|
def get_project_wiki_path(project)
|
|
|
|
external_wiki_service = project.services.
|
2015-12-14 21:53:52 -05:00
|
|
|
find { |service| service.to_param == 'external_wiki' }
|
2015-01-08 12:15:50 -05:00
|
|
|
if external_wiki_service.present? && external_wiki_service.active?
|
|
|
|
external_wiki_service.properties['external_wiki_url']
|
|
|
|
else
|
|
|
|
namespace_project_wiki_path(project.namespace, project, :home)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|