Şablon:Medals table

Vikipediya, azad ensiklopediya
Jump to navigation Jump to search
MövqeÖlkəQızılGümüşBürüncÜmumi
Ümumi nəticə (0 Ölkə)0000
Sənədləşmə

A template for generating a medals table for a sporting event where the totals and ranks are automatically calculated.

Basics of Template

{{Medals table
 | caption        = 
 | host           = <!-- Text to display after host color box -->
 | show_limit     = <!-- Will limit to displaying only the first N rows if this param is provided -->
 | remaining_text = <!-- Text to display for the remaining N rows (default is 'Remaining') -->
 | flag_template  = <!-- Optional, will default to use Template:Flagteam -->
 | event          = <!-- required IF flag_template requires a secondary param -->
 | team           = <!-- Optional, will default to Nation -->

 ... <!-- For a list of valid IOC values, see [[List of IOC country codes]] -->

 | gold_IOC    =
 | silver_IOC  = 
 | bronze_IOC  =
 | host_IOC    = <!-- leave blank UNLESS this is the host nation -->
 | name_IOC    = <!-- Optional override of default which is {{flag_template|IOC}}
 | note_IOC    = <!-- Option note that is added after the nation name -->
}}
  *   {{{host}}}
{{{caption}}}
Mövqe{{{team}}}QızılGümüşBürüncÜmumi
1ABŞ ABŞ (USA){{{note_USA}}}000{{{gold_USA}}} + {{{silver_USA}}} + {{{bronze_USA}}}
Ümumi nəticə (1 {{{team}}})############

Parameters

Some of the optional parameters

Parameter Explanation
caption The caption or title given to the table
host The host entity. If set to a 3 letter code matching one of the rows, the host name will be automatically formatted. Otherwise this param will override the host text.
flag_template Which of the many flag templates to use. If left blank, {{flagcountry}} will be used.
event For flag templates which require a 2nd parameter (such as {{flagIOCteam}}) this param will be that 2nd param.
team An optional override for the header to column 2. The default is "Nation".
hide_rank When set the rank column will be hidden.
hide_totals When set the totals row will be hidden.

For a list of valid IOC values, see List of IOC country codes

Blank with all IOC codes

The below template contains a condensed version of the template with ALL IOC country codes included. Obviously not all are needed. You are free to pick and choose those that you need for your implementation of the template.

Event & Flag Template

If {{{event}}} and {{{flag_template}}} are given values, then the nation value will be rendered as {{<flag_template>|<IOC>|<event>}}.

So for example, with the following params:

{{Medals table
 | event    = 2018 Winter 
 | flag_template = FlagIOCteam
 | nation1  = USA
 | nation2  = CAN
}}

The nations will be rendered as  ABŞ (USA) &  Kanada (CAN)

Example

{{Medals table
 | caption        = 
 | host           = 
 | show_limit     = 
 | remaining_text = 
 | flag_template  = 
 | event          = 
 | gold_FRA = 7 | silver_FRA = 4 | bronze_FRA = 4
 | gold_GBR = 5 | silver_GBR = 5 | bronze_GBR = 5
 | gold_USA = 5 | silver_USA = 3 | bronze_USA = 2
 | gold_AUS = 3 | silver_AUS = 5 | bronze_AUS = 7
 | gold_RSA = 3 | silver_RSA = 4 | bronze_RSA = 3
 | gold_GER = 1 | silver_GER = 3 | bronze_GER = 3
}}
MövqeÖlkəQızılGümüşBürüncÜmumi
1Fransa Fransa (FRA)74415
2Böyük Britaniya Böyük Britaniya (GBR)55515
3ABŞ ABŞ (USA)53210
4Avstraliya Avstraliya (AUS)35715
5Cənubi Afrika Respublikası Cənubi Afrika Respublikası (RSA)34310
6Almaniya Almaniya (GER)1337
Ümumi nəticə (6 Ölkə)24242472

Example2

{{Medals table
 | caption        = 2015 Winter Universiade medal table
 | host           = SVK
 | host_note      = <ref>[http://wuni15.sportresult.com/HIDE/en/MedalTally?sport=00&medalKind=DefaultSports Medal Tally]</ref>
 | flag_template  = flagIOC2
 | event          = 2015 Winter Universiade
 | team           = 
 | gold_RUS = 9 | silver_RUS = 9 | bronze_RUS = 9
 | gold_KOR = 5 | silver_KOR = 5 | bronze_KOR = 5
 | gold_ITA = 4 | silver_ITA = 4 | bronze_ITA = 4 
 | gold_1   = 1 | silver_1   = 1 | bronze_1   = 0 | name_1 = Independent Athletes | skip_1 = yes | note_1 = <ref>this is a note</ref>
 | gold_SVK = 0 | silver_SVK = 0 | bronze_SVK = 1 | host_SVK = yes
}}
  *   Ev sahibi ölkə ( Slovakia)[1]
2015 Winter Universiade medal table
MövqeÖlkəQızılGümüşBürüncÜmumi
1 Russia99927
2 South Korea55515
3 Italy44412
Independent Athletes[2]1102
4 Slovakia*0011
Ümumi nəticə (4 Ölkə)19191957
  1. Medal Tally
  2. this is a note