Difference between revisions of "Template:ratings"

From WikiCorporates
Jump to navigation Jump to search
m
 
(45 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
{{#switch:{{{1|}}}
 
{{#switch:{{{1|}}}
 +
|TIUK={{img|Transparency-International-UK-sm.svg|69|20|float=none}}[[Transparency International]]&nbsp; <span style="color:white; background-color:{{{perf-col}}}; border:1px solid {{{perf-col}}}; text-align:center;">&nbsp;&nbsp;{{{perf-band}}}&nbsp;&nbsp;</span>
 
|WFY={{#switch:{{{type|}}}
 
|WFY={{#switch:{{{type|}}}
|wfy={{img|Transparency-Who-Funds-You-{{{band}}}.svg|20|20|float=none}} {{img|{{{png}}}|{{pw}}}|{{{ph}}}|float=none|ml=8px}} [[{{{org}}}]]
+
|wfy={{img|Transparency-Who-Funds-You-{{{band}}}.svg|20|20|float=none}} {{#if:{{{png|}}}|{{img|{{{png}}}|{{pw}}}|{{{ph}}}|float=none|ml=8px}}}}{{#if:{{{img|}}}|[[File:{{{img}}}|{{{sz}}}]]}} [[{{{org}}}]]
 
|org={{img|Who-Funds-You-WFY.svg|25|25|float=none}} [[Who Funds You?]]&nbsp; {{img|Transparency-Who-Funds-You-{{{band}}}.svg|20|20|float=none}}
 
|org={{img|Who-Funds-You-WFY.svg|25|25|float=none}} [[Who Funds You?]]&nbsp; {{img|Transparency-Who-Funds-You-{{{band}}}.svg|20|20|float=none}}
 
}}
 
}}
 
|IM={{#switch:{{{type|}}}
 
|IM={{#switch:{{{type|}}}
|im=<span style="display:inline-block; width:30px; background-color:{{{perf-col}}}; color:white; text-align:center; font-size:115%;">&nbsp;&nbsp;{{{perf-band}}}&nbsp;&nbsp;</span> {{img|{{{png}}}|{{pw}}}|{{{ph}}}|float=none|ml=8px}} [[{{{org}}}]]
+
|im=<span style="display:inline-block; width:30px; background-color:{{IM-Lookup|{{{perf-band}}}}}; color:white; text-align:center; font-size:110%;">{{{perf-band}}}</span> {{#if:{{{png|}}}|{{img|{{{png}}}|{{pw}}}|{{{ph}}}|float=none|ml=8px}}}}{{#if:{{{img|}}}|[[File:{{{img}}}|{{{sz}}}]]}} [[{{{org}}}]]
|org={{img|Influence-Map-IM.svg|25|25|float=none}} [[InfluenceMap]]&nbsp; <span style="background-color:{{{perf-col}}}; color:white; padding:1px; text-align:center; font-size:115%;">&nbsp;&nbsp;{{{perf-band}}}&nbsp;&nbsp;</span>
+
|org={{img|Influence-Map-IM.svg|25|25|float=none}} [[InfluenceMap]]&nbsp; <span style="display:inline-block; width:30px; background-color:{{IM-Lookup|{{{perf-band}}}}}; color:white; text-align:center; font-size:110%;">{{{perf-band}}}</span>
 
}}
 
}}
 
|TPY={{#switch:{{{type|}}}
 
|TPY={{#switch:{{{type|}}}
|tpy={{img|Transparency-Transparify-{{{band}}}.svg|21|20|float=none}} {{img|{{{png}}}|{{pw}}}|{{{ph}}}|float=none|ml=8px}} [[{{{org}}}]]
+
|tpy={{img|Transparency-Transparify-{{{band}}}.svg|21|20|float=none}} {{#if:{{{png|}}}|{{img|{{{png}}}|{{pw}}}|{{{ph}}}|float=none|ml=8px}}}}{{#if:{{{img|}}}|[[File:{{{img}}}|{{{sz}}}]]}} [[{{{org}}}]]
 
|org={{img|Transparify-TPY.svg|26|25|float=none}} [[Transparify]]&nbsp; {{img|Transparency-Transparify-{{{band}}}.svg|21|20|float=none}}
 
|org={{img|Transparify-TPY.svg|26|25|float=none}} [[Transparify]]&nbsp; {{img|Transparency-Transparify-{{{band}}}.svg|21|20|float=none}}
 +
}}
 +
|EC={{#switch:{{{type|}}}
 +
|ec=<span style="display:inline-block; background-color:{{{perf-col}}}; color:white; text-align:center;">&nbsp;{{{perf-band}}}&nbsp;</span> {{#if:{{{png|}}}|{{img|{{{png}}}|{{pw}}}|{{{ph}}}|float=none|ml=8px}}}}{{#if:{{{img|}}}|[[File:{{{img}}}|{{{sz}}}]]}} [[{{{org}}}]]
 +
|org=[[Ethical Consumer#Ethical Ratings|{{img|Ethical-Consumer.svg|78|25|float=none}}]] &nbsp; <span style="display:inline-block; background-color:{{{perf-col}}}; color:white; text-align:center;">&nbsp;Score: {{{perf-band}}}&nbsp;</span>
 
}}
 
}}
 
|default={{tc|Something went wrong in Template:ratings}}}}<noinclude>{{doc2}}</noinclude>
 
|default={{tc|Something went wrong in Template:ratings}}}}<noinclude>{{doc2}}</noinclude>

Latest revision as of 19:57, 17 January 2021

[edit] Documentation


Template to create various ratings.
Original pics are in Transparency-Ratings-ink.svg

Usage

See below for individual template usage. Organisations using this template are:

{{ratings
|TIUK     - Transparency Intl UK [ A B C D E ]
|WFY      - Who Funds You [ A B C D E ]
|IM       - InfluenceMap  [A ... F] Uses eg. B+, A-, etc.
|TPY      - Transparify   [ 5 4 3 2 1 0 X ]
|EC       - Ethical Consumer [ 0=#000000; 1=#1A1A1A; 2=#343434; ... ]
                               mid-points from  Color Blender: https://meyerweb.com/eric/tools/color-blend/
}}

Transparency International UK

{{ratings|TIUK|perf-col=#225f89|perf-band=A|org=Name-of-company}}

Transparify

{{ratings|TPY|type=tpy|band=5|org=Amnesty International|png=Amnesty-International.svg|pw=57|ph=20}}

  • Org's page output, in Info box: Transparency Rating: Transparify 

{{ratings|TPY|type=org|band=5|org=Amnesty International}}<sup>[1]<sup>

Who Funds You

{{ratings|WFY|type=wfy|band=A|org=Centre for Labour and Social Studies|png=Centre-for-Labour-and-Social-Studies.svg|pw=29|ph=20}}

  • Org's page output, in Info box: Transparency Rating: Who Funds You? 

{{ratings|WFY|type=org|band=A|org=Centre for Labour and Social Studies}}<sup>[1]<sup>

InfluenceMap

This template uses a simple lookup table Template:IM-Lookup to return the band colour.

{{ratings|IM|type=im|org=Amazon.com Inc|perf-band=A|png=Amazon.svg|pw=66|ph=20}}

  • Org's page output, in Info box: Climate Policy Rating: InfluenceMap  A

{{ratings|IM|type=org|perf-band=A|org=Amazon.com Inc}}

Ethical Consumer

  • EC page output:  0/20  Amazon.com Inc
    • {{ratings|EC|type=ec|org=Amazon.com Inc|perf-col=#000000|perf-band=0/20|png=Amazon.svg|pw=66|ph=20}}
    • {{ratings|EC|type=ec|org=Amazon.com Inc|perf-col=#000000|perf-band=0/20|img=Amazon.svg|sz=66x20px}}
  • Org's page output, in Info box:    Score: 0/20 

{{ratings|EC|type=org|perf-col=#000000|perf-band=0/20|org=Amazon.com Inc}}