Module:EnCours

De Adadov.net wiki
Documentation icon Documentation Module[voir] [éditer] [historique] [purger]

Ce module implémente {{Modèle:EnCours}}

local documentation = require('Module:Documentation').main

local p = {}

local function getType()
	local title = tostring(mw.title.getCurrentTitle())
	if string.match(title, "doc") then
		type = "doc"
	else
		type = "std"
	end
 
	p.type = type
 
	return type
end	

function p.showType()
	local type = p.getType()
	print(type)
	return type
end
 
function p.showTitle()
	print(tostring(mw.title.getCurrentTitle()))
end

function p.html( frame ) 
	local img = "[[Image:Vlc.png|70px]]"
	local auteurName = frame.args.auteur
	local auteur = "'' Auteur / Editeur : [[Utilisateur:{{{auteurName}}}|{{{auteurName}}}]]"
	local textInfo = [[Le présent article est actuellement en cours de rédaction ou de modification.<br />
	Adressez-vous à la personne en charge pour toute proposition ou modification.]]
	
	local text = [[<div class="wgTemplateWarning">
	{| align="center"
	|+ style="color:red;font-weight:bold;"| Article en cours de rédaction ou de modification !
	| ]]..img..[[
	|-
	|style="font-size:0.85em;"|]]..textInfo..[[
	|-
	|align="right"|]]..auteur..[[
	|}
	</div>]]

	return text
end

return p