Vorlage:Lead/Inner: Unterschied zwischen den Versionen
Aus Offene Naturführer
(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.) |
(Minor simplification by combining the "L" plus keyID plus leadID already in calling Template:Lead) |
||
Zeile 11: | Zeile 11: | ||
// German: Deutschsprachige Attribute | // 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}}} | + | #if: {{{commonnames}}}|{{#arraymap: {{{commonnames}}}<!-- values |
− | + | ||
-->|,<!-- split on , | -->|,<!-- split on , | ||
-->|§<!-- assign temporary variable | -->|§<!-- assign temporary variable | ||
-->|[[Deutscher Name::§| ]]<!-- output | -->|[[Deutscher Name::§| ]]<!-- output | ||
-->|<!-- new output separator | -->|<!-- new output separator | ||
− | -->}} | + | -->}} }}{{ |
− | + | #if: {{{synonyms}}}|[[Synonymliste::{{StripFormatting |{{{synonyms}}}}}| ]]}}{{ | |
− | + | #if: {{{scientificname}}}|[[Wissenschaftlicher Name::{{StripFormatting | {{{scientificname}}}}}| ]]}}<!-- | |
− | #if: {{{synonyms}}} | + | |
− | + | ||
− | + | ||
− | + | ||
− | #if: {{{scientificname}}} | + | |
− | + | ||
− | + | ||
// English properties | // English properties | ||
Zeile 42: | Zeile 34: | ||
// THEN 2nd/3rd/etc lead in a couplet, normal start | // THEN 2nd/3rd/etc lead in a couplet, normal start | ||
-->|{{#vardefine: decisiontreeAlternative|{{#expr: {{#var: decisiontreeAlternative}}+1}}}}<!-- | -->|{{#vardefine: decisiontreeAlternative|{{#expr: {{#var: decisiontreeAlternative}}+1}}}}<!-- | ||
− | --><tr id=" | + | --><tr id="{{{leadID}}}_{{#var:decisiontreeAlternative}}_row" class="dt-row">{{ |
#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><!-- | ||
Zeile 70: | Zeile 62: | ||
-->}}<!-- | -->}}<!-- | ||
// Next column is lead id for first alternative. | // Next column is lead id for first alternative. | ||
− | --><tr id=" | + | --><tr id="{{{leadID}}}_row" class="dt-row">{{ |
#if:{{{parentlead}}}<!-- THEN: indent 2 columns -->|<td></td><td></td>}} | #if:{{{parentlead}}}<!-- THEN: indent 2 columns -->|<td></td><td></td>}} | ||
− | <td id=" | + | <td id="{{{leadID}}}" class="dt-nodeid">{{{displayID}}}</td><!-- |
// END PART 1, Manage spacer rows and subheadings above a lead row | // END PART 1, Manage spacer rows and subheadings above a lead row | ||
-->}}<!-- | -->}}<!-- | ||
Zeile 87: | Zeile 79: | ||
--><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- | + | -->{{#if: {{{detailspresent}}}|<span class="leadspan noprint mw-customtoggle-{{{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 = number of further leads. NEW: both with and without result in same row (it used to be below result)! | ||
Zeile 108: | Zeile 100: | ||
// 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) | ||
-->{{#if: {{{resulttextoverride}}}<!-- | -->{{#if: {{{resulttextoverride}}}<!-- | ||
− | |||
-->|{{#if: {{{scientificname}}}|<!-- | -->|{{#if: {{{scientificname}}}|<!-- | ||
− | // THEN: NEW LAYOUT RULES -> | + | // THEN: NEW LAYOUT RULES -> ignore commonnames+scientificname if resulttextoverride |
− | // ELSE:-> output common names | + | // ELSE:-> output common names even for resulttextoverride |
-->|{{#if: {{{commonnames}}}<!-- | -->|{{#if: {{{commonnames}}}<!-- | ||
-->|<span class="commonnames"> {{Lead/MakeCommaBreakingList | listtext={{{commonnames}}} }}<!-- | -->|<span class="commonnames"> {{Lead/MakeCommaBreakingList | listtext={{{commonnames}}} }}<!-- | ||
Zeile 158: | Zeile 149: | ||
-->{{#if:{{{nested}}}<!-- | -->{{#if:{{{nested}}}<!-- | ||
-->|<br /><!-- within-page-link: | -->|<br /><!-- within-page-link: | ||
− | --><span class="leadon"> [[# | + | --><span class="leadon"> [[#{{{leadID}}}<!-- |
-->{{#ifeq:{{#sub:{{{leadpart2}}}|0|1}}|[<!-- | -->{{#ifeq:{{#sub:{{{leadpart2}}}|0|1}}|[<!-- | ||
-->|<!--THEN nothing | -->|<!--THEN nothing | ||
Zeile 182: | Zeile 173: | ||
// THEN | // THEN | ||
-->|<tr><td class="leadextras" colspan="2"><!-- | -->|<tr><td class="leadextras" colspan="2"><!-- | ||
− | --><div class="mw-collapsible mw-collapsed mw-collapsible-content leadextras" id="mw-customcollapsible- | + | --><div class="mw-collapsible mw-collapsed mw-collapsible-content leadextras" id="mw-customcollapsible-{{{leadID}}}_{{#var:decisiontreeAlternative}}row"><!-- |
-->{{{detailtext}}}<!-- | -->{{{detailtext}}}<!-- | ||
-->{{#if: {{{image m}}}<!-- | -->{{#if: {{{image m}}}<!-- |
Version vom 5. September 2012, 19:05 Uhr
See Key Start-Doc for the main documentation, Lead-Doc for recent technical changes of the Lead-templates.