Editing Module:Feedback
Appearance
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('View link') | |||
wrapper:node(link) | |||
end | |||
if entry.image and trim(entry.image) ~= '' then | |||
local image = mw.html.create('img') | |||
:addClass('feedback-image') | |||
:attr('src', trim(entry.image)) | |||
:attr('alt', 'Feedback image') | |||
:attr('loading', 'lazy') | |||
wrapper:node(image) | |||
end | |||
return tostring(wrapper) | |||
end | end | ||
| Line 191: | Line 166: | ||
:addClass('feedback-resolution') | :addClass('feedback-resolution') | ||
resolution:wikitext('Resolved by ') | resolution:wikitext('↳ Resolved by ') | ||
if resolvedBy ~= '' then | if resolvedBy ~= '' then | ||
| Line 365: | Line 340: | ||
-- Attachments | -- Attachments | ||
-------------------------------------------------------- | -------------------------------------------------------- | ||
renderAttachments( | |||
content, | |||
entry | |||
) | ) | ||