mirror of
https://gitlink.org.cn/Gitlink/forgeplus.git
synced 2026-05-03 03:40:49 +08:00
FIX bug
This commit is contained in:
14
app/helpers/admins/projects_helper.rb
Normal file
14
app/helpers/admins/projects_helper.rb
Normal file
@@ -0,0 +1,14 @@
|
||||
module Admins::ProjectsHelper
|
||||
|
||||
def link_to_project(project)
|
||||
owner = project.owner
|
||||
|
||||
if owner.is_a?(User)
|
||||
link_to(project.owner&.real_name, "/users/#{project&.owner&.login}", target: '_blank')
|
||||
elsif owner.is_a?(Organization)
|
||||
link_to(project.owner&.real_name, "/organize/#{project&.owner&.login}", target: '_blank')
|
||||
else
|
||||
""
|
||||
end
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user