Difference between revisions of "Template:Infobox airport"

From Wikishire
Jump to: navigation, search
Line 1: Line 1:
{| class="infobox vcard" style="width:22em; text-align:left; font-size: 88%; line-height: 1.5em" style="float: right; font-size: 85%; border: 1px solid lightgrey; padding: 4px; margin-left: 1em;" {{#vardefine:type|airport}}{{#if: {{{county| }}}|{{#vardefine:shire|{{namefix|{{{county}}}}}}}}}{{#if: {{{bailiwick| }}}|{{#vardefine:shire|{{namefix|{{{bailiwick}}}}}}}}}{{#if: {{{territory| }}}|{{#vardefine:shire|{{namefix|{{{territory}}}}}}}}}
+
{| class="infobox vcard" style="width:22em; text-align:left; font-size: 88%; line-height: 1.5em" style="float: right; font-size: 85%; border: 1px solid lightgrey; padding: 4px; margin-left: 1em;" {{#vardefine:type|airport}}{{#if: {{{county| }}}|{{#vardefine:shire|{{namefix|{{{county}}}}}}}}}{{#if: {{{bailiwick| }}}|{{#vardefine:shire|{{namefix|{{{bailiwick}}}}}}}}}{{#if: {{{territory| }}}|{{#vardefine:shire|{{namefix|{{{territory}}}}}}}}}{{#vardefine:typeswitch|{{#switch:{{lc:{{{type}}}}}
 +
|royal air force
 +
|royal air force base
 +
|royal air force station
 +
|royal airforce
 +
|royal airforce base
 +
|royal airforce station
 +
|raf
 +
|raf station
 +
|raf base=raf
 +
|airport=airport
 +
|international airport
 +
|international=int
 +
|aerodrome
 +
|local field
 +
|local airfield
 +
|airfield=airfield
 +
|airport
 +
}}
 
!colspan="2"|{{#if:{{{picture|}}}|[[File:{{{picture}}}|center|260px|{{{picture caption}}}]]}}
 
!colspan="2"|{{#if:{{{picture|}}}|[[File:{{{picture}}}|center|260px|{{{picture caption}}}]]}}
 
|-
 
|-
Line 6: Line 24:
 
|-
 
|-
 
! style="background: #D0F0C0;" | {{#if:{{{county|}}}|County}}{{#if:{{{territory|}}}|Territory}}
 
! style="background: #D0F0C0;" | {{#if:{{{county|}}}|County}}{{#if:{{{territory|}}}|Territory}}
| {{shead|{{#var:shire}}}}
+
|{{shead|{{#var:shire}}}}
 +
|-{{#ifeq:{{#var:typeswitch}}|raf
 +
! colspan="2" |[[File:RAF-Badge.svg|center|120px|Badge of the Royal Air Force]] }}
 
|-{{#if:{{{owner|}}}
 
|-{{#if:{{{owner|}}}
 
! style="background: #D0F0C0;" | Owner
 
! style="background: #D0F0C0;" | Owner
| {{owner}} }}
+
|{{owner}} }}
 
|-{{#if:{{{ownership|}}}
 
|-{{#if:{{{ownership|}}}
 
! style="background: #D0F0C0;" | Owner
 
! style="background: #D0F0C0;" | Owner
| {{ownership}} }}
+
|{{ownership}} }}
 
|-{{#if:{{{operator|}}}
 
|-{{#if:{{{operator|}}}
 
! style="background: #D0F0C0;" | Operator
 
! style="background: #D0F0C0;" | Operator
| {{operator}} }}
+
|{{operator}} }}
 
! style="background: #D0F0C0;" | Location
 
! style="background: #D0F0C0;" | Location
| {{#if:{{{location|}}}|{{{location}}}<br>}}{{#if:{{{os grid ref|}}}|{{getmapecho|{{{os grid ref}}}}}|{{#if:{{{latitude|}}}|{{wmap|{{{latitude}}}|{{{longitude}}}|zoom=14}}}}}}
+
|{{#if:{{{location|}}}|{{{location}}}<br>}}{{#if:{{{os grid ref|}}}|{{getmapecho|{{{os grid ref}}}}}|{{#if:{{{latitude|}}}|{{wmap|{{{latitude}}}|{{{longitude}}}|zoom=14}}}}}}
 
|-{{#if:{{{website|}}}|
 
|-{{#if:{{{website|}}}|
 
|Website || {{{website}}}}}
 
|Website || {{{website}}}}}
|}<includeonly>{{namecat2|Airports|{{#var:shire}} }}</includeonly><noinclude>[[Category:Infoboxes|Airport]]
+
|}<includeonly>{{#switch:{{#var:typeswitch}}
 +
|airport={{namecat2|Airports|{{#var:shire}}}}
 +
|int=[[Category:International airports]] {{namecat2|Airports|{{#var:shire}}}}
 +
|raf={{namecat2|RAF stations|{{#var:shire}}}}
 +
|airfield={{namecat2|Airfields|{{#var:shire}}}}
 +
|{{namecat2|Airports|{{#var:shire}}}}
 +
}}</includeonly><noinclude>[[Category:Infoboxes|Airport]]

Revision as of 17:27, 27 July 2018

Code
[[]]
Location