Jump to content

Template:Infobox Canada electoral district: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
check for existence of image; attempt to fix extraneous spacing issue
revert my last change - the image check is broken, and the spacing issue is caused by something else - there are four extra <br />s in the rendered page; try placing if block at end of previous one
Line 8: Line 8:
| colspan="3" align="center" |
| colspan="3" align="center" |
{{ #if: {{{image|}}}
{{ #if: {{{image|}}}
| {{ #ifexist: {{{image}}}
| [[Image:{{{image}}}|200px]]
| [[Image:{{{image}}}|200px]]
| [[Image:Sin mapa.svg|200px]]
{{!-}}
! colspan="3" {{!}} <span style="color:red;">Warning: '''image''' does not exist; using default placeholder.</span>
| [[Image:Sin mapa.svg|200px]]
| [[Image:Sin mapa.svg|200px]]
}}
}}
Line 28: Line 24:
{{ #ifeq: {{{province}}} | Newfoundland and Labrador | 1 | 0}}
{{ #ifeq: {{{province}}} | Newfoundland and Labrador | 1 | 0}}
|
|
| {{!-}}
|
{{!-}}
! colspan="3" {{!}} <span style="color:red;">Warning: province or territory has been specified incorrectly; please define ''province'' with a valid value.</span>
! colspan="3" {{!}} <span style="color:red;">Warning: province or territory has been specified incorrectly; please define ''province'' with a valid value.</span>
}}
}}
| {{!-}}
|
{{!-}}
! colspan="3" {{!}} <span style="color:red;">Warning: no province or territory has been specified; please define ''province'' with a valid value.</span>
! colspan="3" {{!}} <span style="color:red;">Warning: no province or territory has been specified; please define ''province'' with a valid value.</span>
}}
}}
Line 37: Line 35:
{{ #ifeq: {{{fed-status| }}} | active | 1 | 0 }} + {{ #ifeq: {{{prov-status| }}} | active | 1 | 0 }} +
{{ #ifeq: {{{fed-status| }}} | active | 1 | 0 }} + {{ #ifeq: {{{prov-status| }}} | active | 1 | 0 }} +
{{ #ifeq: {{{fed-status| }}} | defunct | 1 | 0 }} + {{ #ifeq: {{{prov-status| }}} | defunct | 1 | 0 }}
{{ #ifeq: {{{fed-status| }}} | defunct | 1 | 0 }} + {{ #ifeq: {{{prov-status| }}} | defunct | 1 | 0 }}
|
|
| {{!-}}
|
{{!-}}
! colspan="3" {{!}} <span style="color:red;">Warning: neither a federal nor provincial electoral district has been specified in the template; please define one or both of ''prov-status'' and ''fed-status''.</span>
! colspan="3" {{!}} <span style="color:red;">Warning: neither a federal nor provincial electoral district has been specified in the template; please define one or both of ''prov-status'' and ''fed-status''.</span>
}} <!-- end fed-status #ifexpr declaration -->
}} <!-- end fed-status #ifexpr declaration --> {{ #if: {{{fed-rep-link| }}}
{{ #if: {{{fed-rep-link| }}}
|
|
{{ #ifexist: {{{fed-rep-link}}}
{{ #ifexist: {{{fed-rep-link}}}
|
|
| {{!-}}
|
{{!-}}
! colspan="3" {{!}} <span style="color:red;">Warning: invalid declaration of ''fed-rep-link''; that article does not exist</span>
! colspan="3" {{!}} <span style="color:red;">Warning: invalid declaration of ''fed-rep-link''; that article does not exist</span>
}}
}}
}} {{ #if: {{{prov-rep-link| }}}
}}
{{ #if: {{{prov-rep-link| }}}
|
|
{{ #ifexist: {{{prov-rep-link}}}
{{ #ifexist: {{{prov-rep-link}}}
|
|
| {{!-}}
|
{{!-}}
! colspan="3" {{!}} <span style="color:red;">Warning: invalid declaration of ''prov-rep-link''; that article does not exist</span>
! colspan="3" {{!}} <span style="color:red;">Warning: invalid declaration of ''prov-rep-link''; that article does not exist</span>
}}
}}
}} {{ #if: {{{fed-rep-party-link| }}}
}}
{{ #if: {{{fed-rep-party-link| }}}
|
|
{{ #ifexist: {{{fed-rep-party-link}}}
{{ #ifexist: {{{fed-rep-party-link}}}
|
|
| {{!-}}
|
{{!-}}
! colspan="3" {{!}} <span style="color:red;">Warning: invalid declaration of ''fed-rep-party-link''; that article does not exist</span>
! colspan="3" {{!}} <span style="color:red;">Warning: invalid declaration of ''fed-rep-party-link''; that article does not exist</span>
}}
}}
}} {{ #if: {{{prov-rep-party-link| }}}
}}
{{ #if: {{{prov-rep-party-link| }}}
|
|
{{ #ifexist: {{{prov-rep-party-link}}}
{{ #ifexist: {{{prov-rep-party-link}}}
|
|
| {{!-}}
|
{{!-}}
! colspan="3" {{!}} <span style="color:red;">Warning: invalid declaration of ''prov-rep-party-link''; that article does not exist</span>
! colspan="3" {{!}} <span style="color:red;">Warning: invalid declaration of ''prov-rep-party-link''; that article does not exist</span>
}}
}}
Line 76: Line 75:
|
|
{{ #ifeq: {{ #expr: ({{{demo-electors}}} >= {{{demo-pop}}}) }} | 1
{{ #ifeq: {{ #expr: ({{{demo-electors}}} >= {{{demo-pop}}}) }} | 1
| {{!-}}
|
{{!-}}
! colspan="3" {{!}} <span style="color:red;">Warning: the number of electors exceeds the indicated population; please verify ''demo-pop'' and ''demo-electors''.</span>
! colspan="3" {{!}} <span style="color:red;">Warning: the number of electors exceeds the indicated population; please verify ''demo-pop'' and ''demo-electors''.</span>
|
|
}}
}}
| {{!-}}
|
{{!-}}
! colspan="3" {{!}} <span style="color:red;">Warning: negative value entered for electors or population; please verify ''demo-pop'' and ''demo-electors''.</span>
! colspan="3" {{!}} <span style="color:red;">Warning: negative value entered for electors or population; please verify ''demo-pop'' and ''demo-electors''.</span>
}}
}}
{{ #ifexpr:
{{ #ifexpr:
{{ #ifeq: {{lc: {{{fed-status| }}} }} | active | 1 | 0 }} + {{ #ifeq: {{lc: {{{fed-status| }}} }} | defunct | 1 | 0 }}
{{ #ifeq: {{lc: {{{fed-status| }}} }} | active | 1 | 0 }} + {{ #ifeq: {{lc: {{{fed-status| }}} }} | defunct | 1 | 0 }}
| {{!-}}
|
{{!-}}
! colspan="3" {{!}} Federal electoral district
! colspan="3" {{!}} Federal electoral district
{{!-}}
{{!-}}

Revision as of 15:44, 13 November 2007

Template:Infobox Canada electoral district
[[Image:Flag of {{{province}}}.svg|40px]] {{{province}}} electoral district

Warning: no province or territory has been specified; please define province with a valid value.
Warning: neither a federal nor provincial electoral district has been specified in the template; please define one or both of prov-status and fed-status.
Warning: negative value entered for electors or population; please verify demo-pop and demo-electors.
Warning: fed-status must be set to active or defunct.
Warning: prov-status must be set to active or defunct.
Demographics
Population ({{{demo-census-date}}}) {{{demo-pop}}}
Electors ({{{election-date}}}) {{{demo-electors}}}
Area (km²) {{{demo-area}}}

Warning: demo-pop and demo-area must be defined, and must contain no spaces, commas, or periods

Census divisions {{{demo-cd}}}
Census subdivisions {{{demo-csd}}}