From dc3d7496ca59079900ce422eda491a6f3e3586f0 Mon Sep 17 00:00:00 2001 From: Paul van Tilburg Date: Sat, 20 Jun 2015 18:35:11 +0200 Subject: [PATCH] Also hide the register time entries header if there are no time entries --- stoptime.rb | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/stoptime.rb b/stoptime.rb index 6c3fe6f..d407abc 100644 --- a/stoptime.rb +++ b/stoptime.rb @@ -2261,13 +2261,13 @@ module StopTime::Views end end end - + # Show registered time using the time_entries view as partial view. div.row do div.col_md_12 do h2 "Registered time" - _time_entries(@customer) unless @method == "create" + _time_entries(@customer) end - end + end unless @button == "create" end # Form for updating the properties of a task ({Models::Task}). @@ -2353,8 +2353,10 @@ module StopTime::Views end end # Show registered time (ab)using the time_entries view as partial view. - h2 "Registered #{@task.billed? ? "billed" : "unbilled"} time" - _time_entries(@customer, @task) unless @method == "create" + unless @method == "create" + h2 "Registered #{@task.billed? ? "billed" : "unbilled"} time" + _time_entries(@customer, @task) + end end # The main overview of the existing invoices.