Chronos chronos left.png
Rusmed logo color.png
Chronos chronos right.png

A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

Module:Cartouche

De Commission Historique

La documentation pour ce module peut être créée à Module:Cartouche/doc

local p = {}
local cartouche_fields = {"Specialite", "Nationalite","Titres","Naissance","Deces","nom","prenom","sexe"}
t = require("Module:Translate")


function p.cartouche(frame)
	local d = frame.args
	local langue = frame:preprocess("{{int:lang}}")

	local c = '{| style=\"width: 30em; font-size: 90%; border: 1px solid #aaaaaa; background-color: #f9f9f9; color: black; margin-bottom: 0.5em; margin-left: 1em; padding: 0.2em; float: right; clear: right; text-align:left;\" \n! style=\"text-align: center; background-color:#cccccc;\" colspan=\"2\" |<big>'  .. d.prenom .. ' ' .. d.nom .. '</big>\n|-\n'
	if d.Image ~= nil then
		c = c .. '|colspan=\"2\"|[[Fichier:' .. d.Image .. '|360px|center|border|' .. d.prenom .. ' ' .. d.nom ..  ']]<br>\n|-'
	end
	for _,label in ipairs(cartouche_fields) do
		if d[label] ~= nil and #d[label]  > 0 then
			--c = c .. label .. ' = ' .. valeur .. '\n\n'
			c = c .. '\n!'..  t.translate(label,langue) .. '\n|height=\"25\"|' .. d[label] .. '\n|-\n|-\n'
		end
	end
	c = c .. '|} \n<div align=\"left\">__TOC__</div>' .. '<span title=\"{{def:Arzt}}\">TEXTE AVEC INFO BULLE</span>'
	c = frame:preprocess(c)
	
	user = frame:preprocess("{{CURRENTLOGGEDUSER}}")
	return user
end

return p