Zum Inhalt springen

Vorlage:Lead/Inner: Unterschied zwischen den Versionen

Aus Flora von Bayern
imported>Gregor Hagedorn
completing new lead-ID processing
 
imported>Andreas Plank
K fix width of CCS-fixed table layout 95% 5%
 
(3 dazwischenliegende Versionen von 2 Benutzern werden nicht angezeigt)
Zeile 12: Zeile 12:
     -->|,<!-- split on ,
     -->|,<!-- split on ,
     -->|§<!-- assign temporary variable
     -->|§<!-- assign temporary variable
     -->|[[Deutscher Name::§| ]]<!-- output
     -->|[[dwc:vernacularName::§| ]]<!-- output
     -->|<!-- new output separator
     -->|<!-- new output separator
     -->}} }}{{   
     -->}} }}{{   
   #if: {{{synonyms}}}|[[Synonymliste::{{StripFormatting |{{{synonyms}}}}}| ]]}}{{   
   #if: {{{synonyms}}}|[[Synonymliste::{{StripFormatting |{{{synonyms}}}}}| ]]}}{{   
   #if: {{{scientificname}}}|[[Wissenschaftlicher Name::{{StripFormatting | {{{scientificname}}}}}| ]]}}<!--
   #if: {{{scientificname}}}|[[dwc:scientificName::{{StripFormatting | {{{scientificname}}}}}| ]]}}<!--


// English properties
// English properties
Zeile 69: Zeile 69:


// 3rd column is main statement text. Uses a nested table to allow for row-by-row variable col. width
// 3rd 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}}}|width="95%"<!-- needed on table-layout: fixed -->|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}}}|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…")
     -->{{#if: {{{detailspresent}}}|<span class="leadspan noprint mw-customtoggle-{{{IDprefix}}}{{{coupletID}}}_{{#var:decisiontreeAlternative}}row"></span>}}<!--
     -->{{#if: {{{detailspresent|}}}|<span class="leadspan noprint mw-customtoggle-{{{IDprefix}}}{{{coupletID}}}_{{#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 = number of further leads. NEW: both with and without result in same row (it used to be below 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.
     // 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.
     -->{{  
     -->{{#if:{{{next|}}}<!-- fixed width 5%
    #if:{{{next}}}|<td class="leadresult leadon"><span class="leadon">&nbsp;[[#{{{IDprefix}}}{{{next}}}|&nbsp;►{{
then -->|<td class="leadresult leadon" width="5%"><span class="leadon">&nbsp;[[#{{{IDprefix}}}{{{next}}}|&nbsp;►<!--
      #if:{{{resulttext}}}|►}}&nbsp;{{{next}}}]]</span>|<td>
      -->{{#if:{{{resulttext}}}|►}}&nbsp;{{{next}}}]]</span><!--
    }}</td>{{
      --></td><!--
else -->|<td width="5%"></td>}}{{
     #if:{{{resulttext}}}{{{nested}}}<!--
     #if:{{{resulttext}}}{{{nested}}}<!--
     // THEN New-Row-For-Results. Leaderdots for next, but not if also result is present!
     // THEN New-Row-For-Results. Leaderdots for next, but not if also result is present!
     -->|</tr><tr><td class="leadresult {{#if: {{{next}}} |{{#if: {{{resulttext}}}{{{commonnames}}} | |leadon}}}}" colspan="2"><!--
     -->|</tr><tr><td class="leadresult {{#if: {{{next}}} |{{#if: {{{resulttext}}}{{{commonnames}}} | |leadon}}}}" width="100%" colspan="2"><!--
     // FIRST NESTED (= pointer to indented subkey with parentlead) in addition to result, all result-layout variants
     // FIRST NESTED (= pointer to indented subkey with parentlead) in addition to result, all result-layout variants
     -->{{#if:{{{nested}}}<!--
     -->{{#if:{{{nested}}}<!--
Zeile 98: Zeile 99:
     // See also schema at bottom of Template:Lead/doc
     // See also schema at bottom of Template:Lead/doc
     // TODO: introduce resultformat parameter later (= list of format options, allowing common name or scientific name to be first)
     // TODO: introduce resultformat parameter later (= list of format options, allowing common name or scientific name to be first)
     // Now using {{#var: OtherName}} = the gray name, presently the common name, optionally later a different one.
     // Now using {{#var: OtherNames}} = the gray name, presently the common name, optionally later a different one.
     -->{{#if: {{{resulttextoverride}}}<!--  
     -->{{#if: {{{resulttextoverride}}}<!--  
       // If scientificname exists then NEW STYLE → ignore commonnames+scientificname if resulttextoverride, ELSE OLD STYLE:-> output common names even for resulttextoverride
       // If scientificname exists then NEW STYLE → ignore commonnames+scientificname if resulttextoverride, ELSE OLD STYLE:-> output common names even for resulttextoverride
       -->|{{#if: {{{scientificname}}}|{{#vardefine: OtherName|}}|{{#vardefine: OtherName|{{{commonnames}}}}}}}<!-- // END if scientificname
       -->|{{#if: {{{scientificname}}}|{{#vardefine: OtherNames|}}|{{#vardefine: OtherNames|{{{commonnames}}}<!---->}}<!---->}}<!-- // END if scientificname
     // ELSE: no resulttextoverride, output commonnames for both OLD and NEW LAYOUT
     // ELSE: no resulttextoverride, output commonnames for both OLD and NEW LAYOUT
       -->|{{#vardefine: OtherName|{{{commonnames}}}}}<!--
       -->|{{#vardefine: OtherNames|{{{commonnames}}}<!---->}}<!--
     // END resulttextoverride:
     // END resulttextoverride:
     -->}}<!-- // END NEW/OLD: rest is identical
     -->}}<!-- // END NEW/OLD: rest is identical
     // Output the OtherName variable if filled. No additional space after ndash!
     // Output the OtherNames variable if filled. No additional space after ndash!
     //  ##DEBUG## ABOVE WAS: {{#if: {{{resulttext}}} |&nbsp;&ndash;|&#32;}}</span> // OK WITHOUT?
     //  ##DEBUG## ABOVE WAS: {{#if: {{{resulttext}}} |&nbsp;&ndash;|&#32;}}</span> // OK WITHOUT?
     -->{{#if: {{#var: OtherName}}<!--
     -->{{#if: {{#var: OtherNames}}<!--
         -->|<span class="commonnames">&nbsp;{{Lead/MakeCommaBreakingList | listtext={{#var:OtherName}} }}&nbsp;&nbsp;&ndash;</span><!--  
         -->|<span class="commonnames">&nbsp;{{Lead/MakeCommaBreakingList | listtext={{#var:OtherNames}} }}&nbsp;&nbsp;&ndash;</span><!--  
       -->}}<!--
       -->}}<!--
     // Now resulttext = one of resulttextoverride, scientificname, or resultlink itself.
     // Now 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|nowrap}}"><!--
  --><span class="leadresults {{#ifexpr:{{#len:{{{resulttext}}}{{{resultqualifier}}} }} < 40|nowrap}}"><!--
     --><span class="leadout {{#ifexpr:{{#len:{{{resulttext}}} }} < 40|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:<!--
Zeile 149: Zeile 150:
// occurrence + remarks; already combined in outer Lead template!
// occurrence + remarks; already combined in outer Lead template!
// 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: {{{detailspresent}}}<!--
-->{{#if: {{{detailspresent|}}}<!--
// THEN  
// THEN  
-->|<tr><td class="leadextras" colspan="2"><!--
-->|<tr><td class="leadextras" colspan="2"><!--

Aktuelle Version vom 22. April 2015, 13:17 Uhr

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