Show message if there are tasks but no active tasks

Show links to the task form of each of these tasks so that time can be
registered there.
This commit is contained in:
Paul van Tilburg 2014-11-08 12:06:33 +01:00
parent 2e5985b32b
commit 4cf1517b43
1 changed files with 10 additions and 0 deletions

View File

@ -1788,6 +1788,16 @@ module StopTime::Views
text! "No projects/tasks found! Create one " +
"#{a "here", :href => R(CustomersNTasksNew, customer.id)}."
end
elsif @active_tasks[customer].empty?
p do
text! "No active projects/tasks found! " +
"Register time on one of these tasks: "
br
@tasks[customer].each do |task|
a task.name, :href => R(CustomersNTasksN, customer.id, task.id)
text! "·" unless task == @tasks[customer].last
end
end
else
table.table.table_condensed do
col.task