Module:ProfessionList: Difference between revisions

Jump to navigation Jump to search
Content added Content deleted
(force nil values for xp, kp, and duration, if any subrecipes does not have thoe parameters)
(p.unknown_value_edit_cell supports a list of pages, all of which will be linked)
 
Line 37: Line 37:
-- use within :node()
-- use within :node()
function p.unknown_value_edit_cell(page,N)
function p.unknown_value_edit_cell(page,N)
if type(page) == 'string' then
local url = tostring(mw.uri.fullUrl(page,'action=edit'))
page = {page}
end
local textstring = ''
for _,p in ipairs(page) do
local url = tostring(mw.uri.fullUrl(p,'action=edit'))
local link = '['..url.." '''?''' (edit)]<br>"
textstring = textstring .. link
end
return mw.html.create('td')
return mw.html.create('td')
:addClass('table-bg-gray')
:addClass('table-bg-gray')
:css{ ['text-align'] = 'center' }
:css{ ['text-align'] = 'center' }
:attr{ colspan = tostring(N) }
:attr{ colspan = tostring(N) }
:wikitext('['..url.." '''?''' (edit)]")
:wikitext(textstring)
:done()
:done()
end
end