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