Project

General

Profile

Feature #26530 ยป wiki-links-patch.diff

Michael Gerz, 2017-07-27 17:38

View differences:

application_helper.rb 2017-07-26 14:39:39.959434818 +0200
title ||= identifier if page.blank?
end
if link_project && link_project.wiki && User.current.allowed_to?(:view_wiki_pages, link_project)
if link_project && link_project.wiki
# extract anchor
anchor = nil
if page =~ /^(.+?)\#(.+)$/
......
:id => wiki_page_id, :version => nil, :anchor => anchor, :parent => parent)
end
end
link_to(title.present? ? title.html_safe : h(page), url, :class => ('wiki-page' + (wiki_page ? '' : ' new')))
if User.current.allowed_to?(:view_wiki_pages, link_project)
link_to(title.present? ? title.html_safe : h(page), url, :class => ('wiki-page' + (wiki_page ? '' : ' new')))
else
title.present? ? title.html_safe : h(page)
end
else
# project or wiki doesn't exist
all
    (1-1/1)