Difference between revisions of "Template:GroupTableColHeader"
From QWiki
(Extreme lab) |
m (Rolling back because this broke existing table headers) |
||
(4 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
− | <includeonly>|- | + | <includeonly>|- style="background-color:#f2f2f2;" |
− | !style="width: 16px;"|< | + | !style="width:16px;"|<small>#</small> <!-- show place number in header cell --> |
− | !colspan="{{#expr: | + | !colspan="{{#expr:3-{{#if:{{{win_m|}}}{{{lose_m|}}}|1|0}}-{{#if:{{{win_g|}}}{{{lose_g|}}}|1|0}}-{{#if:{{{diff|}}}|1|0}}}}" style="text-align:left;" class="grouptableslot"| <small>{{{1|}}}</small> <!-- show the player name with the correct colspan --> |
− | + | !<!--class="grouptable-games" -->style="width: 35px; white-space: pre; text-align:center;"|'''{{{win_m|<small>Games</small>}}}''' <!-- always show match scores --><!-- | |
− | + | -->{{!}}{{!}}<!--class="grouptable-games" -->style="width: 35px; white-space: pre; text-align:center;"{{!}}{{{win_g|<small>Maps</small>}}}<!-- | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | !<!--class="grouptable-games" -->style="width: 35px; white-space: pre; text-align:center;"|'''{{{win_m| | ||
− | --> | ||
− | |||
-->{{#if: {{{diff|}}} <!-- if diff= is present, show it as well | -->{{#if: {{{diff|}}} <!-- if diff= is present, show it as well | ||
− | -->| {{!}}{{!}}<!--class="grouptable-games" -->style="width: 35px; white-space: pre; text-align: center;"{{!}} | + | -->| {{!}}{{!}}<!--class="grouptable-games" -->style="width: 35px; white-space: pre; text-align: center;"{{!}}<small>{{abbr|Diff|Map difference}}</small> |
}}{{#ifeq:{{lc:{{#var:show_points|}}}}|true<!-- if show_p present, show points | }}{{#ifeq:{{lc:{{#var:show_points|}}}}|true<!-- if show_p present, show points | ||
-->| {{!}}{{!}}<!--class="grouptable-points"-->style="width: 32px; white-space: pre; text-align:center;"{{!}}<!-- | -->| {{!}}{{!}}<!--class="grouptable-points"-->style="width: 32px; white-space: pre; text-align:center;"{{!}}<!-- | ||
− | -->{{#if: {{{win_m|}}}{{{lose_m|}}}<!-- if win_m or lose_m is present, calculate points | + | -->{{#if: {{{win_m|0}}}{{{lose_m|0}}}<!-- if win_m or lose_m is present, calculate points |
-->| {{#if: {{{tie_m|}}}<!-- if tie_m is present, include tie matches in calculation | -->| {{#if: {{{tie_m|}}}<!-- if tie_m is present, include tie matches in calculation | ||
-->| '''<i>{{#expr: ({{{win_m}}}*{{#var:win_points|3}}) + ({{#if:{{{tie_m|}}}|{{{tie_m}}}|0}}*{{#var:tie_points|1}}) + {{#if:{{{temp_p|}}}|{{{temp_p}}}|0}}}}p</i><!-- | -->| '''<i>{{#expr: ({{{win_m}}}*{{#var:win_points|3}}) + ({{#if:{{{tie_m|}}}|{{{tie_m}}}|0}}*{{#var:tie_points|1}}) + {{#if:{{{temp_p|}}}|{{{temp_p}}}|0}}}}p</i><!-- |
Latest revision as of 08:38, 15 February 2021
Documentation (view - edit)
Related templates:
- {{LeagueTableSlot2on2}}
- {{LeagueTableSlotNQR}}
- {{LeagueTableSlotNQR2}}
- {{GroupTableSlot}}
Example #1
{{GroupTableStart|GroupTableStart|width=100%}} {{GroupTableColHeader|Nation|games=1|maps=1|diff=1}} {{GroupTableEnd}}
Gives us:
GroupTableStart | |||||
---|---|---|---|---|---|
# | Nation | Games | Maps | Diff |
Example #1
{{GroupTableStart|GroupTableStart|width=100%}} {{GroupTableColHeader|Nation|games=1|maps=1|diff=}} {{GroupTableEnd}}
Gives us:
GroupTableStart | |||||
---|---|---|---|---|---|
# | Nation | Games | Maps |
Parameters
The following parameters can be used for this template
- first unnamed argument
- The first unnamed argument of the parameter list is used as the name of player column. Examples could be
Player
,Team
orNation
. - |games=
- (Optional) If not empty, it will display "Games" header
- |maps=
- (Optional) If not empty, it will display "Maps" header
- |diff=
- (Optional) If not empty, it will display "Diff" header