Module:Laboratory

From DAAP
Jump to navigation Jump to search

Documentation for this module may be created at Module:Laboratory/doc

local p = {}
 
function p.infobox(f)
    local capiunto = require 'capiunto'
    local linkedwiki = require 'linkedwiki'
    
   local rdfs = 'http://www.w3.org/2000/01/rdf-schema#'
   local daap = 'http://daap.eu/wiki/'
   local daapo = 'http://daap.eu/wiki/Data:Organization#'
   local geo = 'http://www.w3.org/2003/01/geo/wgs84_pos#'
   local vcard = 'http://www.w3.org/2006/vcard/ns#'
   
   local subject = f.args.iri or linkedwiki.getCurrentIRI();
   local object =  linkedwiki.new(subject)
   --object:setDebug(true)
	return capiunto.create( {
	    -- bodyStyle = 'border: 15px solid red',
		title =  object:checkLabelOfInternLink(subject, rdfs..'label',f.args.Title,'en')  ,
        top = 'Laboratory',
		topStyle = 'background:#cfc;font-size:larger',		
		bottom = object:checkExternLink('Website',rdfs..'seeAlso',f.args.Website)
	} )
	:addRow('Contact', object:checkUser(daapo..'contact',f.args.Contact,""))
	:addRow('Signature', object:checkString(daapo..'signature',f.args.Signature))
	:addWikitext( object:getMaintenanceCategory() ..  "[[Category:Interdisciplinary Unit]]"
				.."[[Category:Laboratory]]" )
end
 
return p