Module:Infobox Item: Difference between revisions

Jump to navigation Jump to search
Content added Content deleted
(That's for shop lines)
Tag: Manual revert
(Add support for 2 episodes on a single item)
Line 9: Line 9:
local config = {
local config = {
infobox_name = 'Item',
infobox_name = 'Item',
class = {Infobox.smw_param('episode')},
class = {Infobox.smw_param('episode'), Infobox.smw_param('additional_episode')},
}
}
Line 18: Line 18:
parse.premium,
parse.premium,
parse.episode,
parse.episode,
parse.additional_episode,
parse.value,
parse.value,
parse.examine,
parse.examine,
Line 41: Line 42:
{tag='th', content='Release', colspan="6"},
{tag='th', content='Release', colspan="6"},
{tag='td', content=Infobox.param('release'), colspan="14"},
{tag='td', content=Infobox.param('release'), colspan="14"},
}
local additional_episode = infobox:is_param_defined(Infobox.param('additional_episode')) > 0
if additional_episode then
infobox:add_row{
{tag='th', content='[[Episodes]]', colspan="6", rowspan="2"},
{tag='td', content=Infobox.param('episode'), colspan="14"},
}
}
:add_row{
:add_row{
{tag='td', content=Infobox.param('additional_episode'), colspan="14"},
}
else
infobox:add_row{
{tag='th', content='[[Episode]]', colspan="6"},
{tag='th', content='[[Episode]]', colspan="6"},
{tag='td', content=Infobox.param('episode'), colspan="14"},
{tag='td', content=Infobox.param('episode'), colspan="14"},
}
}
end
:add_row{
infobox:add_row{
{tag='th', content='[[Premium Pass|Premium]]', colspan="6"},
{tag='th', content='[[Premium Pass|Premium]]', colspan="6"},
{tag='td', content=Infobox.param('premium'), colspan="14"},
{tag='td', content=Infobox.param('premium'), colspan="14"},