From 2e86eb8b27dba12260ec6cf8733ba72ae4b87479 Mon Sep 17 00:00:00 2001 From: Paul van Tilburg Date: Sun, 23 Jun 2013 22:33:44 +0200 Subject: [PATCH] Show "None" for absent time entry comments in the time_entries view There needs to be some kind of placeholder the comment is the thing to click on when clicking through to the time_entry view. --- stoptime.rb | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/stoptime.rb b/stoptime.rb index 910529b..2ae3e31 100644 --- a/stoptime.rb +++ b/stoptime.rb @@ -1610,8 +1610,12 @@ module StopTime::Views td { entry.date.to_date } td { entry.start.to_formatted_s(:time_only) } td { entry.end.to_formatted_s(:time_only)} - td { a entry.comment, :href => R(TimelineN, entry.id), - :title => entry.comment } + if entry.comment.nil? or entry.comment.empty? + td { a(:href => R(TimelineN, entry.id)){ i "None" } } + else + td { a entry.comment, :href => R(TimelineN, entry.id), + :title => entry.comment } + end td { "%.2fh" % entry.hours_total } td do i(:class => "icon-ok") if entry.bill?