Difference between revisions of "Template:LeagueTableSlotQwduel"

From QWiki
m (Second test of fixing % column to always show %)
m (Trying to reinstate 'go=' feature)
Line 1: Line 1:
 
<includeonly>|-{{#if: {{{bg|}}}|style="background-color:{{Color|{{{bg}}}}};"|}}
 
<includeonly>|-{{#if: {{{bg|}}}|style="background-color:{{Color|{{{bg}}}}};"|}}
 
!style="width: 16px;{{#if: {{{pbg|}}}| background-color:{{Color|{{{pbg}}}}};|}}"|{{{place|X}}}.
 
!style="width: 16px;{{#if: {{{pbg|}}}| background-color:{{Color|{{{pbg}}}}};|}}"|{{{place|X}}}.
|style="width:185px;height:36px;text-align:left;{{#if:{{{bg|}}}|background-color:{{Color|{{{bg}}}}};|}}"|{{team|{{{1}}}|flag={{{flag}}}|link={{{link}}}}}
+
|colspan="{{#expr:7-{{#if:{{{go|}}}|1|0}}-{{#if:{{{win_g|}}}{{{lose_g|}}}|1|0}}-{{#if:{{{diff|}}}|1|0}}}}" style="width:185px; height:36px;text-align:{{{align|left}}};{{#if:{{{bg|}}}|background-color:{{Color|{{{bg}}}}};|}}"|{{team|{{{1}}}|flag={{{flag}}}|link={{{link}}}}}
 +
{{#if: {{{go|}}} <!-- if go= is present, add a cell and show the arror -->
 +
    | {{!}}style="width: 1em;"{{!}}<!-- go= with values "up", "same" and "down"
 +
    -->{{#switch: {{{go}}}
 +
        |up = {{PlaceUp}}
 +
        |up1 = {{PlaceUp}}&nbsp;+1
 +
        |up2 = {{PlaceUp}}&nbsp;+2
 +
        |up3 = {{PlaceUp}}&nbsp;+3
 +
        |up4 = {{PlaceUp}}&nbsp;+4
 +
        |up5 = {{PlaceUp}}&nbsp;+5
 +
        |up6 = {{PlaceUp}}&nbsp;+6
 +
        |up7 = {{PlaceUp}}&nbsp;+7
 +
        |same = {{PlaceSame}}
 +
        |same0 = {{PlaceSame}}&nbsp;–
 +
        |down = {{PlaceDown}}
 +
        |down1 = {{PlaceDown}}&nbsp;-1
 +
        |down2 = {{PlaceDown}}&nbsp;-2
 +
        |down3 = {{PlaceDown}}&nbsp;-3
 +
        |down4 = {{PlaceDown}}&nbsp;-4
 +
        |down5 = {{PlaceDown}}&nbsp;-5
 +
        |down6 = {{PlaceDown}}&nbsp;-6
 +
        |down7 = {{PlaceDown}}&nbsp;-7
 +
        |{{{go}}}
 +
      }}
 +
    |
 +
}}
 
|style="width:35px; white-space: pre; text-align:center;"|{{{gp|0}}}
 
|style="width:35px; white-space: pre; text-align:center;"|{{{gp|0}}}
 
|style="width:35px; white-space: pre; text-align:center;"|{{{w|0}}}
 
|style="width:35px; white-space: pre; text-align:center;"|{{{w|0}}}

Revision as of 07:52, 15 September 2021