GitLab steht Mittwoch, den 23. September, zwischen 10:00 und 12:00 Uhr aufgrund von Wartungsarbeiten nicht zur Verfügung.

Commit 21ff216e authored by jplang's avatar jplang

Link to user by id (#4179).

Patch by Marius BALTEANU.

git-svn-id: https://svn.redmine.org/redmine/trunk@16671 e93f8b46-1217-0410-a6f0-8f06a7374b81
parent fa5df88d
......@@ -821,6 +821,7 @@ module ApplicationHelper
# Users:
# user:jsmith -> Link to user with login jsmith
# @jsmith -> Link to user with login jsmith
# user#2 -> Link to user with id 2
#
# Links can refer other objects from other projects, using project identifier:
# identifier:r52
......@@ -908,6 +909,9 @@ module ApplicationHelper
if p = Project.visible.find_by_id(oid)
link = link_to_project(p, {:only_path => only_path}, :class => 'project')
end
when 'user'
u = User.visible.where(:id => oid, :type => 'User').first
link = link_to_user(u) if u
end
elsif sep == ':'
name = remove_double_quotes(identifier)
......
......@@ -386,6 +386,7 @@ RAW
"http://foo.bar/FAQ#3" => '<a class="external" href="http://foo.bar/FAQ#3">http://foo.bar/FAQ#3</a>',
# user
'user:jsmith' => link_to_user(User.find_by_id(2)),
'user#2' => link_to_user(User.find_by_id(2)),
'@jsmith' => link_to_user(User.find_by_id(2)),
# invalid user
'user:foobar' => 'user:foobar',
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment