Open main menu
Home
Random
Donate
Recent changes
Special pages
Community portal
Preferences
About Stockhub
Disclaimers
Search
User menu
Talk
Contributions
Create account
Log in
Editing
Module:Succession table monarch
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
local getArgs = require('Module:Arguments').getArgs local TableTools = require('Module:TableTools') local messages = mw.loadData('Module:Succession table monarch/messages') local p = {} p.fromArgs = function(argElements) local mainTag = mw.html.create('table') :addClass('succession-table-monarch wikitable') :css('text-align', 'center') :tag('tr') :tag('th'):wikitext(messages.name):done() :tag('th'):wikitext(messages.lifespan):done() :tag('th'):wikitext(messages.reignStart):done() :tag('th'):wikitext(messages.reignEnd):done() :tag('th'):wikitext(messages.notes):done() :tag('th'):wikitext(messages.family):done() :tag('th'):wikitext(messages.image):done() :done() local ubl = require('Module:List').unbulleted for _,eachElement in ipairs(argElements) do if eachElement.name then local list_args = { list_style = 'text-align: center' } if eachElement.nickname then table.insert(list_args, tostring(mw.html.create('small'):tag('i'):wikitext(eachElement.nickname))) end if eachElement.native then table.insert(list_args, eachElement.native) end local rowTr = mainTag:tag('tr') rowTr:tag('td') :css('vertical-align: middle;') :wikitext(eachElement.name .. ubl(list_args)) :done() :tag('td') :wikitext(eachElement.life) :tag('td') :wikitext(eachElement.reignstart) :tag('td') :wikitext(eachElement.reignend) :tag('td') :wikitext(eachElement.notes) :tag('td') :wikitext(eachElement.family) local imageTd = rowTr :tag('td') if eachElement.image then imageTd:tag('span') :addClass('photo') :wikitext('[[File:' .. eachElement.image .. '|80px|alt=' .. (eachElement.alt or '') .. ']]') end end end return tostring(mainTag) end p.fromArray = function(args) local argElements = TableTools.numData(args, true) return p.fromArgs(argElements) end p.fromFrame = function(frame) local args = getArgs(frame) return p.fromArray(args) end return p
Summary:
Please note that all contributions to Stockhub may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Stockhub:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Templates used on this page:
Template:Lua
(
edit
)
Template:Module other
(
edit
)
Template:Module rating
(
edit
)
Template:Ombox
(
edit
)
Template:Tl
(
edit
)
Module:Arguments
(
edit
)
Module:Message box
(
edit
)
Module:Message box/configuration
(
edit
)
Module:Message box/ombox.css
(
edit
)
Module:Succession table monarch/doc
(
edit
)
Module:Yesno
(
edit
)