Documentação do módulo[ver] [editar] [histórico] [purgar]


Descrição

Este Módulo tem funções auxiliares de {{Info/Cemitério}}

Uso

Outra documentação:

local building = require "Módulo:Infobox/Funções/Edifício"
local general = require "Módulo:Infobox/Funções"
local wikidata = require "Módulo:Infobox/Wikidata"
local linguistic = require "Módulo:Linguística"
local convert = require "Módulo:Conversão"

local function tombas()
    local value = function(localdata)
    local numero = mw.getCurrentFrame():expandTemplate{title = 'Fmtn', args = { localdata['sepulturas'] }}
    if not numero then
        return nil
    end
    return numero
    end
 
    return {type = 'row', label = 'Sepulturas', value = value, property = 'P2351'}
end
local function cremacoes()
    local value = function(localdata)
    local numero = mw.getCurrentFrame():expandTemplate{title = 'Fmtn', args = { localdata['cremações'] }}
    return numero
    end
 
    return {type = 'row', label = '[[Cremação|Cremações]]', value = value}
end

return
    {
        maincolor = '#B0C4DE',
        parts = {
            {
                type = 'title',  -- não utilize mais general.title por causa do parâmetro "nome2" e "código língua", a harmonizar
                icon = 'map',
                value = 'nome',
                subtitle = function ( localdata )
                    local localname = localdata['nome2']
                    if not localname then
                        return nil
                    end
                    localname = '<i>' .. localname .. '</i>'
                    local lang = localdata['código língua']
                    lang = require "Módulo:Língua".languagueIcon{nil, lang}
                    return linguistic.conj({localname, lang}, ' ')
                end
            },
            general.mainimage('!Artigos de arquitetura sem imagem'),
            {type = 'table', rows = {
                general.country(),
                building.adminlocation(),
                building.protectedarea(),
                building.dimensions(),
                {type = 'row', label = 'Tipo', value = 'tipo'},
                {type = 'row', label = 'Administração', value = 'administração'},
                {type = 'row', label = 'Religiões', value = 'religião'},
                {type = 'row', label = '[[Superfície]]', value = function ( localdata )
                return convert.displayvalue( localdata['superfície'], 'hectare', {showunit = 'long'} )
                    end
                },
                --tombas,
                cremacao,
                {type = 'mixed', label = '[[Sepultamento|Sepultamentos]]', value = {'pessoas', 'sepultamentos'}, property = 'P2324'},
                {type = 'row', label = 'Entrada em serviço', value = {'entrada em serviço', 'inaugurado', 'inauguração'}, property = 'P1619'},
                {type = 'row', label = "Abandonado", value = 'data abandonado'}, -- événement Wikidata ?
                building.protection(),
                {type = 'row', label = "[[Find a Grave]]", value = 'Find a Grave', wikidata = {property = 'P2025', urlpattern="https://www.findagrave.com/cemetery/$1"}},
                building.coordenadas(),
            }},
            building.geoloc({marker='cemetery', default_zoom=13}),
            {type = 'table', title = 'Personalidades sepultadas', rows = {
                {
                    type = 'row',
                    value = function ( localdata )
                        if localdata['personalidade'] then
                            return localdata['personalidade']
                        end
                    end
                }
            }},
        }
    }