Template:TMtr and Template:TMtr/sandbox: Difference between pages
Appearance
(Difference between pages)
Content deleted Content added
remove the only use of {{Trim}} with a "x" parameter on the whole wiki |
remove the only use of {{Trim}} with a "x" parameter on the whole wiki |
||
Line 1: | Line 1: | ||
<includeonly> |
<includeonly> |
||
<tr class= "vcard" {{#ifeq: {{{color}}} | dark |style="background-color: #CCCCFF;|style="background-color: #EEEEFF;}} |
<tr class= "vcard" {{#ifeq: {{{color}}} | dark |style="background-color: #CCCCFF;"|style="background-color: #EEEEFF;"}} > |
||
<td> <span class="fn org |
<td> '''<span class="fn org">{{{1|}}}</span>''' </td> |
||
<td> {{{7|}}} </td> |
<td> {{{7|}}} </td> |
||
<td> {{{2|}}}{{#if:{{{6|}}}{{{5|}}}{{{force|}}}||{{#if:{{{3|}}}{{{oscoor|}}}|{{#if:{{{2|}}}|, |}} }} }} {{#if:{{{oscoor|}}}|{{OS coord|{{{oscoor|}}}|{{{oscoor|}}} }}|{{{3|}}} }}{{#if:{{{6|}}}{{{5|}}}{{{force|}}}||{{{4|}}} }} |
<td> {{{2|}}}{{#if:{{{6|}}}{{{5|}}}{{{force|}}}||{{#if:{{{3|}}}{{{oscoor|}}}|{{#if:{{{2|}}}|, |}} }} }} {{#if:{{{oscoor|}}}|{{OS coord|{{{oscoor|}}}|{{{oscoor|}}} }}|{{{3|}}} }}{{#if:{{{6|}}}{{{5|}}}{{{force|}}}||{{{4|}}} }} |
||
</td> |
</td> |
||
<td |
<td align=right > {{{8|}}} </td><!-- year built --> |
||
<td |
<td align=right > {{{10|}}} </td><!-- year demolished or "standing" --> |
||
<td |
<td align=right > {{formatnum:<!-- calculate years in service & format |
||
-->{{#iferror:{{#time:Y|{{{8}}}}}<!-- check whether {{{8}}} (year built) is a valid year |
-->{{#iferror:{{#time:Y|{{{8}}}}}<!-- check whether {{{8}}} (year built) is a valid year |
||
-->|<!-- {{{8}}} is invalid → no output |
-->|<!-- {{{8}}} is invalid → no output |
||
-->|{{#if:{{{9|}}}<!-- {{{8}}} is valid |
-->|{{#if:{{{9|}}}<!-- {{{8}}} is valid → check whether {{{9}}} (year decommissioned) is specified |
||
-->|{{# |
-->|{{#ifexpr:{{{9}}}>{{{8}}}<!--- {{{9}}} is specified → check whether year {{{8}}} is before year {{{9}}} |
||
-->|{{# |
--->|{{#iferror:{{#expr:{{{9}}}-{{{8}}}}}}}<!--- year {{{8}}} is before year {{{9}}} → calculate number of years from {{{8}}} to {{{9}}} |
||
-->}}<!-- End check whether year {{{8}}} is before year {{{9}}} |
|||
-->|{{#ifeq:{{lc:{{{10|standing}}}}}|standing<!--- {{{9}}} is not specified → check whether {{{10}}} is "standing" |
|||
--->|{{#iferror:{{#expr:{{CURRENTYEAR}}-{{{8}}}}}}}<!--- {{{10}}} is "standing" → calculate number of years from {{{8}}} to this year |
|||
--->|{{#iferror:{{#time:Y|{{{10}}}}}<!-- {{{10}}} is not "standing" → check whether {{{10}}} (year demolished) is a valid year |
|||
-->|<!--- {{{10}}} is invalid → no output |
|||
-->|{{#iferror:{{#expr:{{{10}}}-{{{8}}}}}}}<!--- {{{10}}} is valid → calculate number of years from {{{8}}} to {{{10}}} |
|||
-->}}<!-- End check whether {{{10}}} is |
-->}}<!--- End check whether {{{10}}} is a valid year |
||
-->}}<!--- End check whether {{{10}}} is "standing" |
|||
-->}}<!--- End check whether {{{9}}} is specified |
|||
-->}}<!-- End check whether {{{8}}} is a valid year |
|||
-->}}<!-- End calculate years in service & format |
|||
-->}}<!-- End calculate years in service & format |
|||
--></td> |
--></td> |
||
</tr><!-- End of the first row--> |
</tr><!-- End of the first row--> |
||
{{#if:{{{6|}}}{{{5|}}}{{{force|}}}|<tr {{#ifeq: {{{color}}} | dark |style="background-color: #CCCCFF;|style="background-color: #EEEEFF;}} |
{{#if:{{{6|}}}{{{5|}}}{{{force|}}}|<tr {{#ifeq: {{{color}}} | dark |style="background-color: #CCCCFF;"|style="background-color: #EEEEFF;"}}> |
||
<td>{{#if:{{{6|}}}|[[{{Trim|{{{6}}}}}|frameless|upright=0.8]]|}}</td> |
<td>{{#if:{{{6|}}}|[[{{Trim|{{{6}}}}}|frameless|upright=0.8]]|}}</td> |
||
<td colspan="5" style="text-align:left;vertical-align:top;">{{#if: {{{lbe|}}}|{{lbe|{{{lbe}}}|grade={{{grade|}}}|location={{{location|}}}|}}<!-- End if lbe-->|<!--void--> }}'''Notes:''' {{{5|}}}{{{4|}}}</td> |
<td colspan="5" style="text-align:left;vertical-align:top;"> {{#if: {{{lbe|}}}|{{lbe|{{{lbe}}}|grade={{{grade|}}}|location={{{location|}}}|display=hatnote|}}<!-- End if lbe-->|<!--void--> }}'''Notes:''' {{{5|}}}{{{4|}}} </td> |
||
</tr>}} |
</tr>}} |
||
</includeonly> |
</includeonly> |