Unverified Commit cf31f289 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets
Browse files

Move project_last_activity to ProjectsHelper


Signed-off-by: default avatarDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
parent 32c9c0a53272
......@@ -136,14 +136,6 @@ def hexdigest(string)
Digest::SHA1.hexdigest string
end
def project_last_activity(project)
if project.last_activity_at
time_ago_with_tooltip(project.last_activity_at, 'bottom', 'last_activity_time_ago') + " ago"
else
"Never"
end
end
def authbutton(provider, size = 64)
file_name = "#{provider.to_s.split('_').first}_#{size}.png"
image_tag("authbuttons/#{file_name}",
......
......@@ -187,4 +187,12 @@ def default_url_to_repo
def default_clone_protocol
current_user ? "ssh" : "http"
end
def project_last_activity(project)
if project.last_activity_at
time_ago_with_tooltip(project.last_activity_at, 'bottom', 'last_activity_time_ago') + " ago"
else
"Never"
end
end
end
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