Módulo:Infobox/Observatório

Permanently protected module
Origem: Wikipédia, a enciclopédia livre.
Documentação do módulo[ver] [editar] [histórico] [purgar]


Módulo de suporte de infocaixas

Ver também


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 function telescopes()
     local rows = {}
     for i = 1, 40 do
         table.insert (rows, {
             type = 'row',
             label = function ( localdata )
                 return localdata['telescópio' .. tostring(i .. '_nome')] or ''
             end,
             value = 'telescópio' .. tostring(i .. '_tipo'),
         })
     end
     return rows
 end
 
return {
    maincolor = '#e0e0e0',
    parts = {
        general.title(),
        general.logo(),
        building.mainimage(),
        {type = 'table', title = 'Características', rows = {
            {type = 'row', label = 'Proprietário', value = 'proprietário', property = 'P127'},
            {type = 'row', label = 'Manutenção', value = 'manutenção', property = 'P126'},
            {type = 'row', label = 'Organização', value = 'organização', property = 'P1268'},
            {type = 'row', label = 'Localização', value = 'localização', property = 'P276'}, -- útil para locais muito isolados
            {type = 'row', label = 'Código [[Minor Planet Center|IAU]]', value = 'código', property = 'P717'},
            {type = 'row', label = 'Origem do nome', value = 'nomeado_de', property = 'P138'},
            {type = 'row', label = 'Operador', value = 'operador', property = 'P137'},
            {type = 'row', label = 'Gerente', value = 'gerente', property = 'P1037'},
            {type = 'row', label = 'Tipo', value = 'tipo', property = 'P31'},
            {type = 'row', label = 'Construção', value = 'construção', property = 'P571'},
            {type = 'row', label = 'Telescópio(s)', value = 'telescópio', property = 'P527'},
            building.opening(),
            building.renovation(),
            building.demolition(),
            building.closure(),
            building.protection(),
            {type = 'row', label = 'Altitude', value = 'altitude', wikidata = {property = 'P2044', targetunit = 'metro'}},
            {type = 'row', label = 'Clima', value = 'clima' },
                        {type = 'row', label = 'Tempos de observação disponível', value = 'tempos de observação disponível', wikidata = {property = 'P3891', showunit = 'long'}},
            building.country(),
            building.historicalregion(),
            building.adminlocation(),
            building.mountainrange(),
            building.protectedarea(),
            building.coordenadas(),
            building.website(),
        }},
   
        {type = 'table', title = 'Telescópios', rows = telescopes() },
        building.geoloc({marker = 'star', markercolor = '#808080'}),
    }
}