Difference between revisions of "Template:TrainStation"

From All About Ayrshire
Jump to: navigation, search
 
(19 intermediate revisions by the same user not shown)
Line 40: Line 40:
 
},
 
},
 
"open": {
 
"open": {
"description": "When the station opened"
+
"description": "When the station opened",
 +
"type": "number"
 
},
 
},
 
"closed": {
 
"closed": {
"description": "When the station closed"
+
"description": "When the station closed",
 +
"type": "number"
 
},
 
},
 
"status": {
 
"status": {
 
"description": "What is the status of the station\n\nOperational\n\nClosed\n\nDemolished\n\nRuin",
 
"description": "What is the status of the station\n\nOperational\n\nClosed\n\nDemolished\n\nRuin",
"required": true
+
"required": true,
 +
"type": "string"
 +
},
 +
"guage": {
 +
"description": "What is the guage of the rail track",
 +
"type": "string"
 +
},
 +
"dates": {
 +
"description": "The dates of operation",
 +
"type": "string"
 +
},
 +
"image": {
 +
"description": "the image you want to show\n\nFile:example.jpg",
 +
"type": "string"
 +
},
 +
"successor": {
 +
"description": "The names of company",
 +
"type": "string"
 +
},
 +
"predecessor": {
 +
"description": "The names of companies",
 +
"type": "string"
 +
},
 +
"miles": {
 +
"description": "The distance of track",
 +
"type": "number"
 
}
 
}
 
}
 
}
Line 53: Line 80:
 
</templatedata>
 
</templatedata>
 
<b>Example:</b><br />
 
<b>Example:</b><br />
The code for the map is added after the crossing type.
+
The code for the map is added after the status.
 
<pre>
 
<pre>
{{LevelCrossing
+
{{TrainStation
  | name              = Ardrossan Level Crossing
+
  | name              = Caledonian Station
 
  | type              = train
 
  | type              = train
 +
| image              =
 
  | country            = Scotland
 
  | country            = Scotland
 
  | county            = North Ayrshire
 
  | county            = North Ayrshire
 
  | location          = Ardrossan
 
  | location          = Ardrossan
  | roads              = Princes Street
+
  | roads              = Montgomerie Street
  | open              =
+
  | operator          = Lanarkshire and Ayrshire Railway<br />Caledonian Railway<br />London, Midland and Scottish Railway
  | closed            =
+
| predessor          =
  | status            =
+
| successor          =
 +
| opened            = 3rd Sepetmber 1888
 +
  | closed            = 4th July 1932
 +
  | status            = Demolished
 +
| guage              =
 +
| miles              =
 
{{#display_map: 55.63950883290983,-4.812919646501541|mappingservice=leaflet|zoom=15}}
 
{{#display_map: 55.63950883290983,-4.812919646501541|mappingservice=leaflet|zoom=15}}
 
}}
 
}}
Line 78: Line 111:
  
 
Start the table
 
Start the table
 +
 
--><table style="margin:6px;clear:right;" class="toc colour" align="right" width="267"><!--
 
--><table style="margin:6px;clear:right;" class="toc colour" align="right" width="267"><!--
  
Number--><tr><td style="background:{{Get bg colour|{{{type|non primary}}} }}; border:1px solid #000000; color:{{Get road text colour|{{{type|non primary}}} }}; font-size:14pt; padding:4px; font-weight: bold;" align=center colspan="2">'''{{#if: {{{name|}}} | {{{name|}}} | {{PAGENAME}} }}'''<!--
+
Name and colour in heading row
 +
--><tr><td style="background:{{Get bg colour|{{{type|train}}} }}; border:1px solid #AFA3BF; color:{{Get text colour|{{{type|non primary}}} }}; font-size:14pt; padding:4px; font-weight: bold;" align=center colspan="2">'''{{#if: {{{name|}}} | {{{name}}} | {{PAGENAME}} }}'''<!--
 +
-->{{#if: {{{welsh|}}} | <br/><span style="font-size:12pt;color:{{Get welsh colour|{{{type|train}}}}}">''{{{welsh}}}''</span> }}<!--
 +
-->{{#if: {{{irish|}}} | <br/><span style="font-size:12pt;color:{{Get irish colour|{{{type|train}}}}}">''{{{irish}}}''</span> }}<!--
 +
-->{{#if: {{{gaelic|}}} | <br/><span style="font-size:12pt;color:{{Get gaelic colour|{{{type|train}}}}}">''{{{gaelic}}}''</span> }}<!--
 +
--></td></tr><tr><td><!--
  
 
Check to see if type is valid
 
Check to see if type is valid
Line 86: Line 125:
  
 
--></td></tr><!--
 
--></td></tr><!--
 +
 +
--><td><td align=center>{{{image}}}</td><!--
  
 
Location
 
Location
Line 110: Line 151:
 
-->{{#if: {{{operator|}}} |<tr><td style="background:#ffcc00; border:1px solid #2E0854" colspan="4" align="center">'''Operator'''</td></tr><tr><td colspan="2" align="center">
 
-->{{#if: {{{operator|}}} |<tr><td style="background:#ffcc00; border:1px solid #2E0854" colspan="4" align="center">'''Operator'''</td></tr><tr><td colspan="2" align="center">
 
{{{operator}}}  
 
{{{operator}}}  
 +
</td></tr>}}<!--
 +
 +
Predecessor
 +
-->{{#if: {{{predecessor|}}} |<tr><td style="background:#ffcc00; border:1px solid #2E0854" colspan="4" align="center">'''Predecessor'''</td></tr><tr><td colspan="2" align="center">
 +
{{{predecessor}}}
 +
</td></tr>}}<!--
 +
 +
Successor
 +
-->{{#if: {{{successor|}}} |<tr><td style="background:#ffcc00; border:1px solid #2E0854" colspan="4" align="center">'''Successor'''</td></tr><tr><td colspan="2" align="center">
 +
{{{successor}}}
 
</td></tr>}}<!--
 
</td></tr>}}<!--
  
Line 126: Line 177:
 
{{{status}}}  
 
{{{status}}}  
 
</td></tr>}}<!--
 
</td></tr>}}<!--
 +
 +
Dates
 +
-->{{#if: {{{dates|}}} |<tr><td style="background:#ffcc00; border:1px solid #2E0854" colspan="4" align="center">'''Dates of Operation'''</td></tr><tr><td colspan="2" align="center">
 +
{{{dates}}}
 +
</td></tr>}}<!--
 +
 +
Guage
 +
-->{{#if: {{{guage|}}} |<tr><td style="background:#ffcc00; border:1px solid #2E0854" colspan="4" align="center">'''Track Guage'''</td></tr><tr><td colspan="2" align="center">
 +
{{{guage}}}
 +
</td></tr>}}<!--
 +
 +
Length
 +
-->{{#if: {{{miles|}}} |<tr><td style="background:#ffcc00; border:1px solid #2E0854" colspan="4" align="center">'''Length'''</td></tr><tr><td colspan="2" align="center">{{#expr:{{{miles}}} round 1}} miles ({{#expr: ({{{miles}}} * 1.6093) round 1 }} km)
 +
</td></tr>}}<!--
 +
 +
  
  
Line 136: Line 203:
 
--><includeonly><!--
 
--><includeonly><!--
  
Categorise in the main "All Crossings" category.  They will be sorted by the name given in then "name" parameter, unless that is not used, in which case it uses the page name.
+
Categorise in the main "Train Stations" category.  They will be sorted by the name given in then "name" parameter, unless that is not used, in which case it uses the page name.
 
-->{{DEFAULTSORT:{{{name|{{PAGENAME}}}}}}}
 
-->{{DEFAULTSORT:{{{name|{{PAGENAME}}}}}}}
[[Category:All Crossings]]
+
[[Category:Train Stations]]
  
<!-- If type is set to "train", add to "Level Crossing" category -->
+
</includeonly>
{{#ifeq: {{{type|}}}| train | [[Category:Level Crossings]]}}</includeonly>
 

Latest revision as of 09:46, 2 November 2015

<templatedata> { "description": "", "params": { "name": { "description": "The name of the crossing", "type": "string", "required": true }, "type": { "description": "This should be set as:\ntrain", "type": "string", "required": true }, "location": { "description": "The location it is located, this is the local town, village or suburb of city", "type": "string", "required": true }, "country": { "description": "The Country it is located in", "type": "string", "required": true }, "county": { "description": "The name of the County", "type": "string", "required": true }, "roads": { "description": "The name of the road that serves the station", "type": "string", "required": true }, "operator": { "description": "The comany that operated the railway", "type": "string", "required": true }, "open": { "description": "When the station opened", "type": "number" }, "closed": { "description": "When the station closed", "type": "number" }, "status": { "description": "What is the status of the station\n\nOperational\n\nClosed\n\nDemolished\n\nRuin", "required": true, "type": "string" }, "guage": { "description": "What is the guage of the rail track", "type": "string" }, "dates": { "description": "The dates of operation", "type": "string" }, "image": { "description": "the image you want to show\n\nFile:example.jpg", "type": "string" }, "successor": { "description": "The names of company", "type": "string" }, "predecessor": { "description": "The names of companies", "type": "string" }, "miles": { "description": "The distance of track", "type": "number" } } } </templatedata> Example:
The code for the map is added after the status.

{{TrainStation 
 | name               = Caledonian Station
 | type               = train
 | image              =
 | country            = Scotland
 | county             = North Ayrshire
 | location           = Ardrossan
 | roads              = Montgomerie Street
 | operator           = Lanarkshire and Ayrshire Railway<br />Caledonian Railway<br />London, Midland and Scottish Railway
 | predessor          =
 | successor          =
 | opened             = 3rd Sepetmber 1888
 | closed             = 4th July 1932
 | status             = Demolished
 | guage              =
 | miles              =
{{#display_map: 55.63950883290983,-4.812919646501541|mappingservice=leaflet|zoom=15}}
}}


TrainStation
{{{image}}}