Différences entre les versions de « Module:OInfobox-Building »

Aller à la navigation Aller à la recherche
m
aucun résumé de modification
m
m
Ligne 15 : Ligne 15 :
end
end


local function addImage(box, image, caption, defaultImage, defaultCaption)
local function addImage(box, image, defaultImage)
     if not image and not defaultImage then
     if not image and not defaultImage then
         box:wikitext('[[Category:Image Needed]]')
         box:wikitext('[[Category:Image Needed]]')
Ligne 28 : Ligne 28 :


     imageDiv:wikitext(fileWiki)
     imageDiv:wikitext(fileWiki)
    if caption or defaultCaption then
        imageDiv:tag('span')
            :addClass('infoboxCaption')
            :wikitext(caption or defaultCaption)
    end


     box:node(imageDiv)
     box:node(imageDiv)
Ligne 121 : Ligne 115 :
     local infobox = createInfobox(building)
     local infobox = createInfobox(building)


     addImage(infobox, args['image'], args['caption'], buildingData and buildingData.defaultImage, buildingData and buildingData.defaultCaption)
     addImage(infobox, args['image'], buildingData and buildingData.defaultImage, buildingData and buildingData.defaultCaption)


     if buildingData then
     if buildingData then
606

modifications

Menu de navigation