User:Thunderstorm008/sandbox/template:infobox uk legislation

{{Infobox
 * bodyclass  = vevent {{#if:{{{collapsed|}}}|collapsible collapsed}}


 * title    = {{#if:{{{collapsed|}}}||{{{short_title| {{PAGENAMEBASE}} }}}}}
 * titleclass = summary


 * above    = {{#if:{{{collapsed|}}}| {{{short_title| {{PAGENAMEBASE}} }}} |}}
 * abovestyle = font-size:100%
 * aboveclass = summary


 * subheader  = {{#switch:{{lc:{{{type}}}}}|si|statutory instrument=Statutory Instrument|act|act of parliament=Act of Parliament}}
 * subheaderstyle = font-weight: bold;

{{#switch:{{{parliament|}}} | Scotland = {{error|message=Error: "Scotland" is ambiguous. Try "Parliament of Scotland" for before 1707 or "Scottish Parliament" for after 1998 }} | Stormont = {{error|message=Error: "{{{parliament}}}" is ambiguous. Try "Parliament of Northern Ireland" for 1921–72 or "Northern Ireland Assembly" for after 1998 }} {{#if:{{{year|}}} |{{#ifexpr:{{{year|1801}}} < 1998 | {{error|message=Error: Specified year too early for the Welsh Assembly }} }}   |{{error|message=Error: Year must be specified for the Scottish Parliament }} }} | Northern Ireland Assembly      = {{#if:{{{year|}}} |{{#ifexpr:{{{year|1801}}} < 1998 | {{error|message=Error: Specified year too early for the Northern Ireland Assembly }} }}   |{{error|message=Error: Year must be specified for the Northern Ireland Assembly }} }} | Welsh Assembly | Wales | Cymru | Senedd | Cynulliad | National Assembly for Wales   = {{#if:{{{year|}}} |{{#ifexpr:{{{year|1801}}} < 1998 | {{error|message=Error: Specified year too early for the Welsh Assembly }} }}    {{#ifexpr:{{{year|1801}}} >= 1998 and {{{year|1801}}} < 2008 |  }} {{#ifexpr:{{{year|1801}}} >= 2008 | }} |{{error|message=Error: Year must be specified for the Welsh Assembly }} }} | Parliament of Northern Ireland = {{#if:{{{year|}}} |{{#ifexpr:{{{year|2000}}} >= 1921 and {{{year|2000}}} <= 1972 |      | {{error|message=Error: Invalid year "{{{year}}}" for 1921–72 Parliament of Northern Ireland; the post-1998 body is Northern Ireland Assembly. }} }}   | {{error|message=Error: Year must be specified for Northern Ireland }} }} | Parliament of Scotland = {{#if:{{{year}}} |{{#switch:{{{year}}} | 1558 =      | 1559 =       | 1560         | 1561         | 1562         | 1563         | 1564 =       | #default = {{#ifexpr:{{{year|1600}}} < 1603 | }} {{#ifexpr:{{{year|1600}}} >= 1603 and {{{year|1600}}} < 1649 | }} {{#ifexpr:{{{year|1600}}} >= 1649 and {{{year|1600}}} < 1660 | }} {{#ifexpr:{{{year|1600}}} >= 1660 and {{{year|1600}}} < 1689 | }} {{#ifexpr:{{{year|1600}}} >= 1689 and {{{year|1600}}} < 1694 | }} {{#ifexpr:{{{year|1600}}} >= 1694 and {{{year|1600}}} < 1702 | }} {{#ifexpr:{{{year|1600}}} >= 1702 and {{{year|1600}}} <=1707 | }} {{#ifexpr:{{{year|1801}}} > 1707 | {{error|message=Error: Specified year too late for pre-Union England }} }}     }}    | {{error|message=Error: Year must be specified for pre-Union Scotland}} }} | Parliament of Ireland | Ireland = {{#if:{{{year|}}} |{{#ifexpr:{{{year|1800}}} < 1542 |       |       }}     |{{error|message=Error: Year must be specified for pre-Union Ireland }} }} | Parliament of England | England = {{#if:{{{year|}}} |{{#ifexpr:{{{year|1801}}} < 1154 | }} {{#ifexpr:{{{year|1801}}} >= 1154 and {{{year|1801}}} < 1189 | }} {{#ifexpr:{{{year|1801}}} >= 1189 and {{{year|1801}}} < 1198 | }} {{#ifexpr:{{{year|1801}}} >= 1198 and {{{year|1801}}} < 1340 | }} {{#ifexpr:{{{year|1801}}} >= 1340 and {{{year|1801}}} < 1360 | }} {{#ifexpr:{{{year|1801}}} >= 1360 and {{{year|1801}}} < 1369 | }} {{#ifexpr:{{{year|1801}}} >= 1369 and {{{year|1801}}} < 1395 | }} {{#ifexpr:{{{year|1801}}} >= 1395 and {{{year|1801}}} < 1399 | }} {{#ifexpr:{{{year|1801}}} >= 1399 and {{{year|1801}}} < 1406 | }} {{#ifexpr:{{{year|1801}}} >= 1406 and {{{year|1801}}} < 1422 | }} {{#ifexpr:{{{year|1801}}} >= 1422 and {{{year|1801}}} < 1461 | }} {{#ifexpr:{{{year|1801}}} >= 1461 and {{{year|1801}}} < 1470 | }} {{#ifexpr:{{{year|1801}}} >= 1470 and {{{year|1801}}} < 1471 | }} {{#ifexpr:{{{year|1801}}} >= 1471 and {{{year|1801}}} < 1483 | }} {{#ifexpr:{{{year|1801}}} >= 1483 and {{{year|1801}}} < 1485 | }} {{#ifexpr:{{{year|1801}}} >= 1485 and {{{year|1801}}} < 1509 | }} {{#ifexpr:{{{year|1801}}} >= 1509 and {{{year|1801}}} < 1547 | }} {{#ifexpr:{{{year|1801}}} >= 1547 and {{{year|1801}}} < 1554 | }} {{#ifexpr:{{{year|1801}}} >= 1554 and {{{year|1801}}} < 1558 | }} {{#ifexpr:{{{year|1801}}} >= 1558 and {{{year|1801}}} < 1603 | }} {{#ifexpr:{{{year|1801}}} >= 1603 and {{{year|1801}}} < 1649 | }} {{#ifexpr:{{{year|1801}}} >= 1649 and {{{year|1801}}} < 1660 | }} {{#ifexpr:{{{year|1801}}} >= 1660 and {{{year|1801}}} < 1689 | }} {{#ifexpr:{{{year|1801}}} >= 1689 and {{{year|1801}}} < 1694 | }} {{#ifexpr:{{{year|1801}}} >= 1694 and {{{year|1801}}} < 1702 | }} {{#ifexpr:{{{year|1801}}} >= 1702 and {{{year|1801}}} <=1707 | }} {{#ifexpr:{{{year|1801}}} > 1707 | {{error|message=Error: Specified year too late for pre-Union England}} }}    |{{error|message=Error: Year must be specified for pre-Union England}} }} | Parliament of Great Britain | Great Britain = {{#if:{{{year|}}} |{{#ifexpr:{{{year|1801}}} < 1707 | {{error|message=Error: Specified year too early for pre-Union Great Britain}} }}     {{#ifexpr:{{{year|1801}}} >= 1707 and {{{year|1801}}} < 1714 | }} {{#ifexpr:{{{year|1801}}} >= 1714 and {{{year|1801}}} <=1800 | }} {{#ifexpr:{{{year|1801}}} > 1800 | {{error|message=Error: Specified year too late for pre-Union Great Britain}} }}    |{{error|message=Error: Year must be specified for pre-Union Great Britain}} }} | #default = {{#if:{{{year|}}} |{{#ifexpr:{{{year|2000}}} < 1801 | {{error|message=Error: Specified year too early for United Kingdom}} }}     {{#ifexpr:{{{year|2000}}} >= 1801 and {{{year|2000}}} < 1816 |  }} {{#ifexpr:{{{year|2000}}} >= 1816 and {{{year|2000}}} < 1837 | }} {{#ifexpr:{{{year|2000}}} >= 1837 and {{{year|2000}}} < 1953 | }} {{#ifexpr:{{{year|2000}}} >= 1953 | }} |{{error|message=Error: Year must be specified for United Kingdom}} }} }}
 * headerstyle = border-top: 1px solid #aaa;
 * image     =
 * Northern Ireland | NI | NI Assembly | NI Parliament | Northern Ireland Parliament | Northern Irish Parliament | Northern Irish Assembly | Stormont Parliament | Stormont Assembly
 * Scottish Parliament =
 * [[file:Royal Coat of Arms of the United Kingdom (Government in Scotland).svg|140px|link=|alt=]]

{{#switch:{{{parliament|}}} | Scottish Parliament             = Scottish Parliament | Northern Ireland Assembly       = Northern Ireland Assembly | Welsh Assembly | Wales | Cymru | Senedd | Cynulliad | National Assembly for Wales     = National Assembly for Wales | Parliament of Northern Ireland  = Parliament of Northern Ireland | Parliament of Scotland          = Parliament of Scotland | Parliament of Ireland | Ireland = Parliament of Ireland | Parliament of England | England = Parliament of England | GB | Great Britain | Parliament of Great Britain     = Parliament of Great Britain | UK | the UK | United Kingdom | the United Kingdom | Parliament of United Kingdom | UK Parliament | Parliament of the United Kingdom = Parliament of the United Kingdom | Scotland | Northern Ireland | NI | NI Assembly | NI Parliament | Northern Ireland Parliament | Northern Irish Parliament | Northern Irish Assembly | Stormont Parliament | Stormont Assembly | Stormont = | #default = {{Error|Error: "{{{parliament}}}" unrecognised}} }}
 * caption  =
 * label2  = Long title
 * data2  = {{{long_title|}}}
 * class2  = description
 * label3  = Citation
 * data3  = {{{citation|{{{statute_book_chapter|}}}}}}
 * label4  = Introduced by
 * data4  = {{#if:{{{introduced_by|}}}|{{{introduced_by|}}}}}{{#if:{{{introduced_by1|}}}|{{{introduced_by1|}}}{{#if:{{{introduced_by_pos1}}}| {{small|{{{introduced_by_pos1|}}}}}}}{{#if:{{{introduced_by2}}| {{{introduced_by2|}}}{{#if:{{{introduced_by_pos2}}}| {{small|{{{introduced_by_pos2|}}}}}}}}}}}
 * class4  = organiser
 * label5  = Territorial extent
 * data5  = {{{territorial_extent|}}}


 * header6  = {{#if:{{{si_made_date|}}}{{{si_laid_date|}}}{{{royal_assent|}}}{{{commencement|}}}{{{repeal_date|}}}|Dates}}
 * label7  = Made
 * data7  = {{{si_made_date|}}}
 * label8  = Laid before Parliament
 * data8  = {{{si_laid_date|}}}
 * label9  = Royal assent
 * data9  = {{{royal_assent|}}}
 * label10 = Commencement
 * data10 = {{{commencement|}}}
 * class10 = dtstart
 * label11 = Repealed
 * data11 = {{{repeal_date|}}}
 * class11 = dtend


 * header12 = {{#if:{{{amends|}}}{{{replaces|}}}{{{primary_legislation|}}}{{{eu_directives|}}}{{{amendments|}}}{{{repealing_legislation|}}}{{{related_legislation|}}}|Other legislation}}
 * label13 = Amends
 * data13 = {{{amends|}}}
 * label14 = Replaces
 * data14 = {{{replaces|}}}
 * label15 = Made under
 * data15 = {{{primary_legislation|}}}
 * label16 = Transposes
 * data16 = {{{eu_directives|}}}
 * label17 = Amended by
 * data17 = {{{amendments|}}}
 * label18 = Repealed by
 * data18 = {{{repealing_legislation|}}}
 * label19 = Relates to
 * data19 = {{{related_legislation|}}}


 * header20 = {{#if:{{{status|}}}|Status: {{#switch:{{lc:{{{status}}}}}|current=Current legislation|amended=Amended|repealed=Repealed|not_yet_in_force=Not yet in force|not_fully_in_force=Not fully in force|not_passed=Not passed|spent=Spent|#default=Unknown}} }}


 * header21 = {{#if:{{{status_EW}}}{{{status_Scot}}}{{{status_IE}}}{{{status_NI}}}|Status}}
 * label22 = England and Wales
 * data22 = {{{status_EW|}}}
 * label23 = Scotland
 * data23 = {{{status_Scot|}}}
 * label24 = Republic of Ireland
 * data24 = {{{status_IE|}}}
 * label25 = Northern Ireland
 * data25 = {{{status_NI|}}}


 * header27 = Passage through Parliament
 * data28   = House of Commons
 * label29 = 1 First Reading
 * data29  = {{{introduced_date}}}
 * label30  = 2 Second Reading
 * data30   = {{{reading2_date}}}
 * label31  = C Committee Stage
 * data31   = {{{committee_date}}}{{#if:{{{committee}}}| {{{committee|}}}}}
 * label32  = R Report Stage
 * data32   = {{{report_date}}}
 * label33  = 3 Third Reading
 * data33   = {{{reading3_date}}}
 * data34   = House of Lords
 * label35  = 1 First Reading
 * data35   = {{{introduced_date}}}
 * label36  = 2 Second Reading
 * data36   = {{{reading2_date}}}
 * label37  = C Committee Stage
 * data37   = {{{committee_date}}}
 * label38  = R Report Stage
 * data38   = {{{report_date}}}
 * label39  = 3 Third Reading
 * data39   = {{{reading3_date}}}


 * header40 = {{#if:{{{legislation_history|}}}|[{{{legislation_history|}}} History of passage through Parliament]}}

| {{UK-LEG|title={{#if:{{{UK-LEG_title|}}}|{{{UK-LEG_title}}}|{{PAGENAME}}}}}} | {{#if:{{{UK-LEG_title|}}}|{{UK-LEG|title={{{UK-LEG_title}}}}}}} }} }}
 * header41 = {{#if:{{{theyworkforyou|}}}||}}}}} Records of Parliamentary debate relating to the statute from Hansard, at TheyWorkForYou}}
 * header42 = {{#if:{{{millbankhansard|}}}||}}}}} Records of Parliamentary debate relating to the statute from hansard.millbanksystems.com}}
 * header43 = {{#if:{{{original_text|}}}|[{{{original_text|}}} Text of statute as originally enacted]}}
 * header44 = {{#ifeq:{{{use_new_UK-LEG}}}|yes
 * class44 = url
 * header45 = {{#if:{{{revised_text|}}}|[{{{revised_text|}}} Revised text of statute as amended]}}