Vorlage:Lead/Inner: Unterschied zwischen den Versionen
Aus Offene Naturführer
K (attempt to fix table-layout: fixed → try giving widths in % on all td) |
K (fix syntax) |
||
Zeile 71: | Zeile 71: | ||
--><td class="lead-row1" {{#if: {{{parentlead}}}|width="95%"<!-- needed on table-layout: fixed -->|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}}}}} </span><!-- | --><span class="leadspan">{{Trim|1={{{statement}}}}} </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)! | ||
Zeile 99: | 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: | + | // 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: | + | -->|{{#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: | + | -->|{{#vardefine: OtherNames|{{{commonnames}}}<!---->}}<!-- |
// END resulttextoverride: | // END resulttextoverride: | ||
-->}}<!-- // END NEW/OLD: rest is identical | -->}}<!-- // END NEW/OLD: rest is identical | ||
− | // Output the | + | // Output the OtherNames variable if filled. No additional space after ndash! |
// ##DEBUG## ABOVE WAS: {{#if: {{{resulttext}}} | –| }}</span> // OK WITHOUT? | // ##DEBUG## ABOVE WAS: {{#if: {{{resulttext}}} | –| }}</span> // OK WITHOUT? | ||
− | -->{{#if: {{#var: | + | -->{{#if: {{#var: OtherNames}}<!-- |
− | -->|<span class="commonnames"> {{Lead/MakeCommaBreakingList | listtext={{#var: | + | -->|<span class="commonnames"> {{Lead/MakeCommaBreakingList | listtext={{#var:OtherNames}} }} –</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="leadout {{#ifexpr:{{#len:{{{resulttext}}} }} < 40|nowrap}}"> {{ | --><span class="leadout {{#ifexpr:{{#len:{{{resulttext}}} }} < 40|nowrap}}"> {{ | ||
#ifeq: {{#sub: {{{resultlink}}}|0|5}}|http:<!-- | #ifeq: {{#sub: {{{resultlink}}}|0|5}}|http:<!-- | ||
Zeile 150: | 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"><!-- |
Version vom 22. April 2015, 13:18 Uhr
See Key Start-Doc for the main documentation, Lead-Doc for recent technical changes of the Lead-templates.