More Mab compability: different doctype and text escaping
This commit is contained in:
parent
0e2c9ee02e
commit
395271f0b1
1 changed files with 8 additions and 7 deletions
11
stoptime.rb
11
stoptime.rb
|
@ -1352,7 +1352,8 @@ module StopTime::Views
|
||||||
|
|
||||||
# The main layout used by all views.
|
# The main layout used by all views.
|
||||||
def layout
|
def layout
|
||||||
xhtml_strict do
|
doctype!
|
||||||
|
html do
|
||||||
head do
|
head do
|
||||||
title "Stop… Camping Time!"
|
title "Stop… Camping Time!"
|
||||||
# FIXME: improve static serving so that the hack below is not needed.
|
# FIXME: improve static serving so that the hack below is not needed.
|
||||||
|
@ -1386,7 +1387,7 @@ module StopTime::Views
|
||||||
h3 { a customer.name, :href => R(CustomersN, customer.id) }
|
h3 { a customer.name, :href => R(CustomersN, customer.id) }
|
||||||
if @tasks[customer].empty?
|
if @tasks[customer].empty?
|
||||||
p do
|
p do
|
||||||
text "No projects/tasks found! Create one " +
|
text! "No projects/tasks found! Create one " +
|
||||||
"#{a "here", :href => R(CustomersNTasksNew, customer.id)}."
|
"#{a "here", :href => R(CustomersNTasksNew, customer.id)}."
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
|
@ -1546,7 +1547,7 @@ module StopTime::Views
|
||||||
h2 "Customers"
|
h2 "Customers"
|
||||||
if @customers.empty?
|
if @customers.empty?
|
||||||
p do
|
p 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
|
||||||
else
|
else
|
||||||
|
@ -1707,7 +1708,7 @@ module StopTime::Views
|
||||||
|
|
||||||
if @invoices.values.flatten.empty?
|
if @invoices.values.flatten.empty?
|
||||||
p do
|
p 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
|
||||||
|
@ -1996,7 +1997,7 @@ module StopTime::Views
|
||||||
# menu item.
|
# menu item.
|
||||||
def _menu_link(label, ctrl)
|
def _menu_link(label, ctrl)
|
||||||
# FIXME: dirty hack?
|
# FIXME: dirty hack?
|
||||||
if self.helpers.class.to_s.match(/^#{ctrl.to_s}/)
|
if self.class.to_s.match(/^#{ctrl.to_s}/)
|
||||||
li.selected { a label, :href => R(ctrl) }
|
li.selected { a label, :href => R(ctrl) }
|
||||||
else
|
else
|
||||||
li { a label, :href => R(ctrl) }
|
li { a label, :href => R(ctrl) }
|
||||||
|
|
Loading…
Reference in a new issue