Difference between revisions of "Template:bbfaw"

From WikiCorporates
Jump to navigation Jump to search
 
Line 1: Line 1:
 
<span style="text-align:center; color:white; background-color:
 
<span style="text-align:center; color:white; background-color:
−
{{#switch:{{{1}}}
+
{{#switch:{{{2}}}
−
|alpha={{#switch:{{{3}}}
+
|1=#01a793; border:1px solid #01a793;">&nbsp;{{{1}}}: {{#if:{{{num|}}}|1|A}}<!-- Tier 1/A: #01a793 -->
−
|1=#01a793; border:1px solid #01a793;">&nbsp;{{{2}}}: A<!-- Tier 1/A: #01a793 -->
+
|2=#178a89; border:1px solid #178a89;">&nbsp;{{{1}}}: {{#if:{{{num|}}}|2|B}}<!-- Tier 2/B: #178a89 -->
−
|2=#178a89; border:1px solid #178a89;">&nbsp;{{{2}}}: B<!-- Tier 2/B: #178a89 -->
+
|3=#2a7280; border:1px solid #2a7280;">&nbsp;{{{1}}}: {{#if:{{{num|}}}|3|C}}<!-- Tier 3/C: #2a7280 -->
−
|3=#2a7280; border:1px solid #2a7280;">&nbsp;{{{2}}}: C<!-- Tier 3/C: #2a7280 -->
+
|4=#38357e; border:1px solid #38357e;">&nbsp;{{{1}}}: {{#if:{{{num|}}}|4|D}}<!-- Tier 4/D: #38357e -->
−
|4=#38357e; border:1px solid #38357e;">&nbsp;{{{2}}}: D<!-- Tier 4/D: #38357e -->
+
|5=#422567; border:1px solid #422567;">&nbsp;{{{1}}}: {{#if:{{{num|}}}|5|E}}<!-- Tier 5/E: #422567 -->
−
|5=#422567; border:1px solid #422567;">&nbsp;{{{2}}}: E<!-- Tier 5/E: #422567 -->
+
|6=#2d0f2d; border:1px solid #2d0f2d;">&nbsp;{{{1}}}: {{#if:{{{num|}}}|6|F}}<!-- Tier 6/F: #2d0f2d -->
−
|6=#2d0f2d; border:1px solid #2d0f2d;">&nbsp;{{{2}}}: F<!-- Tier 6/F: #2d0f2d -->
+
|#default=No such band in switch().
−
|#default=No such band in switch(A).}}
 
−
|num={{#switch:{{{3}}}
 
−
|1=#01a793; border:1px solid #01a793;">&nbsp;{{{2}}}: 1<!-- Tier 1/A: #01a793 -->
 
−
|2=#178a89; border:1px solid #178a89;">&nbsp;{{{2}}}: 2<!-- Tier 2/B: #178a89 -->
 
−
|3=#2a7280; border:1px solid #2a7280;">&nbsp;{{{2}}}: 3<!-- Tier 3/C: #2a7280 -->
 
−
|4=#38357e; border:1px solid #38357e;">&nbsp;{{{2}}}: 4<!-- Tier 4/D: #38357e -->
 
−
|5=#422567; border:1px solid #422567;">&nbsp;{{{2}}}: 5<!-- Tier 5/E: #422567 -->
 
−
|6=#2d0f2d; border:1px solid #2d0f2d;">&nbsp;{{{2}}}: 6<!-- Tier 6/F: #2d0f2d -->
 
−
|#default=No such band in switch(1).}}
 
 
}}&nbsp;</span><noinclude>{{doc2}}</noinclude>
 
}}&nbsp;</span><noinclude>{{doc2}}</noinclude>

Latest revision as of 19:45, 22 October 2019

<span style="text-align:center; color:white; background-color:

No such band in switch(). 

[edit] Documentation

Small template to create annual ratings for BBFAW.

BBFAW allocates 6 Tiers, each of which has a given colour. The Tiers use numerical grades, but alpha ones are more intuitive (I think). This template takes a Year, and a Tier, and returns either a numerical or alpha grade, depending on whether num=t is set or not.

Parameters

{{bbfaw
|num=t   optional
|param1  year, eg. "2017"
|param2  tier, eg. "4"

Usage

  • {{bbfaw|2017|4}} gives:  2017: D 
  • {{bbfaw|num=t|2017|4}} gives:  2017: 4