Vorlage:Lead/Inner: Unterschied zwischen den Versionen
Aus Offene Naturführer
(rollback) |
|||
Zeile 25: | Zeile 25: | ||
// PART 0, END switch CONTENTLANGUAGE | // PART 0, END switch CONTENTLANGUAGE | ||
-->}}<!-- | -->}}<!-- | ||
+ | |||
+ | TODO: combine the two occurrences of class="dt-nodeid etc. at the end of the if/else clause!!!!!!!! | ||
// PART 1. Spacer rows and subheadings above a lead row | // PART 1. Spacer rows and subheadings above a lead row | ||
− | -->{{#ifeq: {{{ | + | -->{{#ifeq: {{{coupletID}}}|{{#var: decisiontreePreviousCouplet}}<!-- |
// 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="{{{IDprefix}}}{{{ | + | --><tr id="{{{IDprefix}}}{{{coupletID}}}_{{#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">{{{ | + | <td class="dt-nodeid">{{#ifeq:{{{withinCoupletID}}}|–|–|{{{coupletID}}}}}</td><!-- |
// ELSE first lead; suppress spacer row for first couplet of key or nested subkeys | // ELSE first lead; suppress spacer row for first couplet of key or nested subkeys | ||
-->|{{#if: {{#ifeq: 0|{{#var: decisiontreePreviousCouplet}}|FIRSTCOUPLET|{{{parentlead}}}}}<!-- | -->|{{#if: {{#ifeq: 0|{{#var: decisiontreePreviousCouplet}}|FIRSTCOUPLET|{{{parentlead}}}}}<!-- | ||
Zeile 39: | Zeile 41: | ||
-->|<tr class="dt-hspacer"><td colspan="6"></td></tr><!-- | -->|<tr class="dt-hspacer"><td colspan="6"></td></tr><!-- | ||
-->}}{{ | -->}}{{ | ||
− | #vardefine: decisiontreePreviousCouplet|{{{ | + | #vardefine: decisiontreePreviousCouplet|{{{coupletID}}}}}{{ |
#vardefine: decisiontreeAlternative|1}}{{ | #vardefine: decisiontreeAlternative|1}}{{ | ||
#if: {{{subheading}}}<!-- | #if: {{{subheading}}}<!-- | ||
Zeile 58: | Zeile 60: | ||
-->}}<!-- | -->}}<!-- | ||
// Next column is lead id for first alternative. | // Next column is lead id for first alternative. | ||
− | --><tr id="{{{IDprefix}}}{{{ | + | --><tr id="{{{IDprefix}}}{{{coupletID}}}_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="{{{IDprefix}}}{{{ | + | <td id="{{{IDprefix}}}{{{coupletID}}}" class="dt-nodeid">{{#ifeq:{{{withinCoupletID}}}|–|–|{{{coupletID}}}}}</td><!-- |
// END PART 1, Spacer rows and subheadings above a lead row | // END PART 1, Spacer rows and subheadings above a lead row | ||
-->}}<!-- | -->}}<!-- | ||
// PART 2. Prepare lead core. | // PART 2. Prepare lead core. | ||
− | // 2nd column contains either | + | // 2nd column contains either withinCoupletID = lead-differentiators (*, ', -, etc.) or backlink previous couplet. Both may be empty! |
− | + | --><td class="leadalt">{{#ifeq:{{{withinCoupletID}}}|–||{{{withinCoupletID}}}}}{{#if:{{{leadIDbacklink}}}| [[#{{{IDprefix}}}{{{leadIDbacklink}}}|({{{leadIDbacklink}}})]]}}</td><!-- | |
− | --><td class="leadalt">{{{ | + | |
// 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 | ||
Zeile 75: | Zeile 76: | ||
--><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}}}{{{ | + | -->{{#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 87: | Zeile 88: | ||
-->|</tr><tr><td class="leadresult {{#if: {{{next}}} |{{#if: {{{resulttext}}}{{{commonnames}}} | |leadon}}}}" colspan="2"><!-- | -->|</tr><tr><td class="leadresult {{#if: {{{next}}} |{{#if: {{{resulttext}}}{{{commonnames}}} | |leadon}}}}" 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}}}<!-- | ||
− | -->|<span class="leadon"> [[#{{{IDprefix}}}{{ | + | -->|<span class="leadon"> [[#{{{IDprefix}}}{{{leadIDnoBacklink}}}{{{nested}}}| ▼▼ {{{nested}}}]] – </span><!-- |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
// END if nested: | // END if nested: | ||
-->}}<!-- | -->}}<!-- | ||
Zeile 159: | Zeile 154: | ||
// 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-{{{IDprefix}}}{{{ | + | --><div class="mw-collapsible mw-collapsed mw-collapsible-content leadextras" id="mw-customcollapsible-{{{IDprefix}}}{{{coupletID}}}_{{#var:decisiontreeAlternative}}row"><!-- |
-->{{{detailtext}}}<!-- | -->{{{detailtext}}}<!-- | ||
-->{{#if: {{{image m}}}<!-- | -->{{#if: {{{image m}}}<!-- |
Version vom 21. September 2012, 21:25 Uhr
See Key Start-Doc for the main documentation, Lead-Doc for recent technical changes of the Lead-templates.