Vorlage:Lead/Inner: Unterschied zwischen den Versionen

Aus Offene Naturführer
Wechseln zu: Navigation, Suche
(minor changes, semantic properties removed for testing)
(Entfernen der semantic properties (Vorversion) und Ersetzen von Vorlage Vorlage:Lead/MakeCommaBreakingList durch eine dummy-Version hilft NICHT. Daher hier wieder vollständige Version, mit kleinen Verbesserungen.)
Zeile 1: Zeile 1:
<noinclude>{{Documentation}}
+
<noinclude>'''See [[Template:Key Start/doc| Key Start-Doc]] for the main documentation, [[Template:Lead/doc| Lead-Doc]] for recent technical changes of the Lead-templates.'''
 +
 
 +
[[Category:Single-access key templates]]
 +
 
 +
 
 
[[Category:Single-access key templates]]
 
[[Category:Single-access key templates]]
 
</noinclude><includeonly><!--
 
</noinclude><includeonly><!--
 
// PART 0. Semantic properties and hidden category for SMW forms
 
// PART 0. Semantic properties and hidden category for SMW forms
 
-->{{#switch: {{CONTENTLANGUAGE}}<!--
 
-->{{#switch: {{CONTENTLANGUAGE}}<!--
 +
 +
// German: Deutschsprachige Attribute
 
-->|de|de-formal=[[Category:Schlüssel mit Lead-Vorlage]]<!-- Hidden cat for SMW form!
 
-->|de|de-formal=[[Category:Schlüssel mit Lead-Vorlage]]<!-- Hidden cat for SMW form!
 +
 +
  -->{{#if: {{{commonnames}}}<!--
 +
  THEN-->|{{#arraymap: {{{commonnames}}}<!-- values
 +
    -->|,<!-- split on ,
 +
    -->|§<!-- assign temporary variable
 +
    -->|[[Deutscher Name::§| ]]<!-- output
 +
    -->|<!-- new output separator
 +
    -->}}<!--
 +
  END -->}}{{
 +
 
 +
  #if: {{{synonyms}}}<!--
 +
  THEN-->| [[Synonymliste:: {{StripFormatting |{{{synonyms}}}}}| ]]<!--
 +
  END -->}}{{
 +
 
 +
  #if: {{{scientificname}}}<!--
 +
  THEN-->|[[Wissenschaftlicher Name::{{StripFormatting | {{{scientificname}}}}}| ]]<!--
 +
  END -->}}<!--
 +
 +
// English properties
 
-->| #default =[[Category:Keys based on lead template]]<!-- Hidden cat for SWM form!
 
-->| #default =[[Category:Keys based on lead template]]<!-- Hidden cat for SWM form!
 +
 +
! ENGLISH SEMANTIC PROPERTIES NOT YET DEFINED
 +
 +
// PART 0, END switch CONTENTLANGUAGE
 
-->}}<!--  
 
-->}}<!--  
 +
  
 
// PART 1. Manage spacer rows and subheadings above a lead row
 
// PART 1. Manage spacer rows and subheadings above a lead row
Zeile 15: Zeile 45:
 
       #if:{{{parentlead}}}<!-- THEN: indent 2 columns -->|<td></td><td></td>}}
 
       #if:{{{parentlead}}}<!-- THEN: indent 2 columns -->|<td></td><td></td>}}
 
       <td class="dt-nodeid">{{{displayID}}}</td><!--
 
       <td class="dt-nodeid">{{{displayID}}}</td><!--
// ELSE first lead:
+
// ELSE first lead; suppress spacer row for first couplet of key or nested subkeys
 
-->|{{#if: {{#ifeq: 0|{{#var: decisiontreePreviousCouplet}}|FIRSTCOUPLET|{{{parentlead}}}}}<!--
 
-->|{{#if: {{#ifeq: 0|{{#var: decisiontreePreviousCouplet}}|FIRSTCOUPLET|{{{parentlead}}}}}<!--
    // THEN: no spacer row before first couplet or nested subkeys
+
    -->|<!-- THEN nothing
      -->|<!-- // nothing
+
 
     // ELSE: insert spacer row
 
     // ELSE: insert spacer row
      -->|<tr class="dt-hspacer"><td colspan="6"></td></tr><!--
+
    -->|<tr class="dt-hspacer"><td colspan="6"></td></tr><!--
 
     -->}}{{
 
     -->}}{{
 
   #vardefine: decisiontreePreviousCouplet|{{{leadID}}}}}{{
 
   #vardefine: decisiontreePreviousCouplet|{{{leadID}}}}}{{
Zeile 37: Zeile 66:
 
       }}">{{{subheading}}}</td><!--
 
       }}">{{{subheading}}}</td><!--
 
   --></tr><!--
 
   --></tr><!--
   --><tr class="dt-hspacer"><td></td></tr><!--
+
   --><tr class="dt-hspacer"><td colspan="6"></td></tr><!--
 
   // END subheading:
 
   // END subheading:
 
   -->}}<!--
 
   -->}}<!--
Zeile 55: Zeile 84:
 
--><td class="lead-row1" {{#if: {{{parentlead}}}||colspan="3"}}><!--
 
--><td class="lead-row1" {{#if: {{{parentlead}}}||colspan="3"}}><!--
 
   --><table class="nested" width="100%" cellspacing="0" cellpadding="0"><tr><!--
 
   --><table class="nested" width="100%" cellspacing="0" cellpadding="0"><tr><!--
     --><td class="leadtxt{{#if:{{{next}}}|<nowiki></nowiki> leadon}}" width="95%"><!--
+
     --><td class="leadtxt {{#if:{{{next}}}|leadon}}" width="95%"><!--
 
     --><span class="leadspan">{{Trim|1={{{statement}}}}}&nbsp;</span><!--
 
     --><span class="leadspan">{{Trim|1={{{statement}}}}}&nbsp;</span><!--
 
     // Add mw-collapsible span (the "more…")
 
     // Add mw-collapsible span (the "more…")
Zeile 67: Zeile 96:
 
     }}</td>{{
 
     }}</td>{{
 
     #if:{{{resulttext}}}{{{nested}}}<!--
 
     #if:{{{resulttext}}}{{{nested}}}<!--
     // THEN New-Row-For-Results
+
     // THEN New-Row-For-Results. Leaderdots for next, but not if also result is present!
 
     -->|</tr><tr><!--
 
     -->|</tr><tr><!--
     --><td class="leadresult{{#if: {{{next}}} |<!-- no leaderdots if result-something -->{{#if: {{{resulttext}}}{{{commonnames}}} | |<nowiki></nowiki> leadon}}}}" colspan="2"><!--
+
     --><td class="leadresult {{#if: {{{next}}} |{{#if: {{{resulttext}}}{{{commonnames}}} | |leadon}}}}" colspan="2"><!--
  
 
     // BACKGROUND OLD/NEW RESULTSTYLE:
 
     // BACKGROUND OLD/NEW RESULTSTYLE:
Zeile 99: Zeile 128:
 
     // resulttext = one of resulttextoverride, scientificname, or resultlink itself.
 
     // resulttext = one of resulttextoverride, scientificname, or resultlink itself.
 
     // resulttext and qualifier need white background and (if together <40 char) a common nowrap:
 
     // resulttext and qualifier need white background and (if together <40 char) a common nowrap:
     --><span class="leadresults{{#ifexpr:{{#len:{{{resulttext}}}{{{resultqualifier}}} }} < 40|<nowiki> </nowiki>nowrap}}"><!--
+
     --><span class="leadresults {{#ifexpr:{{#len:{{{resulttext}}}{{{resultqualifier}}} }} < 40|nowrap}}"><!--
     --><span class="leadout{{#ifexpr:{{#len:{{{resulttext}}} }} < 40|<nowiki> </nowiki>nowrap}}">&nbsp;&nbsp;{{
+
     --><span class="leadout {{#ifexpr:{{#len:{{{resulttext}}} }} < 40|nowrap}}">&nbsp;&nbsp;{{
 
     #ifeq: {{#sub: {{{resultlink}}}|0|5}}|http:<!--
 
     #ifeq: {{#sub: {{{resultlink}}}|0|5}}|http:<!--
 
     // THEN http-link:
 
     // THEN http-link:
Zeile 118: Zeile 147:
 
     -->{{#if: {{{resultqualifier}}}<!--
 
     -->{{#if: {{{resultqualifier}}}<!--
 
       // THEN (start with wrappable blank, NOT a br-if-image-sidebar present: res.qual. may just be "L.")
 
       // THEN (start with wrappable blank, NOT a br-if-image-sidebar present: res.qual. may just be "L.")
       -->|<nowiki> </nowiki><span class="resultqualifier{{#ifexpr:{{#len:{{{resultqualifier}}} }} < 40|<nowiki> </nowiki>nowrap}}"> {{{resultqualifier}}}</span><!--
+
       -->|<nowiki></nowiki> <span class="resultqualifier {{#ifexpr:{{#len:{{{resultqualifier}}} }} < 40|nowrap}}"> {{{resultqualifier}}}</span><!--
 
     // END (res.qual.)
 
     // END (res.qual.)
 
     -->}}<!--
 
     -->}}<!--
Zeile 179: Zeile 208:
 
--></table><!--
 
--></table><!--
  
// PART 5: Always-on images (image j/k) below lead statement and result:
+
// PART 5: Large, always-visibly image j/k (not collapsed) below lead statement and result:
 
-->{{#if:{{{image j}}}{{{image k}}}<!--
 
-->{{#if:{{{image j}}}{{{image k}}}<!--
-->|<table class="nested"><tr style="vertical-align:top;"><td><!--
+
-->|<table class="nested"><tr style="vertical-align:top;"><td><!--
 
-->{{#if: {{{image j}}}<!--
 
-->{{#if: {{{image j}}}<!--
   -->|<!--
+
   -->|<div style="padding:1em 1em 1em 0;float:left;width:{{#expr: {{Pixel2Number|{{{image j width}}}}}+15}}px;">[[{{Trim| {{{image j}}} }} |none|{{Pixel2Number|{{{image j width}}}}}x{{Pixel2Number|{{{image j height}}}}}px]]<!--
    --><div style="padding:1em 1em 1em 0;float:left;width:{{#expr: {{Pixel2Number|{{{image j width}}}}}+15}}px;">[[{{Trim| {{{image j}}} }} |none|{{Pixel2Number|{{{image j width}}}}}x{{Pixel2Number|{{{image j height}}}}}px]]<!--
+
 
     -->{{#if: {{{label j}}}|'''{{{label j}}}: '''}}{{{caption j}}}<!--
 
     -->{{#if: {{{label j}}}|'''{{{label j}}}: '''}}{{{caption j}}}<!--
 
     --></div><!--
 
     --></div><!--
 
-->}}<!--
 
-->}}<!--
 
-->{{#if: {{{image k}}}<!--
 
-->{{#if: {{{image k}}}<!--
   -->|<!--
+
   -->|<div style="padding:1em 1em 1em 0;float:left;width:{{#expr: {{Pixel2Number|{{{image j width}}}}}+15}}px;">[[{{Trim| {{{image k}}} }} |none|{{Pixel2Number|{{{image k width}}}}}x{{Pixel2Number|{{{image k height}}}}}px]]<!--
    --><div style="padding:1em 1em 1em 0;float:left;width:{{#expr: {{Pixel2Number|{{{image j width}}}}}+15}}px;">[[{{Trim| {{{image k}}} }} |none|{{Pixel2Number|{{{image k width}}}}}x{{Pixel2Number|{{{image k height}}}}}px]]<!--
+
 
     -->{{#if: {{{label k}}}|'''{{{label k}}}: '''}}{{{caption k}}}<!--
 
     -->{{#if: {{{label k}}}|'''{{{label k}}}: '''}}{{{caption k}}}<!--
 
     --></div><!--
 
     --></div><!--

Version vom 4. September 2012, 18:10 Uhr

See Key Start-Doc for the main documentation, Lead-Doc for recent technical changes of the Lead-templates.

Quelle: Offene Naturführer, Das Wiki zu Bestimmungsfragen: Vorlage:Lead/Inner. Abgerufen am 2. Juni 2025, 01:41 von https://offene-naturfuehrer.de/web/Vorlage:Lead/Inner