Module:Feedback: Difference between revisions
From The Petit Planet Wiki
More actions
ReisuDesign (talk | contribs) No edit summary |
ReisuDesign (talk | contribs) No edit summary |
||
| Line 126: | Line 126: | ||
:addClass('feedback-attachments') | :addClass('feedback-attachments') | ||
local link = trim(entry.link) | |||
if | if link ~= '' then | ||
wrapper:wikitext( | |||
'[' .. link .. ' ' .. mw.text.nowiki(link) .. ']' | |||
) | |||
end | end | ||
local image = trim(entry.image) | |||
if image ~= '' then | |||
image = mw.ustring.gsub( | |||
image, | |||
'^File:', | |||
'' | |||
) | |||
local title = | local title = | ||
mw.title.new( | mw.title.new('File:' .. image) | ||
if title then | if title then | ||
if link ~= '' then | |||
wrapper:wikitext('<br>') | |||
end | |||
wrapper: | wrapper:wikitext( | ||
'[' .. | |||
title:fullUrl() .. | |||
' ' .. | |||
mw.text.nowiki(image) .. | |||
']' | |||
) | |||
end | end | ||
end | end | ||