Vorlage:Event item: Unterschied zwischen den Versionen

Aus Open Source Ecology - Germany
Zur Navigation springen Zur Suche springen
(Test work around week input: “1,3”)
 
(2 dazwischenliegende Versionen desselben Benutzers werden nicht angezeigt)
Zeile 32: Zeile 32:
 
* [[mediawikiwiki:extension:Page Forms|extension:Page Forms]]
 
* [[mediawikiwiki:extension:Page Forms|extension:Page Forms]]
 
* [[mediawikiwiki:extension:Variables|extension:Variables]]
 
* [[mediawikiwiki:extension:Variables|extension:Variables]]
 +
* [[mediawikiwiki:extension:Arrays|extension:Arrays]]
  
 
Attribute
 
Attribute
Zeile 94: Zeile 95:
 
   }}
 
   }}
 
}}<!--  
 
}}<!--  
 +
    work around week input: “1,3” if present
 +
-->{{#if: {{#pos: {{{recurring week number|}}}|,}}| {{#arraydefine: week-number-array|{{{recurring week number|}}}|,}} }}<!--
 +
 
-->{{#vardefine: timeDiffEventEndMinusEventStart_UnixSeconds|{{#if: {{{end|}}}<!--  
 
-->{{#vardefine: timeDiffEventEndMinusEventStart_UnixSeconds|{{#if: {{{end|}}}<!--  
 
then-->| {{#expr:  {{#time: xNU | {{{end|}}} }} - {{#time: xNU | {{{start|}}} }} + 0 }}<!--  
 
then-->| {{#expr:  {{#time: xNU | {{{end|}}} }} - {{#time: xNU | {{{start|}}} }} + 0 }}<!--  
Zeile 124: Zeile 128:
 
   |week={{PLURAL:{{{recurring period|1}}}|jede Woche|alle {{{recurring period|1}}} Wochen}}
 
   |week={{PLURAL:{{{recurring period|1}}}|jede Woche|alle {{{recurring period|1}}} Wochen}}
 
   |month={{
 
   |month={{
   #ifexpr: {{#replace:{{{recurring week number|}}}|,|+}} + 0 > 0<!-- work around week input: “1,3”
+
   #ifexpr: <!-- check weeknumbers, work around week input: “1,3” if present
 +
  -->{{#if: {{#pos: {{{recurring week number|}}}|,}}<!--
 +
      then
 +
      -->|{{#arrayprint: week-number-array ||@ | abs @ +}}<!-- cumulate week numbers
 +
      else
 +
      -->|{{{recurring week number|}}} }}
 +
    + 0 > 0<!--  
 
   then positive week number within week
 
   then positive week number within week
     -->|an jedem {{#replace:{{{recurring week number|}}}|,|&#32;und&#32;}}. {{#time: l|{{{start|}}}}} im Monat<!--  
+
     -->|an jedem <!-- 1. oder 1. und 3. etc.
 +
      -->{{#if: {{#pos: {{{recurring week number|}}}|,}}<!--
 +
      then
 +
      -->|{{
 +
            #arrayprint: week-number-array
 +
            |
 +
            |@
 +
            |{{#switch: @|-1=letzten|-2=vor–letzten|-3=vor-vor–letzten|#default=@.}}
 +
            |print=pretty
 +
            }}<!--
 +
-->|{{{recurring week number|}}}.
 +
      }} <!--
 +
        Wochentag
 +
      -->{{#time: l|{{{start|}}}}} im Monat<!--  
 
   else 0==0 or < 0
 
   else 0==0 or < 0
 
     -->|{{
 
     -->|{{
     #ifexpr: {{{recurring week number|}}} + 0 < 0<!--  
+
     #ifexpr: {{{recurring week number|}}} + 0 < 0<!-- TODO  week input: “1,-1”
 
     then negative week number within week
 
     then negative week number within week
 
       -->|an jedem {{#switch:{{{recurring week number|}}}|-1=letzten|#default={{{recurring week number|}}}.–letzten}} {{#time: l|{{{start|}}}}} im Monat<!--  
 
       -->|an jedem {{#switch:{{{recurring week number|}}}|-1=letzten|#default={{{recurring week number|}}}.–letzten}} {{#time: l|{{{start|}}}}} im Monat<!--  
Zeile 182: Zeile 205:
 
-->| &nbsp;''bis:''&nbsp; {{
 
-->| &nbsp;''bis:''&nbsp; {{
 
     #ifeq: <!-- at the same day?
 
     #ifeq: <!-- at the same day?
   -->{{#explode:{{{start|}}}| }} | {{#explode:{{{end|}}}| }}<!--  
+
   -->{{#explode:{{#time: Y/m/d H:i |{{{start|}}}}}| }} | {{#explode:{{#time: Y/m/d H:i |{{{end|}}}}}| }}<!--  
 
   Then  
 
   Then  
 
   -->|{{#if: {{#pos:{{{end|}}}|:}}<!--  
 
   -->|{{#if: {{#pos:{{{end|}}}|:}}<!--  

Aktuelle Version vom 20. März 2021, 20:56 Uhr

Dies ist die Vorlage „Event item“. Sie hat folgende Vorlagenparameter (Pflichtparameter in fett und optionale normal):

{{Event item
|title=
|start=
|end=
|type=
|description=
|color=
|icon=
|coordinates=
|location=
|keywords=
|recurring type=
|recurring unit=
|recurring period=
|recurring week number=
|recurring start=
|recurring end=
|recurring limit=
|recurring include datetimes=
|recurring exclude datetimes=
}}

Technische Abhängigkeiten

Erweiterungen

Attribute

Vorlagen/Formulare:

Dateien:

Layout:

  • CSS-Klassen booktable, vertical-align-top

Klick auf „Bearbeiten“, um den Quelltext der Vorlage anzusehen.