Module:ProfessionList: Difference between revisions
p.unknown_value_edit_cell supports a list of pages, all of which will be linked
(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:
-- use within :node()
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 link = '['..url.." '''?''' (edit)]<br>"
textstring = textstring .. link
end
return mw.html.create('td')
:addClass('table-bg-gray')
:css{ ['text-align'] = 'center' }
:attr{ colspan = tostring(N) }
:wikitext(
:done()
end
|