Module:VersionInfobox: Difference between revisions

no edit summary
No edit summary
No edit summary
 
(2 intermediate revisions by the same user not shown)
Line 5: Line 5:
function p.main(frame)
function p.main(frame)
local args = frame:getParent().args
local args = frame:getParent().args
local headerStyle
local headerStyle
if args.headerstyle and args.headerstyle ~= '' then
if args.headerstyle == 'zandronum' then
headerStyle = string.format('background-color:%s;', args.headerstyle)
headerStyle = 'background-color: #35b06c;'
else
else
headerStyle = 'background-color:grey;'
headerStyle = 'background-color: grey;'
end
end
local retval = capiunto.create( {
local retval = capiunto.create( {
title = args.title,
title = args.title,
Line 28: Line 30:
end
end
if args.links ~= nil then
if args.hgtag ~= nil then
retval:addRow( 'Links', args.links )
retval:addRow( 'Mercurial tag', string.format( '[https://osdn.net/projects/zandronum/scm/hg/zandronum-stable/commits/%s %s]', args.hgtag, args.hgtag) )
end
if args.downloads ~= nil then
retval:addRow( 'Downloads', args.downloads )
end
end