--- Welcome to the official ADCIRCWiki site! The site is currently under construction, with limited information. ---

For general information, see the ADCIRC site, ADCIRC FAQ, or the ADCIRC Wikipedia page. For model documentation not yet available on the wiki, see the ADCIRC site. New content is being continuously added to the ADCIRCWiki, and material from the main ADCIRC site will be gradually transitioned over to the wiki.

Template:ADC version: Difference between revisions

From ADCIRCWiki
Jump to navigation Jump to search
No edit summary
m (updated examples)
 
(18 intermediate revisions by the same user not shown)
Line 1: Line 1:
<!----------This is the actual template---------->
<onlyinclude>
<onlyinclude>
{| style="border: 1px solid #888888; float: right; font-size: 80%; margin: 0 0 .5em .5em; line-height: 1.2; text-align: right; border-collapse: collapse;"
{| style="border: 4px solid #AA00AA; float: right; font-size: 80%; margin: 0 0 .5em .5em; line-height: 1.2; text-align: right; border-collapse: collapse;"   <!-----Table format----->
   |"ADCIRC version: "
   | ADCIRC version:  
   |<abbr style="font-weight: bold; font-size: 180%;"> {{#switch: {{{relation|}}}
   | <abbr style="font-weight: bold; font-size: 180%;"> {{#switch: {{{relation|}}} <!-----switch-case statement for relation symbol----->
     |eq|{{=}}={{=}}
     |eq|{{=}}={{=}}
     |gt|>=<small>&gt;</small>
     |gt|>=<small>&gt;</small>
Line 8: Line 9:
     |ge|+=<small>&ge;</small>
     |ge|+=<small>&ge;</small>
     |le|-=<small>&le;</small>
     |le|-=<small>&le;</small>
    |#default={{=}}
  }}  {{#ifeq: {{{version|}}} | {{{version}}} | {{{version}}} | ?????}} </abbr> <!-----display version if supplied----->
  }}
  {{{version}}} </abbr>
|}
|}
</onlyinclude>
</onlyinclude>


This was inspired by [https://www.mediawiki.org/wiki/Template:MW_version a similar template on MediaWiki].   
This template will give a version number indicator on the right-hand side of a page (or table or whatever) it is added to, and is intended as a way to highlight what version(s) of ADCIRC something is relevant for.  This was inspired by [https://www.mediawiki.org/wiki/Template:MW_version a much more advanced template on MediaWiki].   


For instance,
== Syntax ==
<code><nowiki>{{ADC version|version=</nowiki><u><nowiki>VERSION</nowiki></u><nowiki>|relation=</nowiki><u><nowiki>RELATION</nowiki></u><nowiki>}}</nowiki></code>


{{ADC version|version=52|relation>}}
You specify the values for <code><u>VERSION</code></u> and <code><u>RELATION</code></u>, examples of which are given below. 


Yeah!
== Examples ==
 
{| class="wikitable"
OLD
!you type
 
!you get
 
|-
|lang={{lang code}}
| <code><nowiki>{{ADC version}}</nowiki></code> || {{ADC version}}
|msg-mw-version=<translate><!--T:1--> MediaWiki version{{<tvar|1>#if:{{{version2|}}}</>|s}}:</translate>
|-
|msg-latest-tooltip=<translate><!--T:2--> The latest stable version is <tvar|1>{{MW stable branch number}}</></translate>
| <code><nowiki>{{ADC version|version=52}}</nowiki></code> || {{ADC version|version=52}}
|version={{{version|}}}
|-
|version2={{{version2|}}}
| <code><nowiki>{{ADC version|version=44-47}}</nowiki></code> || {{ADC version|version=44-47}}
|comment={{{comment|}}}
  |-
|r={{{r|}}}
  | <code><nowiki>{{ADC version|version=52|relation=>}}</nowiki></code> || {{ADC version|version=52|relation=>}}
|gerrit change={{{gerrit change|}}}
|-
|compact={{{compact|}}}
| <code><nowiki>{{ADC version|version=52.dev, 53|relation=gt}}</nowiki></code> || {{ADC version|version=52.dev, 53|relation=gt}}
 
  |-
 
  | <code><nowiki>{{ADC version|version=53|relation=le}}</nowiki></code> || {{ADC version|version=53|relation=le}}
{| style="border: 1px solid #888888; float: right; font-size: 80%; margin: 0 0 .5em .5em; line-height: 1.2; text-align: right; border-collapse: collapse;"
|-
{{#if: {{{compact|}}} ||{{!}} style="padding: .1em .3em;" {{!}} {{{msg-mw-version}}} }}
| <code><nowiki>{{ADC version|version=50|relation=-}}</nowiki></code> || {{ADC version|version=50|relation=-}}
| {{#switch: {{{comment|}}}
|-
  |and after|and later|+=
| <code><nowiki>{{ADC version|version=a long, long time ago|relation=+}}</nowiki></code> || {{ADC version|version=a long, long time ago|relation=+}}
  title="{{{msg-latest-tooltip}}}" style="border-color: #{{MW version/color}};
  |#default=
  title="MediaWiki {{{version2|{{{version|X.XX}}}}}} is {{MW version/status|{{#if:{{{version2|}}}|{{{version2}}}|{{{version|X.XX}}}}}}} version" style="border-color: #{{MW version/color|{{{version|}}}}}; {{#if:{{{version2|}}} | border-color: #{{MW version/color|{{{version2|}}}}}; border-bottom-color: #{{MW version/color|{{{version|}}}}};}}
}} border-width: 5px; border-style: {{#switch: {{MW version/status|{{{version|}}}}} |alpha = dotted |#default =  solid }}; text-align: center; padding: .1em .3em;" | <abbr style="font-weight: bold; font-size: 180%;">{{#switch: {{{comment|}}}
  |and before|and earlier|-=<small>&le;</small>
  |and after|and later|+=<small>&ge;</small>
}} {{#if: {{{version|}}} | {{{version}}} | X.X }}{{#if: {{{version2|}}} | &#32;&ndash; {{{version2}}} }}</abbr>{{#if: {{{r|}}} |
<br><small>{{Rev|{{{r}}}}}</small>}}{{#if: {{{gerrit change|}}} |
<br><small>{{Gerrit search|{{{gerrit change}}}}}</small>}}
{{#switch: {{{comment|}}}
|and before|and after|and earlier|and later|+|=
|#default=<nowiki /><span style="display: none;">[[Template:MW version/list1]]</span>
{{!}} style="padding: .1em .3em;" {{!}} {{{comment}}}
}}
|}
|}

Latest revision as of 16:13, 10 July 2020


ADCIRC version:  ?????


This template will give a version number indicator on the right-hand side of a page (or table or whatever) it is added to, and is intended as a way to highlight what version(s) of ADCIRC something is relevant for. This was inspired by a much more advanced template on MediaWiki.

Syntax

{{ADC version|version=VERSION|relation=RELATION}}

You specify the values for VERSION and RELATION, examples of which are given below.

Examples

you type you get
{{ADC version}}
ADCIRC version:  ?????
{{ADC version|version=52}}
ADCIRC version: 52
{{ADC version|version=44-47}}
ADCIRC version: 44-47
{{ADC version|version=52|relation=>}}
ADCIRC version: > 52
{{ADC version|version=52.dev, 53|relation=gt}}
ADCIRC version: > 52.dev, 53
{{ADC version|version=53|relation=le}}
ADCIRC version: 53
{{ADC version|version=50|relation=-}}
ADCIRC version: 50
{{ADC version|version=a long, long time ago|relation=+}}
ADCIRC version: a long, long time ago