Vorlage:Lead/Inner: Unterschied zwischen den Versionen

Aus Offene Naturführer
Wechseln zu: Navigation, Suche
(test: leadon ALWAYS in statement row (even if result present). In this test it is shown in both positions.)
(first test of final version, next always in same row as statement, even if result present. Single/double triangles stay the same.)
Zeile 90: Zeile 90:
 
--><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}}}|<!-- but not if result present: -->{{#if: {{{resulttext}}}{{{commonnames}}} | |<nowiki></nowiki> leadon}} }}" {{#ifexpr: {{#len: {{{next}}} }} < 5 |width="95%"}}><!--
+
     --><td class="leadtxt{{#if:{{{next}}}|<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
Zeile 97: Zeile 97:
 
     -->|<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><!--
 
+
     // Second column in nested table = number of further leads. NEW: both with and without result in same row (it used to be below result)!
     // Second column in nested table is pointer to further leads and/or to a taxon/subkey result.
+
     // Single triangle for normal next, double triangle if also result occurs (result and continue), e.g. where a genus is result, but species in same key.
     // Both will be autolinked. "commonnames" is handled here as separate parameter to increase re-formatting options later on.
+
     --><td class="leadresult leadon">{{
     // resulttext has always text; resultlink may have text
+
    #if:{{{next}}}|<span class="leadon">&nbsp;[[#L{{{keyID}}}_{{{parentlead}}}{{{next}}}|&nbsp;►{{
 
+
      #if:{{{resulttext}}}|►}}&nbsp;{{{next}}}]]</span>
     // depending on resultlink render plain text or link (to wiki taxon page or a dedicated subkey page):
+
     }}</td><!--
 
     -->{{#if:{{{resulttext}}}{{{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><!--
+
     -->|</tr><tr><!--
    --><span class="leadon">&nbsp;[[#L{{{keyID}}}_{{{parentlead}}}{{{next}}}|&nbsp;►►&nbsp;{{{next}}}]]</span><!--
+
    empty, in other cases used for next-lead--></td></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}}} |<!-- no leaderdots if result-something -->{{#if: {{{resulttext}}}{{{commonnames}}} | |<nowiki></nowiki> leadon}}}}" colspan="2"><!--
  
Zeile 152: Zeile 150:
 
     // END if scientificname (new/old layout rules):
 
     // END if scientificname (new/old layout rules):
 
     -->}}<!--  
 
     -->}}<!--  
 
  
 
     // resultqualifier in all result-layout variants
 
     // resultqualifier in all result-layout variants
Zeile 163: Zeile 160:
 
     --></span><!--  
 
     --></span><!--  
  
 
+
     // NESTED-LEAD-POINTER in addition to result, all result-layout variants
     // NEXT/NESTED-LEAD-POINTER in addition to result, all result-layout variants
+
     -->{{#if:{{{nested}}}<!--
     -->{{#if: {{{next}}}<!--
+
       // nested (= pointer to indented subkey with parentlead) in addition to next
    // THEN NEXT-LEAD-POINTER-WITH-RESULT in addition to "resultlink": result+next-lead co-occur, e.g.,
+
      // Note: leadpart2 could be a backlink...
    //  for species-result where key continues with subspecies. Always new line, double triangle.
+
      // Note: leadpart2 may be a *, which is forbidden in @id; BUT: some step in mediawiki will convert "*" to ".2A"
       -->|<br /><!--
+
    // THEN nested present
      --><span class="leadon">&nbsp;[[#L{{{keyID}}}_{{{parentlead}}}{{{next}}}|&nbsp;►►&nbsp;{{{next}}}]]</span><!--
+
      -->|<br /><!-- within-page-link:
    // ELSE (no NEXT-LEAD-POINTER-WITH-RESULT)
+
      --><span class="leadon">&nbsp;[[#L{{{keyID}}}_{{{leadID}}}<!--
      -->|{{#if:{{{nested}}}<!--
+
      -->{{#ifeq:{{#sub:{{{leadpart2}}}|0|1}}|[<!--
          // nested (= pointer to indented subkey with parentlead) in addition to next
+
      -->|<!--THEN nothing
          // Note: leadpart2 could be a backlink...
+
      -->|<!--ELSE -->{{{leadpart2}}}<!--
          // Note: leadpart2 may be a *, which is forbidden in @id; BUT: some step in mediawiki will convert "*" to ".2A"
+
      -->}}{{{nested}}}|&nbsp;▼▼&nbsp;{{{nested}}}]]</span><!--
      // THEN nested present
+
    // END if nested:
        -->|<br /><!-- within-page-link:
+
        --><span class="leadon">&nbsp;[[#L{{{keyID}}}_{{{leadID}}}<!--
+
        -->{{#ifeq:{{#sub:{{{leadpart2}}}|0|1}}|[<!--
+
        -->|<!--THEN nothing
+
        -->|<!--ELSE -->{{{leadpart2}}}<!--
+
        -->}}{{{nested}}}|&nbsp;▼▼&nbsp;{{{nested}}}]]</span><!--
+
      // END if nested:
+
      -->}}<!--
+
    // END NEXT/NESTED-LEAD-POINTER
+
 
     -->}}<!--
 
     -->}}<!--
 
     --></td><!--
 
     --></td><!--
 
    
 
    
  // ELSE no new row, ONLY a NEXT-LEAD-POINTER, i.e. without a result or nested. This stays in the same row!
 
    -->|<td class="leadresult leadon"><!--
 
    --><span class="leadon">&nbsp;[[#L{{{keyID}}}_{{{parentlead}}}{{{next}}}|&nbsp;►&nbsp;{{{next}}}]]</span><!--
 
    --></td><!--
 
 
   // END New-Row-For-Results
 
   // END New-Row-For-Results
 
   -->}}<!--  
 
   -->}}<!--  

Version vom 2. September 2012, 01:02 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:41 von https://offene-naturfuehrer.de/web/Vorlage:Lead/Inner