Editing Module:Feedback
From The Petit Planet Wiki
More actions
The edit can be undone.
Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.
| Latest revision | Your text | ||
| Line 122: | Line 122: | ||
local function renderAttachments(entry) | local function renderAttachments(entry) | ||
local wrapper = mw.html.create('div') | |||
:addClass('feedback-attachments') | |||
if entry.link and trim(entry.link) ~= '' then | |||
local link = mw.html.create('a') | |||
:addClass('feedback-link') | |||
:attr('href', trim(entry.link)) | |||
:attr('target', '_blank') | |||
:attr('rel', 'noopener noreferrer') | |||
:wikitext(trim(entry.link)) | |||
wrapper:node(link) | |||
end | |||
if entry.image and trim(entry.image) ~= '' then | |||
local imageName = trim(entry.image) | |||
-- Remove File: prefix if one was stored | |||
imageName = mw.ustring.gsub(imageName, '^File:', '') | |||
local imageLink = mw.html.create('a') | |||
:addClass('feedback-image-link') | |||
:attr('href', mw.title.new('File:' .. imageName):fullUrl()) | |||
:attr('target', '_blank') | |||
:attr('rel', 'noopener noreferrer') | |||
:wikitext(imageName) | |||
wrapper:node(imageLink) | |||
end | |||
return wrapper | |||
end | end | ||
| Line 191: | Line 172: | ||
:addClass('feedback-resolution') | :addClass('feedback-resolution') | ||
resolution:wikitext('Resolved by ') | resolution:wikitext('↳ Resolved by ') | ||
if resolvedBy ~= '' then | if resolvedBy ~= '' then | ||