Vorlage:Lead/Inner: Unterschied zwischen den Versionen
Aus Offene Naturführer
(one div necessary for formatting (collapse works without...), div was present in earlier Lead templates as well) |
(very small optimizations) |
||
Zeile 89: | Zeile 89: | ||
// Third column is main statement text. Uses a nested table to allow for row-by-row variable col. width | // Third 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}}}||colspan="3"}}><!-- | ||
− | --><table class="nested" width="100%" cellspacing="0" cellpadding="0" | + | --><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=" | + | |
− | + | ||
--><span class="leadspan">{{Trim|1={{{statement}}}}} </span><!-- | --><span class="leadspan">{{Trim|1={{{statement}}}}} </span><!-- | ||
// add mw-collapsible mechanism | // add mw-collapsible mechanism | ||
-->{{#if: {{{detailtext}}}{{{image m}}} <!-- | -->{{#if: {{{detailtext}}}{{{image m}}} <!-- | ||
− | // THEN | + | // THEN create custom toggle-link for "more…" |
− | --><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><!-- | ||
Zeile 105: | Zeile 103: | ||
// depending on resultlink render plain text or link (to wiki taxon page or a dedicated subkey page): | // depending on resultlink render plain text or link (to wiki taxon page or a dedicated subkey page): | ||
− | -->{{#if:{{{resulttext | + | -->{{#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><!--empty, in other cases used for next-lead--></td></tr><tr><!-- | -->|<td><!--empty, in other cases used for next-lead--></td></tr><tr><!-- | ||
− | --><td class="leadresult{{#if: {{{next}}} |<!-- no leaderdots if result-something -->{{#if: {{{resulttext | + | --><td class="leadresult{{#if: {{{next}}} |<!-- no leaderdots if result-something -->{{#if: {{{resulttext}}}{{{commonnames}}} | |<nowiki></nowiki> leadon}}}}" colspan="2"><!-- |
// BACKGROUND OLD/NEW RESULTSTYLE: | // BACKGROUND OLD/NEW RESULTSTYLE: | ||
Zeile 141: | Zeile 139: | ||
-->|{{#if: {{{commonnames}}}<!-- | -->|{{#if: {{{commonnames}}}<!-- | ||
-->|<span class="commonnames"> {{Lead/MakeCommaBreakingList | listtext={{{commonnames}}} }}<!-- | -->|<span class="commonnames"> {{Lead/MakeCommaBreakingList | listtext={{{commonnames}}} }}<!-- | ||
− | -->{{#if: {{{resulttext | + | -->{{#if: {{{resulttext}}} | –| }}</span><!-- (no additional space after ndash!) |
-->}}<!-- | -->}}<!-- | ||
// Result text, result+next and qualifier need white background (and, if together < 40 char, a common nowrap): | // Result text, result+next and qualifier need white background (and, if together < 40 char, a common nowrap): | ||
Zeile 167: | Zeile 165: | ||
-->{{#if: {{{next}}}<!-- | -->{{#if: {{{next}}}<!-- | ||
// THEN NEXT-LEAD-POINTER-WITH-RESULT in addition to "resultlink": result+next-lead co-occur, e.g., | // THEN NEXT-LEAD-POINTER-WITH-RESULT in addition to "resultlink": result+next-lead co-occur, e.g., | ||
− | // for species-result where key continues with subspecies. Always new line, double triangle. | + | // for species-result where key continues with subspecies. Always new line, double triangle. |
− | + | -->|<br /><!-- | |
− | + | --><span class="leadon"> [[#L{{{keyID}}}_{{{parentlead}}}{{{next}}}| ►► {{{next}}}]]</span><!-- | |
// ELSE (no NEXT-LEAD-POINTER-WITH-RESULT) | // ELSE (no NEXT-LEAD-POINTER-WITH-RESULT) | ||
− | + | -->|{{#if:{{{nested}}}<!-- | |
// nested (= pointer to indented subkey with parentlead) in addition to next | // nested (= pointer to indented subkey with parentlead) in addition to next | ||
// Note: leadpart2 could be a backlink... | // Note: leadpart2 could be a backlink... | ||
// Note: leadpart2 may be a *, which is forbidden in @id; BUT: some step in mediawiki will convert "*" to ".2A" | // Note: leadpart2 may be a *, which is forbidden in @id; BUT: some step in mediawiki will convert "*" to ".2A" | ||
− | + | // THEN nested present | |
− | + | -->|<br /><!-- within-page-link: | |
− | + | --><span class="leadon"> [[#L{{{keyID}}}_{{{leadID}}}<!-- | |
− | + | -->{{#ifeq:{{#sub:{{{leadpart2}}}|0|1}}|[<!-- | |
− | + | -->|<!--THEN nothing | |
− | + | -->|<!--ELSE -->{{{leadpart2}}}<!-- | |
− | + | -->}}{{{nested}}}| ▼▼ {{{nested}}}]]<!-- | |
// close span.leadon:--></span><!-- | // close span.leadon:--></span><!-- | ||
// END if nested: | // END if nested: | ||
Zeile 197: | Zeile 195: | ||
--></tr><!-- | --></tr><!-- | ||
− | // PART 4. ADDITIONAL error, detailtext | + | // PART 4. ADDITIONAL = error, detailtext, image gallery m-r |
// 4 a) ERROR REPORTING: Any content in 4th and later unnamed parameters is an error. | // 4 a) ERROR REPORTING: Any content in 4th and later unnamed parameters is an error. | ||
-->{{#if: {{{errors}}}<!-- | -->{{#if: {{{errors}}}<!-- | ||
Zeile 207: | Zeile 205: | ||
// 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: {{{detailtext}}}{{{image m}}}<!-- | -->{{#if: {{{detailtext}}}{{{image m}}}<!-- | ||
− | // THEN -->|<tr><td class="leadextras" colspan="2"><!-- | + | // THEN |
+ | -->|<tr><td class="leadextras" colspan="2"><!-- | ||
--><div class="mw-collapsible mw-collapsed mw-collapsible-content leadextras" id="mw-customcollapsible-L{{{keyID}}}{{{leadID}}}{{#var:decisiontreeAlternative}}row"><!-- | --><div class="mw-collapsible mw-collapsed mw-collapsible-content leadextras" id="mw-customcollapsible-L{{{keyID}}}{{{leadID}}}{{#var:decisiontreeAlternative}}row"><!-- | ||
-->{{{detailtext}}}<!-- | -->{{{detailtext}}}<!-- |
Version vom 31. August 2012, 22:14 Uhr
[Erstellen]
Dokumentation der Vorlage