[go: nahoru, domu]

Jump to content

Template:TMtr and Template:TMtr/sandbox: Difference between pages

(Difference between pages)
Page 1
Page 2
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;}}{{#if:{{{6|}}}{{{5|}}}{{{force|}}}|| border-bottom: 2px solid #8888FF;}}">
<tr class= "vcard" {{#ifeq: {{{color}}} | dark |style="background-color: #CCCCFF;"|style="background-color: #EEEEFF;"}} >
<td> <span class="fn org" style="font-weight:bold;">{{{1|}}}</span> {{#if:{{{1a|}}}|{{{1a}}}|}}</td>
<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|}}}|,&nbsp;|}} }} }}&nbsp;{{#if:{{{oscoor|}}}|{{OS coord|{{{oscoor|}}}|{{{oscoor|}}} }}|{{{3|}}} }}{{#if:{{{6|}}}{{{5|}}}{{{force|}}}||{{{4|}}} }}
<td> {{{2|}}}{{#if:{{{6|}}}{{{5|}}}{{{force|}}}||{{#if:{{{3|}}}{{{oscoor|}}}|{{#if:{{{2|}}}|,&nbsp;|}} }} }}&nbsp;{{#if:{{{oscoor|}}}|{{OS coord|{{{oscoor|}}}|{{{oscoor|}}} }}|{{{3|}}} }}{{#if:{{{6|}}}{{{5|}}}{{{force|}}}||{{{4|}}} }}
</td>
</td>
<td style="text-align: right;"> {{{8|}}} </td><!-- year built -->
<td align=right > {{{8|}}} </td><!-- year built -->
<td style="text-align: right;"> {{{10|}}} </td><!-- year demolished or "standing" -->
<td align=right > {{{10|}}} </td><!-- year demolished or "standing" -->
<td style="text-align: right;"> {{formatnum:<!-- calculate years in service & format
<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 (or blank) → check whether {{{9}}} (year decommissioned) is specified
-->|{{#if:{{{9|}}}<!-- {{{8}}} is valid → check whether {{{9}}} (year decommissioned) is specified
-->|{{#iferror:{{#expr:{{{9}}}-{{{8}}}}}}}<!-- {{{9}}} is specified → calculate number of years from {{{8}}} to {{{9}}} (if {{{8}}} is not blank)
-->|{{#ifexpr:{{{9}}}>{{{8}}}<!--- {{{9}}} is specified → check whether year {{{8}}} is before year {{{9}}}
-->|{{#if:{{{10|}}}<!-- {{{9}}} is not specified → check whether {{{10}}} is specified
--->|{{#iferror:{{#expr:{{{9}}}-{{{8}}}}}}}<!--- year {{{8}}} is before year {{{9}}} calculate number of years from {{{8}}} to {{{9}}}
-->|{{#ifeq:{{lc:{{{10}}}}}|standing<!-- {{{10}}} is specified check whether {{{10}}} is "standing"
-->}}<!-- End check whether year {{{8}}} is before year {{{9}}}
-->|{{#iferror:{{#expr:{{CURRENTYEAR}}-{{{8}}}}}}}<!-- {{{10}}} is "standing" calculate number of years from {{{8}}} to this year (if {{{8}}} is not blank)
-->|{{#ifeq:{{lc:{{{10|standing}}}}}|standing<!--- {{{9}}} is not specifiedcheck whether {{{10}}} is "standing"
-->|{{#iferror:{{#time:Y|{{{10}}}}}<!-- {{{10}}} is not "standing" → check whether {{{10}}} (year demolished) is a valid year
--->|{{#iferror:{{#expr:{{CURRENTYEAR}}-{{{8}}}}}}}<!--- {{{10}}} is "standing" calculate number of years from {{{8}}} to this year
-->|<!--- {{{10}}} is invalid no output
--->|{{#iferror:{{#time:Y|{{{10}}}}}<!-- {{{10}}} is not "standing" check whether {{{10}}} (year demolished) is a valid year
-->|{{#iferror:{{#expr:{{{10}}}-{{{8}}}}}}}<!-- {{{10}}} is valid calculate number of years from {{{8}}} to {{{10}}} (if {{{8}}} is not blank)
-->|<!--- {{{10}}} is invalid → no output
-->}}<!-- End check whether {{{10}}} is a valid year
-->|{{#iferror:{{#expr:{{{10}}}-{{{8}}}}}}}<!--- {{{10}}} is valid calculate number of years from {{{8}}} to {{{10}}}
-->}}<!-- End check whether {{{10}}} is "standing"
-->}}<!--- End check whether {{{10}}} is a valid year
-->|{{#iferror:{{#expr:{{CURRENTYEAR}}-{{{8}}}}}}}<!-- {{{10}}} is not specified calculate number of years from {{{8}}} to this year (if {{{8}}} is not blank)
-->}}<!--- End check whether {{{10}}} is "standing"
-->}}<!--- End check whether {{{10}}} is specified
-->}}<!--- End check whether {{{9}}} is specified
-->}}<!--- End check whether {{{9}}} is specified
-->}}<!-- End check whether {{{8}}} is a valid year
-->}}<!-- 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;}} border-bottom: 3px solid #8888FF;">
{{#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>