Template:VersionCompatibilityVersion: Difference between revisions

allow for version 3.0, adjust logic for optional {{{3}}}, replace {{{1}}} and {{{2}}} logic with switch
No edit summary
(allow for version 3.0, adjust logic for optional {{{3}}}, replace {{{1}}} and {{{2}}} logic with switch)
Line 1: Line 1:
<includeonly><div title="{{#ifeq:{{{1}}}|2.0|2.0 (RC)|{{{1}}}}} {{{2}}}{{#ifexist:{{{3}}}| {{{3}}}|}}" style="position:absolute;text-align: right;height:13px;border-right:1px solid #000;margin-right:-1px;margin-top:12px;overflow:hidden;width:{{#expr:100-({{#ifeq:{{{1}}}|2.0|5350|{{{1}}}}}/{{CurrentRevision}}*100)}}%;background:{{#ifeq:{{{2}}}|?|#000|}}{{#ifeq:{{{2}}}|*|#f00|}}{{#ifeq:{{{2}}}|**|#f80|}}{{#ifeq:{{{2}}}|***|#ff0|}}{{#ifeq:{{{2}}}|****|#8f0|}}{{#ifeq:{{{2}}}|*****|#0f0|}}"><span style="font-size:9px;font-weight:bold;padding-right:1px">{{#ifeq:{{{1}}}|2.0|2.0 (RC)|{{{1}}}}}</span></div></includeonly><noinclude>
<includeonly><div title="{{#switch:{{{1}}}
|2.0=2.0 (RC)
|3.0=3.0
|#default={{{1}}}
}} {{{2}}} {{{3|}}}" style="position:absolute; text-align:right; height:13px; border-right:1px solid #000; margin-right:-1px; margin-top:12px; overflow:hidden; width:{{#expr:100-({{#switch:{{{1}}}
  |2.0=5350
  |3.0=7616
  |#default={{{1}}}
}}}}/{{CurrentRevision}}*100)}}%; background:{{#switch:{{{2}}}
|?=#000
|*=#f00
|**=#f80
|***=#ff0
|****=#8f0
|*****=#0f0
}};"><span style="font-size:9px; font-weight:bold; padding-right:1px">{{#switch:{{{1}}}
|2.0=2.0 (RC)
|3.0=3.0
|#default={{{1}}}
}}</span></div></includeonly><noinclude>
{{documentation}}
{{documentation}}
</noinclude>
</noinclude>