Vorlage:Lead/Inner: Unterschied zwischen den Versionen

Aus Offene Naturführer
Wechseln zu: Navigation, Suche
(one div necessary for formatting (collapse works without...), div was present in earlier Lead templates as well)
(very small optimizations)
Zeile 89: Zeile 89:
 
// Third column is main statement text. Uses a nested table to allow for row-by-row variable col. width
 
// Third column is main statement text. Uses a nested table to allow for row-by-row variable col. width
 
--><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"><!--
+
   --><table class="nested" width="100%" cellspacing="0" cellpadding="0"><tr><!--
    --><tr><!--
+
     --><td class="leadtxt{{#if:{{{next}}}|<!-- but not if result present: -->{{#if: {{{resulttext}}}{{{commonnames}}} | |<nowiki></nowiki> leadon}} }}" {{#ifexpr: {{#len: {{{next}}} }} < 5 |width="95%"}}><!--
     --><td class="
+
    leadtxt{{#if:{{{next}}}|<!-- but not if result present: -->{{#if: {{{resulttext}}}{{{scientificname}}}{{{commonnames}}} | |<nowiki></nowiki> leadon}} }}" {{#ifexpr: {{#len: {{{next}}} }} < 5 |width="95%"}}><!--
+
 
     --><span class="leadspan">{{Trim|1={{{statement}}}}}&nbsp;</span><!--
 
     --><span class="leadspan">{{Trim|1={{{statement}}}}}&nbsp;</span><!--
 
     // add mw-collapsible mechanism
 
     // add mw-collapsible mechanism
 
     -->{{#if:  {{{detailtext}}}{{{image m}}} <!--
 
     -->{{#if:  {{{detailtext}}}{{{image m}}} <!--
     // THEN -->|<!-- create custom toggle-link for "more…"
+
     // THEN create custom toggle-link for "more…"
     --><span class="leadspan noprint mw-customtoggle-L{{{keyID}}}{{{leadID}}}{{#var:decisiontreeAlternative}}row"></span>}}<!--
+
     -->|<span class="leadspan noprint mw-customtoggle-L{{{keyID}}}{{{leadID}}}{{#var:decisiontreeAlternative}}row"></span>}}<!--
 
     --></td><!--
 
     --></td><!--
  
Zeile 105: Zeile 103:
  
 
     // depending on resultlink render plain text or link (to wiki taxon page or a dedicated subkey page):
 
     // depending on resultlink render plain text or link (to wiki taxon page or a dedicated subkey page):
     -->{{#if:{{{resulttext}}}{{{scientificname}}}{{{commonnames}}}{{{nested}}}<!--
+
     -->{{#if:{{{resulttext}}}{{{nested}}}<!--
 
     // THEN New-Row-For-Results (ELSE td with next in same row).
 
     // THEN New-Row-For-Results (ELSE td with next in same row).
 
     -->|<td><!--empty, in other cases used for next-lead--></td></tr><tr><!--
 
     -->|<td><!--empty, in other cases used for next-lead--></td></tr><tr><!--
     --><td class="leadresult{{#if: {{{next}}} |<!-- no leaderdots if result-something -->{{#if: {{{resulttext}}}{{{scientificname}}}{{{commonnames}}} | |<nowiki></nowiki> leadon}}}}" colspan="2"><!--
+
     --><td class="leadresult{{#if: {{{next}}} |<!-- no leaderdots if result-something -->{{#if: {{{resulttext}}}{{{commonnames}}} | |<nowiki></nowiki> leadon}}}}" colspan="2"><!--
  
 
     // BACKGROUND OLD/NEW RESULTSTYLE:
 
     // BACKGROUND OLD/NEW RESULTSTYLE:
Zeile 141: Zeile 139:
 
     -->|{{#if: {{{commonnames}}}<!--
 
     -->|{{#if: {{{commonnames}}}<!--
 
           -->|<span class="commonnames">&nbsp;{{Lead/MakeCommaBreakingList | listtext={{{commonnames}}} }}<!--
 
           -->|<span class="commonnames">&nbsp;{{Lead/MakeCommaBreakingList | listtext={{{commonnames}}} }}<!--
           -->{{#if: {{{resulttext}}}{{{scientificname}}} |&nbsp;&ndash;|&#32;}}</span><!-- (no additional space after ndash!)
+
           -->{{#if: {{{resulttext}}} |&nbsp;&ndash;|&#32;}}</span><!-- (no additional space after ndash!)
 
       -->}}<!--
 
       -->}}<!--
 
       // Result text, result+next and qualifier need white background (and, if together < 40 char, a common nowrap):
 
       // Result text, result+next and qualifier need white background (and, if together < 40 char, a common nowrap):
Zeile 167: Zeile 165:
 
     -->{{#if: {{{next}}}<!--
 
     -->{{#if: {{{next}}}<!--
 
     // THEN NEXT-LEAD-POINTER-WITH-RESULT in addition to "resultlink": result+next-lead co-occur, e.g.,
 
     // THEN NEXT-LEAD-POINTER-WITH-RESULT in addition to "resultlink": result+next-lead co-occur, e.g.,
     // for species-result where key continues with subspecies. Always new line, double triangle.
+
     //   for species-result where key continues with subspecies. Always new line, double triangle.
      -->|<br /><!--
+
      -->|<br /><!--
      --><span class="leadon">&nbsp;[[#L{{{keyID}}}_{{{parentlead}}}{{{next}}}|&nbsp;►►&nbsp;{{{next}}}]]</span><!--
+
      --><span class="leadon">&nbsp;[[#L{{{keyID}}}_{{{parentlead}}}{{{next}}}|&nbsp;►►&nbsp;{{{next}}}]]</span><!--
 
     // ELSE (no NEXT-LEAD-POINTER-WITH-RESULT)
 
     // ELSE (no NEXT-LEAD-POINTER-WITH-RESULT)
        -->|{{#if:{{{nested}}}<!--
+
      -->|{{#if:{{{nested}}}<!--
 
           // nested (= pointer to indented subkey with parentlead) in addition to next
 
           // nested (= pointer to indented subkey with parentlead) in addition to next
 
           // Note: leadpart2 could be a backlink...
 
           // Note: leadpart2 could be a backlink...
 
           // Note: leadpart2 may be a *, which is forbidden in @id; BUT: some step in mediawiki will convert "*" to ".2A"
 
           // Note: leadpart2 may be a *, which is forbidden in @id; BUT: some step in mediawiki will convert "*" to ".2A"
        // THEN nested present
+
      // THEN nested present
        -->|<br /><!-- within-page-link:
+
        -->|<br /><!-- within-page-link:
        --><span class="leadon">&nbsp;[[#L{{{keyID}}}_{{{leadID}}}<!--
+
        --><span class="leadon">&nbsp;[[#L{{{keyID}}}_{{{leadID}}}<!--
          -->{{#ifeq:{{#sub:{{{leadpart2}}}|0|1}}|[<!--
+
        -->{{#ifeq:{{#sub:{{{leadpart2}}}|0|1}}|[<!--
          -->|<!--THEN nothing
+
        -->|<!--THEN nothing
          -->|<!--ELSE -->{{{leadpart2}}}<!--
+
        -->|<!--ELSE -->{{{leadpart2}}}<!--
          -->}}{{{nested}}}|&nbsp;▼▼&nbsp;{{{nested}}}]]<!--       
+
        -->}}{{{nested}}}|&nbsp;▼▼&nbsp;{{{nested}}}]]<!--       
 
       // close span.leadon:--></span><!--
 
       // close span.leadon:--></span><!--
 
       // END if nested:
 
       // END if nested:
Zeile 197: Zeile 195:
 
   --></tr><!--
 
   --></tr><!--
  
// PART 4. ADDITIONAL error, detailtext or image gallery (m-r)
+
// PART 4. ADDITIONAL = error, detailtext, image gallery m-r
 
// 4 a) ERROR REPORTING: Any content in 4th and later unnamed parameters is an error.
 
// 4 a) ERROR REPORTING: Any content in 4th and later unnamed parameters is an error.
 
-->{{#if: {{{errors}}}<!--
 
-->{{#if: {{{errors}}}<!--
Zeile 207: Zeile 205:
 
// Wrappable gallery image m/caption m" to "image r/caption r" output below detailtext
 
// Wrappable gallery image m/caption m" to "image r/caption r" output below detailtext
 
-->{{#if: {{{detailtext}}}{{{image m}}}<!--
 
-->{{#if: {{{detailtext}}}{{{image m}}}<!--
// THEN -->|<tr><td class="leadextras" colspan="2"><!--
+
// THEN  
 +
-->|<tr><td class="leadextras" colspan="2"><!--
 
--><div class="mw-collapsible mw-collapsed mw-collapsible-content leadextras" id="mw-customcollapsible-L{{{keyID}}}{{{leadID}}}{{#var:decisiontreeAlternative}}row"><!--
 
--><div class="mw-collapsible mw-collapsed mw-collapsible-content leadextras" id="mw-customcollapsible-L{{{keyID}}}{{{leadID}}}{{#var:decisiontreeAlternative}}row"><!--
 
-->{{{detailtext}}}<!--
 
-->{{{detailtext}}}<!--

Version vom 31. August 2012, 22:14 Uhr

[Erstellen] Template-info.svg Dokumentation der Vorlage
Quelle: Offene Naturführer, Das Wiki zu Bestimmungsfragen: Vorlage:Lead/Inner. Abgerufen am 2. Juni 2025, 01:43 von https://offene-naturfuehrer.de/web/Vorlage:Lead/Inner