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.
This commit is contained in:
Paul van Tilburg 2013-06-23 22:33:44 +02:00
parent 2b8d4c9111
commit 2e86eb8b27
1 changed files with 6 additions and 2 deletions

View File

@ -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?