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:
parent
2e5985b32b
commit
4cf1517b43
10
stoptime.rb
10
stoptime.rb
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue