Patch #20063 » 20063-Redmine-3.4.1.patch
| app/helpers/application_helper.rb Sun Jul 09 07:18:26 2017 +0000 → app/helpers/application_helper.rb Thu Jul 13 11:36:42 2017 +0200 | ||
|---|---|---|
|
#
|
||
|
# Examples:
|
||
|
# Issues:
|
||
|
# #52 -> Link to issue #52
|
||
|
# #52 -> Link to issue #52, showing the title over the issue number
|
||
|
# issue#52 -> Link to issue with id 52, expanding the title in the link
|
||
|
# Changesets:
|
||
|
# r52 -> Link to revision 52
|
||
|
# commit:a85130f -> Link to scmid starting with a85130f
|
||
| ... | ... | |
|
:class => issue.css_classes,
|
||
|
:title => "#{issue.tracker.name}: #{issue.subject.truncate(100)} (#{issue.status.name})")
|
||
|
end
|
||
|
when 'issue'
|
||
|
if oid.to_s == identifier &&
|
||
|
issue = Issue.visible.find_by_id(oid)
|
||
|
anchor = comment_id ? "note-#{comment_id}" : nil
|
||
|
|
||
|
link = link_to("##{oid}#{comment_suffix}: (#{issue.tracker.name}) #{issue.subject.truncate(100)} (#{issue.status.name})",
|
||
|
issue_url(issue, :only_path => only_path, :anchor => anchor),
|
||
|
:class => issue.css_classes)
|
||
|
end
|
||
|
when 'document'
|
||
|
if document = Document.visible.find_by_id(oid)
|
||
|
link = link_to(document.title, document_url(document, :only_path => only_path), :class => 'document')
|
||
| ... | ... | |
|
(?<leading>[\s\(,\-\[\>]|^)
|
||
|
(?<esc>!)?
|
||
|
(?<project_prefix>(?<project_identifier>[a-z0-9\-_]+):)?
|
||
|
(?<prefix>attachment|document|version|forum|news|message|project|commit|source|export|user)?
|
||
|
(?<prefix>issue|attachment|document|version|forum|news|message|project|commit|source|export|user)?
|
||
|
(
|
||
|
(
|
||
|
(?<sep1>\#)|
|
||