Style the no customer/invoices/projects alerts the same way

This commit is contained in:
Paul van Tilburg 2014-10-18 21:28:18 +02:00
parent 70588df53f
commit e5e879df03
1 changed files with 67 additions and 63 deletions

View File

@ -1526,13 +1526,13 @@ module StopTime::Views
small "#{@tasks.count} customers, #{@task_count} active projects/tasks"
end
end
div.row do
if @tasks.empty?
div.alert.alert_info do
text! "No customers, projects or tasks found! Set them up " +
"#{a "here", :href => R(CustomersNew)}."
end
else
div.row do
div.span6 do
@tasks.keys.sort_by { |c| c.name }.each do |customer|
inv_klass = "text_info"
@ -1750,7 +1750,7 @@ module StopTime::Views
end
end
if @customers.empty?
p do
div.alert.alert_info do
text! "None found! You can create one " +
"#{a "here", :href => R(CustomersNew)}."
end
@ -1861,6 +1861,9 @@ module StopTime::Views
:href => R(CustomersNTasksNew, @customer.id)
end
end
if @billed_tasks.empty?
p "None found!"
else
div.accordion.task_list! do
@billed_tasks.keys.sort_by { |task| task.name }.each do |task|
div.accordion_group do
@ -1922,6 +1925,7 @@ module StopTime::Views
end
end
end
end
h2 do
text! "Invoices"
@ -2004,14 +2008,14 @@ module StopTime::Views
small "#{@invoices.count} customers, #{@invoice_count} invoices"
end
end
div.row do
div.span7 do
if @invoices.values.flatten.empty?
p do
text! "Found none! You can create one by "
div.alert.alert_info do
text! "Found none! You can create one by " +
"#{a "selecting a customer", :href => R(Customers)}."
end
else
div.row do
div.span7 do
@invoices.keys.sort.each do |key|
next if @invoices[key].empty?
h3 { key }