From 9e5ade6eb9071a98c23972e0bc9a5f337ec80f2a Mon Sep 17 00:00:00 2001 From: Paul van Tilburg Date: Sat, 13 Jul 2013 22:49:41 +0200 Subject: [PATCH] Small refactoring --- stoptime.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/stoptime.rb b/stoptime.rb index ebe0c78..2373f2f 100644 --- a/stoptime.rb +++ b/stoptime.rb @@ -1646,11 +1646,11 @@ module StopTime::Views td { entry.date.to_date } td { entry.start.to_formatted_s(:time_only) } td { entry.end.to_formatted_s(:time_only)} - if entry.comment.nil? or entry.comment.empty? - td { a(:href => R(TimelineN, entry.id)){ i "None" } } - else + if entry.comment.present? td { a entry.comment, :href => R(TimelineN, entry.id), :title => entry.comment } + else + td { a(:href => R(TimelineN, entry.id)){ i "None" } } end td { "%.2fh" % entry.hours_total } td do