Difference between revisions of "Template:LSR/sandbox"

From blackwiki
Jump to navigation Jump to search
imported>Tothwolf
(Use code directly from {{Template reference list}} instead of transcluding)
imported>Great Brightstar
 
(29 intermediate revisions by 11 users not shown)
Line 1: Line 1:
{{#if:{{{latest release version|}}}{{{latest_release_version|}}}
+
{{#if:{{{latest release version|{{{latest_release_version|}}}}}}|
  |<span class="plainlinks">[{{fullurl:Template:Latest stable software release/{{{article|{{PAGENAME}}}}}|action=edit}} {{{latest release version|{{{latest_release_version}}}}}}]</span>{{#if:{{{latest release date|}}}{{{latest_release_date|}}}| &nbsp;<small>({{{latest release date|{{{latest_release_date}}}}}})</small>}}
+
{{{latest release version|{{{latest_release_version}}}}}} {{#if:{{{latest release date|{{{latest_release_date|}}}}}}|<small>({{{latest release date|{{{latest_release_date}}}}}})</small>}}{{#if:{{{edit|}}}||&#32;<small class="plainlinks">[{{fullurl:Template:Latest stable software release/{{{article|{{PAGENAME}}}}}|action=edit}} &#91;±&#93;]</small>}}
  |{{#ifeq:{{NAMESPACE}}|{{ns:0}}|<span class="plainlinks">([{{fullurl:Template:Latest stable software release/{{{article|{{PAGENAME}}}}}|action=edit}} add])</span>}}
+
}}{{#ifeq:{{BASEPAGENAME}}|Latest stable software release|{{#ifexist:{{#if:{{{article|}}}|{{{article|}}}|{{#titleparts:{{PAGENAME}}||2}}}}|{{#ifeq:{{#invoke:redirect|isRedirect|{{#if:{{{article|}}}|{{{article|}}}|{{#titleparts:{{PAGENAME}}||2}}}}}}|yes|[[Category:Software release templates for redirects]]|}}|[[Category:Software release templates for nonexistent articles]]}}|}}<noinclude>
}}{{#ifeq:{{FULLPAGENAME}}|{{ns:Template}}:Latest stable software release/{{SUBPAGENAME}}
+
{{documentation}}<!-- place categories and language links on the /doc page, not here! -->
    |{{#ifexist:{{#if:{{{article|}}}|{{{article}}}|{{SUBPAGENAME}}}}
 
      |[[Category:Latest stable software release templates|{{{article|{{SUBPAGENAME}}}}}]]<br /><p>→ Back to article "'''[[{{{article|{{SUBPAGENAME}}}}}]]'''"
 
      |[[Category:Latest stable software release templates|µ{{SUBPAGENAME}}]]
 
    }}{{#if:{{{see also 1|}}}{{{see_also_1|}}}{{{see also|}}}{{{see_also|}}}|<br /><p>→ See also "'''[[{{{see also 1|{{{see_also_1|{{{see also|{{{see_also}}}}}}}}}}}}]]'''"
 
    }}{{#if:{{{see also 2|}}}{{{see_also_2|}}}|{{#if:{{{see also 3|}}}{{{see_also_3|}}}|, |&nbsp;and }} "'''[[{{{see also 2|{{{see_also_2}}}}}}]]'''"
 
    }}{{#if:{{{see also 3|}}}{{{see_also_3|}}}|{{#if:{{{see also 4|}}}{{{see_also_4|}}}|, |,&nbsp;and }} "'''[[{{{see also 3|{{{see_also_3}}}}}}]]'''"
 
    }}{{#if:{{{see also 4|}}}{{{see_also_4|}}}|{{#if:{{{see also 5|}}}{{{see_also_5|}}}|, |,&nbsp;and }} "'''[[{{{see also 4|{{{see_also_4}}}}}}]]'''"
 
    }}{{#if:{{{see also 5|}}}{{{see_also_5|}}}|{{#if:{{{see also 6|}}}{{{see_also_6|}}}|, |,&nbsp;and }} "'''[[{{{see also 5|{{{see_also_5}}}}}}]]'''"
 
    }}{{#if:{{{see also 6|}}}{{{see_also_6|}}}|{{#if:{{{see also 7|}}}{{{see_also_7|}}}|, |,&nbsp;and }} "'''[[{{{see also 6|{{{see_also_6}}}}}}]]'''"
 
    }}{{#if:{{{see also 7|}}}{{{see_also_7|}}}|{{#if:{{{see also 8|}}}{{{see_also_8|}}}|, |,&nbsp;and }} "'''[[{{{see also 7|{{{see_also_7}}}}}}]]'''"
 
    }}{{#if:{{{see also 8|}}}{{{see_also_8|}}}|{{#if:{{{see also 9|}}}{{{see_also_9|}}}|, |,&nbsp;and }} "'''[[{{{see also 8|{{{see_also_8}}}}}}]]'''"
 
    }}{{#if:{{{see also 9|}}}{{{see_also_9|}}}|{{#if:{{{see also 10|}}}{{{see_also_10|}}}|, |,&nbsp;and }} "'''[[{{{see also 9|{{{see_also_9}}}}}}]]'''"
 
    }}{{#if:{{{see also 10|}}}{{{see_also_10|}}}|,&nbsp;and "'''[[{{{see also 10|{{{see_also_10}}}}}}]]'''"
 
    }}{{#if:{{{see also 11|}}}{{{see_also_11|}}}|<br />{{error|Error: Too many see also pages specified (maximum is 10)}}}}
 
 
 
{{#if:{{NAMESPACE}}|<h2><span class="mw-headline">References</span></h2>
 
{{rellink|This reference list does not appear in the article.}}
 
<references/>}}
 
}}<noinclude>
 
{{documentation}}<!-- place categories and language links on the /doc page, not here! -->
 
 
</noinclude>
 
</noinclude>

Latest revision as of 02:05, 16 December 2017

50px Template documentation[view] [edit] [history] [purge]

Function

Format release version and date for display in infoboxes and wikitables; intended to identify the latest stable release.

Usage

Infobox

{{LSR
| article = 
| latest release version = 
| latest release date = <!-- {{Start date and age|2020|05|24}} -->
| edit = <!-- yes -->
}}

Table

{{Latest stable software release/Linux}}

If a page such as Template:Latest stable software release/Facebook Messenger exists then {{Infobox_software}} will automatically insert the contents in the corresponding article.

Example

1.20.3 (Template:Start date and age) [±]

{{LSR
| article = MediaWiki
| latest release version = 1.20.3
| latest release date = {{Start date and age|2020|05|24}}
}}

Parameters

The article parameter will default to {{PAGENAME}} if left empty.

If the latest release version parameter is empty this template will not display anything.

The latest release date parameter is optional and if left empty no date will be shown.

The edit parameter is optional and can be set to "no" to cancel the edit link.

See also