Module:Coordinates: Difference between revisions
Jump to navigation
Jump to search
Content added Content deleted
m (Protected Module:Coordinates: Highly visible template ([Edit=Block all non-admin users] (indefinite) [Move=Block all non-admin users] (indefinite))) |
(fix note handling) |
||
Line 20: | Line 20: | ||
--[[ Helper function, replacement for {{coord/display/title}} ]] |
--[[ Helper function, replacement for {{coord/display/title}} ]] |
||
function displaytitle (s) |
function displaytitle (s, notes) |
||
local l = "[[Geographic coordinate system|Coordinates]]: " .. s |
local l = "[[Geographic coordinate system|Coordinates]]: " .. s |
||
local co = '<span id="coordinates">' .. l .. '</span>'; |
local co = '<span id="coordinates">' .. l .. notes .. '</span>'; |
||
return '<span style="font-size: small;">' .. co .. '</span>'; |
return '<span style="font-size: small;">' .. co .. '</span>'; |
||
end |
end |
||
--[[ Helper function, Replacement for {{coord/display/inline}} ]] |
--[[ Helper function, Replacement for {{coord/display/inline}} ]] |
||
function displayinline (s) |
function displayinline (s, notes) |
||
return s |
return s .. notes |
||
end |
end |
||
Line 566: | Line 566: | ||
if string.find( Display, 'inline' ) ~= nil or Display == 't' or |
if string.find( Display, 'inline' ) ~= nil or Display == 't' or |
||
Display == 'it' or Display == 'ti' then |
Display == 'it' or Display == 'ti' then |
||
text = displayinline(contents) |
text = displayinline(contents, Notes) |
||
end |
end |
||
if string.find( Display, 'title' ) ~= nil or Display == 'i' or |
if string.find( Display, 'title' ) ~= nil or Display == 'i' or |
||
Display == 'it' or Display == 'ti' then |
Display == 'it' or Display == 'ti' then |
||
text = text .. displaytitle(contents) |
text = text .. displaytitle(contents, Notes) |
||
end |
end |
||
return text |
return text |
||
end |
end |
||