Difference between revisions of "Module:User"

From DAAP
Jump to navigation Jump to search
Line 7: Line 7:
 
 
 
   local rdfs = 'http://www.w3.org/2000/01/rdf-schema#'
 
   local rdfs = 'http://www.w3.org/2000/01/rdf-schema#'
   local daapProp = 'http://daap.eu/wiki/Property:'
+
   local daapo = 'http://daap.eu/wiki/Data:Organization#'
 
   local geo = 'http://www.w3.org/2003/01/geo/wgs84_pos#'
 
   local geo = 'http://www.w3.org/2003/01/geo/wgs84_pos#'
 
   local vcard = 'http://www.w3.org/2006/vcard/ns#'
 
   local vcard = 'http://www.w3.org/2006/vcard/ns#'
Line 23: Line 23:
 
:addRow('Fullname',  object:checkValue(vcard..'fn',f.args.Fullname))
 
:addRow('Fullname',  object:checkValue(vcard..'fn',f.args.Fullname))
 
:addRow('Email',  object:checkValue(vcard..'email',f.args.Email))
 
:addRow('Email',  object:checkValue(vcard..'email',f.args.Email))
 +
--:addRow('Organization',  object:checkValue(vcard..'hasOrganizationUnit',f.args.Organization_1))
 +
--:addRow('Organization',  object:checkValue(vcard..'hasOrganizationUnit',f.args.Organization_2))
 +
--:addRow('Organization',  object:checkValue(vcard..'hasOrganizationUnit',f.args.Organization_3))
 
:addWikitext(  object:getMaintenanceCategory() ..  "[[Category:User]]" )
 
:addWikitext(  object:getMaintenanceCategory() ..  "[[Category:User]]" )
 
 

Revision as of 21:20, 22 February 2017

Documentation for this module may be created at Module:User/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 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)
   
	return capiunto.create( {
	    -- bodyStyle = 'border: 15px solid red',
		title =   object:checkLabelOfInternLink(subject, rdfs..'label',f.args.Title)  ,
                top = 'User',
		topStyle = 'background:#cfc;font-size:larger',		
		bottom =  object:checkExternLink('Website',rdfs..'seeAlso',f.args.Website)
	} )
	:addRow('Fullname',  object:checkValue(vcard..'fn',f.args.Fullname))
	:addRow('Email',  object:checkValue(vcard..'email',f.args.Email))
	--:addRow('Organization',  object:checkValue(vcard..'hasOrganizationUnit',f.args.Organization_1))
	--:addRow('Organization',  object:checkValue(vcard..'hasOrganizationUnit',f.args.Organization_2))
	--:addRow('Organization',  object:checkValue(vcard..'hasOrganizationUnit',f.args.Organization_3))
	:addWikitext(  object:getMaintenanceCategory() ..  "[[Category:User]]" )
	
end
 
return p