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

An alternative space dedicated to technology and culture at Charleroi.
Aller à la navigation Aller à la recherche
(+Summary, more information, <span class="workshop-idea">)
(Fixing tabs)
 
Ligne 8 : Ligne 8 :
-- Title
-- Title
    if (args.title == nil or args.title == '') then
if (args.title == nil or args.title == '') then
        -- title = '{{LangSwitch|fr=Idée de worskhop|en=A new workshop idea}}'
-- title = '{{LangSwitch|fr=Idée de worskhop|en=A new workshop idea}}'
        title = 'A new workshop idea'
title = 'A new workshop idea'
    else  
else  
        title = args.title
title = args.title
    end   
end   
    text = text .. '<span class="workshop-title">' .. title .. '</span>'
text = text .. '<span class="workshop-title">' .. title .. '</span>'
   
    -- Summary, more information
-- Summary, more information
    if (args.summary ~= nil and args.summary ~= '') then
if (args.summary ~= nil and args.summary ~= '') then
    text = text .. '<br /><span class="workshop-summary">' .. args.summary .. '</span>'
text = text .. '<br /><span class="workshop-summary">' .. args.summary .. '</span>'
    end
end
    if (args.moreinfo ~= nil and args.moreinfo ~= '') then
if (args.moreinfo ~= nil and args.moreinfo ~= '') then
    text = text .. '<br /><span class="workshop-moreinfo">[' .. args.moreinfo .. ' More information]</span>'
text = text .. '<br /><span class="workshop-moreinfo">[' .. args.moreinfo .. ' More information]</span>'
    end
end
   
    text = text .. '</span>'
text = text .. '</span>'
    return text
return text
end
end


return p
return p

Version actuelle datée du 14 novembre 2013 à 16:15

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

local p = {}

-- Gets the idea line
function p.GetIdea(frame)
	args = frame:getParent().args
	
	text = '<span class="workshop-idea">'
	
	-- Title
	if (args.title == nil or args.title == '') then
		-- title = '{{LangSwitch|fr=Idée de worskhop|en=A new workshop idea}}'
		title = 'A new workshop idea'
	else 
		title = args.title
	end  
	text = text .. '<span class="workshop-title">' .. title .. '</span>'
	
	-- Summary, more information
	if (args.summary ~= nil and args.summary ~= '') then
		text = text .. '<br /><span class="workshop-summary">' .. args.summary .. '</span>'
	end
	if (args.moreinfo ~= nil and args.moreinfo ~= '') then
		text = text .. '<br /><span class="workshop-moreinfo">[' .. args.moreinfo .. ' More information]</span>'
	end
	
	text = text .. '</span>'
	return text
end

return p