« Module:EnCours » : différence entre les versions

De Adadov.net wiki
Aucun résumé des modifications
Aucun résumé des modifications
Ligne 34 : Ligne 34 :
local text = [[<div class="wgTemplateWarning">
local text = [[<div class="wgTemplateWarning">
>> {| align="center"
{| align="center"
>> |+ style="color:red;font-weight:bold;"| Article en cours de rédaction ou de modification !
|+ style="color:red;font-weight:bold;"| Article en cours de rédaction ou de modification !
>> | ]]..img..[[
| ]]..img..[[
>> |-
|-
>> |style="font-size:0.85em;"|]]..textInfo..[[
|style="font-size:0.85em;"|]]..textInfo..[[
>> |-
|-
>> |align="right"|]]..auteur..[[
|align="right"|]]..auteur..[[
>> |}
|}
>> </div>]]
</div>]]


return text
return text

Version du 4 février 2015 à 17:20

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