Move project_last_activity to ProjectsHelper
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
This commit is contained in:
parent
231b91d0c8
commit
cf31f289d7
|
@ -136,14 +136,6 @@ module ApplicationHelper
|
||||||
Digest::SHA1.hexdigest string
|
Digest::SHA1.hexdigest string
|
||||||
end
|
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)
|
def authbutton(provider, size = 64)
|
||||||
file_name = "#{provider.to_s.split('_').first}_#{size}.png"
|
file_name = "#{provider.to_s.split('_').first}_#{size}.png"
|
||||||
image_tag("authbuttons/#{file_name}",
|
image_tag("authbuttons/#{file_name}",
|
||||||
|
|
|
@ -187,4 +187,12 @@ module ProjectsHelper
|
||||||
def default_clone_protocol
|
def default_clone_protocol
|
||||||
current_user ? "ssh" : "http"
|
current_user ? "ssh" : "http"
|
||||||
end
|
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
|
end
|
||||||
|
|
Loading…
Reference in New Issue