Restyled projects list on dashboard

This commit is contained in:
Dmitriy Zaporozhets 2012-08-30 08:13:36 +03:00
parent 51558bd57a
commit 793db070f0
3 changed files with 49 additions and 11 deletions

View file

@ -78,16 +78,16 @@ module ApplicationHelper
end
def show_last_push_widget?(event)
event &&
event &&
event.last_push_to_non_root? &&
!event.rm_ref? &&
event.project &&
event.project &&
event.project.merge_requests_enabled
end
def tab_class(tab_key)
active = case tab_key
# Project Area
when :wall; wall_tab?
when :wiki; controller.controller_name == "wikis"
@ -126,4 +126,13 @@ module ApplicationHelper
def hexdigest(string)
Digest::SHA1.hexdigest string
end
def project_last_activity project
activity = project.last_activity
if activity && activity.created_at
time_ago_in_words(activity.created_at) + " ago"
else
"Never"
end
end
end