Aktionen

Modul

Folge: Unterschied zwischen den Versionen

Aus Bohnenwiki

Zeile 1: Zeile 1:
Folge = {}
+
p = {}
 +
Tabelle = require( "Modul:Tabelle" )
  
function Folge.Nr(frame)
+
function p.Zeile(frame)
 
local Nummer = frame.args.Nr
 
local Nummer = frame.args.Nr
 
local Nummer_Richtung = frame.args.Nr_Align
 
local Nummer_Richtung = frame.args.Nr_Align
local Nummer_Farbe = frame.args.Nr_Color
+
local Nummer_Farbe = frame.args.Nr_Color  
local Nummer_Colspan = frame.args.Nr_Colspan
 
 
local align = " "
 
local bg_color = " "
 
local span = " "
 
 
Nummer_Spalte = " "
 
 
if Nummer_Richtung == "{{{Nr_Richtung}}}" then align = "| align=\"left\" "
 
elseif Nummer_Richtung == "center"
 
then align = "| align=\"center\" "
 
elseif Nummer_Richtung == "right"
 
then align = "| align=\"right\" "
 
elseif Nummer_Richtung == "left"
 
then align = "| align=\"left\" "
 
else
 
align = "| align=\"center\" "
 
end
 
 
if Nummer_Farbe == "{{{Nr_Color}}}"
 
then bg_color = "style=\"background: #ececec \"| "
 
elseif Nummer_Farbe == nil
 
then bg_color = "style=\"background: #ececec \"| "
 
else 
 
bg_color = "style=\"background: " .. Nummer_Farbe .. " \"| "
 
end
 
 
if Nummer_Colspan == "{{{Nr_Colspan}}}"
 
then span = " colspan=\"1\" "
 
elseif Nummer_Colspan == nil
 
then span = " colspan=\"1\" "
 
else 
 
span = "\" colspan=\"" .. Nummer_Colspan .. "\" "
 
end
 
 
if Nummer == "{{{Nr}}}"
 
then Nummer_Spalte = " "
 
else
 
Nummer_Spalte = align .. span .. bg_color .. Nummer
 
end
 
        return Nummer_Spalte
 
 
 
end
 
 
 
function Folge.Thema(frame)
 
 
local Thema = frame.args.Thema
 
local Thema = frame.args.Thema
 
local Thema_Richtung = frame.args.Thema_Align
 
local Thema_Richtung = frame.args.Thema_Align
local Thema_Farbe = frame.args.Thema_Color
+
local Thema_Farbe = frame.args.Thema_Color  
local Thema_Colspan = frame.args.Thema_Colspan
+
local Moderator = frame.args.Moderatoren
+
local Moderator_Richtung = frame.args.Moderatoren_Align
local align = " "
+
local Moderator_Farbe = frame.args.Moderatoren_Color
local bg_color = " "
 
local span = " "
 
 
Thema_Spalte = " "
 
 
if Thema_Richtung == "{{{Thema_Richtung}}}" then align = "| align=\"left\" "
 
elseif Thema_Richtung == "center"
 
then align = "| align=\"center\" "
 
elseif Thema_Richtung == "right"
 
then align = "| align=\"right\" "
 
elseif Thema_Richtung == "left"
 
then align = "| align=\"left\" "
 
else
 
align = "| align=\"left\" "
 
end
 
 
if Thema_Farbe == "{{{Thema_Color}}}"
 
then bg_color = "style=\"background: #ececec \"| "
 
elseif Thema_Farbe == nil
 
then bg_color = "style=\"background: #ececec \"| "
 
else 
 
bg_color = "style=\"background: " .. Thema_Farbe .. " \"| "
 
end
 
 
if Thema_Colspan == "{{{Nr_Colspan}}}"
 
then span = " colspan=\"1\" "
 
elseif Thema_Colspan == nil
 
then span = " colspan=\"1\" "
 
else 
 
span = "\" colspan=\"" .. Thema_Colspan .. "\" "
 
end
 
 
if Thema == "{{{Thema}}}"
 
then Thema_Spalte = ""
 
else
 
Thema_Spalte = align .. span .. bg_color .. Thema
 
end
 
        return Thema_Spalte
 
 
 
end
 
 
 
function Folge.Moderator(frame)
 
local Moderator = frame.args.Moderator
 
local Moderator_Richtung = frame.args.Moderator_Align
 
local Moderator_Farbe = frame.args.Moderator_Color
 
local Moderator_Colspan = frame.args.Moderator_Colspan
 
 
local align = " "
 
local bg_color = " "
 
local span = " "
 
 
Moderator_Spalte = " "
 
 
if Moderator_Richtung == "{{{Moderator_Richtung}}}" then align = "| align=\"left\" "
 
elseif Moderator_Richtung == "center"
 
then align = "| align=\"center\" "
 
elseif Moderator_Richtung == "right"
 
then align = "| align=\"right\" "
 
elseif Moderator_Richtung == "left"
 
then align = "| align=\"left\" "
 
else
 
align = "| align=\"left\" "
 
end
 
 
if Moderator_Farbe == "{{{Moderator_Color}}}"
 
then bg_color = "style=\"background: #ececec \"| "
 
elseif Moderator_Farbe == nil
 
then bg_color = "style=\"background: #ececec \"| "
 
else 
 
bg_color = "style=\"background: " .. Moderator_Farbe .. " \"| "
 
end
 
 
if Moderator_Colspan == "{{{Moderator_Colspan}}}"
 
then span = " colspan=\"1\" "
 
elseif Moderator_Colspan == nil
 
then span = " colspan=\"1\" "
 
else 
 
span = "\" colspan=\"" .. Moderator_Colspan .. "\" "
 
end
 
 
if Moderator == "{{{Moderator}}}"
 
then Moderator_Spalte = " "
 
else
 
Moderator_Spalte = align .. span .. bg_color .. Moderator
 
end
 
        return Moderator_Spalte
 
 
 
end
 
 
 
function Folge.Gaeste(frame)
 
 
local Gaeste = frame.args.Gaeste
 
local Gaeste = frame.args.Gaeste
 
local Gaeste_Richtung = frame.args.Gaeste_Align
 
local Gaeste_Richtung = frame.args.Gaeste_Align
local Gaeste_Farbe = frame.args.Gaeste_Color
+
local Gaeste_Farbe = frame.args.Gaeste_Color  
local Gaeste_Colspan = frame.args.Gaeste_Colspan
+
local Datum = frame.args.Datum
+
local Datum_Richtung = frame.args.Datum_Align
local align = " "
+
local Datum_Farbe = frame.args.Datum_Color
local bg_color = " "
 
local span = " "
 
 
Gaeste_Spalte = " "
 
 
if Gaeste_Richtung == "{{{Gaeste_Richtung}}}" then align = "| align=\"left\" "
 
elseif Gaeste_Richtung == "center"
 
then align = "| align=\"center\" "
 
elseif Gaeste_Richtung == "right"
 
then align = "| align=\"right\" "
 
elseif Gaeste_Richtung == "left"
 
then align = "| align=\"left\" "
 
else
 
align = "| align=\"left\" "
 
end
 
 
if Gaeste_Farbe == "{{{Gaeste_Color}}}"
 
then bg_color = "style=\"background: #ececec \"| "
 
elseif Gaeste_Farbe == nil
 
then bg_color = "style=\"background: #ececec \"| "
 
else 
 
bg_color = "style=\"background: " .. Gaeste_Farbe .. " \"| "
 
end
 
 
if Gaeste_Colspan == "{{{Gaeste_Colspan}}}"
 
then span = " colspan=\"1\" "
 
elseif Gaeste_Colspan == nil
 
then span = " colspan=\"1\" "
 
else 
 
span = "\" colspan=\"" .. Gaeste_Colspan .. "\" "
 
end
 
 
if Gaeste == "{{{Gaeste}}}"
 
then Gaeste_Spalte = " "
 
else
 
Gaeste_Spalte = align .. span .. bg_color .. Gaeste
 
end
 
        return Gaeste_Spalte
 
 
 
end
 
 
 
function Folge.Zuschauer(frame)
 
 
local Zuschauer = frame.args.Zuschauer
 
local Zuschauer = frame.args.Zuschauer
 
local Zuschauer_Richtung = frame.args.Zuschauer_Align
 
local Zuschauer_Richtung = frame.args.Zuschauer_Align
 
local Zuschauer_Farbe = frame.args.Zuschauer_Color
 
local Zuschauer_Farbe = frame.args.Zuschauer_Color
local Zuschauer_Colspan = frame.args.Zuschauer_Colspan
 
 
local align = " "
 
local bg_color = " "
 
local span = " "
 
 
Zuschauer_Spalte = " "
 
 
if Zuschauer_Richtung == "{{{Zuschauer_Richtung}}}" then align = "| align=\"left\" "
 
elseif Zuschauer_Richtung == "center"
 
then align = "| align=\"center\" "
 
elseif Zuschauer_Richtung == "right"
 
then align = "| align=\"right\" "
 
elseif Zuschauer_Richtung == "left"
 
then align = "| align=\"left\" "
 
else
 
align = "| align=\"right\" "
 
end
 
 
if Zuschauer_Farbe == "{{{Zuschauer_Color}}}"
 
then bg_color = "style=\"background: #ececec \"| "
 
elseif Zuschauer_Farbe == nil
 
then bg_color = "style=\"background: #ececec \"| "
 
else 
 
bg_color = "style=\"background: " .. Zuschauer_Farbe .. " \"| "
 
end
 
 
if Zuschauer_Colspan == "{{{Zuschauer_Colspan}}}"
 
then span = " colspan=\"1\" "
 
elseif Zuschauer_Colspan == nil
 
then span = " colspan=\"1\" "
 
else 
 
span = "\" colspan=\"" .. Zuschauer_Colspan .. "\" "
 
end
 
 
if Zuschauer == "{{{Zuschauer}}}"
 
then Zuschauer_Spalte = " "
 
else
 
Zuschauer_Spalte = align .. span .. bg_color .. Zuschauer
 
end
 
        return Zuschauer_Spalte
 
 
end
 
 
function Folge.VOD(frame)
 
 
local VOD = frame.args.VOD
 
local VOD = frame.args.VOD
 
local VOD_Richtung = frame.args.VOD_Align
 
local VOD_Richtung = frame.args.VOD_Align
local VOD_Farbe = frame.args.VOD_Color
+
local VOD_Farbe = frame.args.VOD_Color  
local VOD_Colspan = frame.args.VOD_Colspan
 
 
local align = " "
 
local bg_color = " "
 
local span = " "
 
 
VOD_Spalte = " "
 
 
if VOD_Richtung == "{{{VOD_Richtung}}}" then align = "| align=\"left\" "
 
elseif VOD_Richtung == "center"
 
then align = "| align=\"center\" "
 
elseif VOD_Richtung == "right"
 
then align = "| align=\"right\" "
 
elseif VOD_Richtung == "left"
 
then align = "| align=\"left\" "
 
else
 
align = "| align=\"center\" "
 
end
 
 
if VOD_Farbe == "{{{VOD_Color}}}"
 
then bg_color = "style=\"background: #ececec \"| "
 
elseif VOD_Farbe == nil
 
then bg_color = "style=\"background: #ececec \"| "
 
else 
 
bg_color = "style=\"background: " .. VOD_Farbe .. " \"| "
 
end
 
 
if VOD_Colspan == "{{{VOD_Colspan}}}"
 
then span = " colspan=\"1\" "
 
elseif VOD_Colspan == nil
 
then span = " colspan=\"1\" "
 
else 
 
span = "\" colspan=\"" .. VOD_Colspan .. "\" "
 
end
 
 
if VOD == "{{{VOD}}}"
 
then VOD_Spalte = " "
 
else
 
VOD_Spalte = align .. span .. bg_color .. VOD
 
end
 
        return VOD_Spalte
 
 
 
end
 
 
 
function Folge.Datum(frame)
 
local Datum = frame.args.Datum
 
local Datum_Richtung = frame.args.Datum_Align
 
local Datum_Farbe = frame.args.Datum_Color
 
local Datum_Colspan = frame.args.Datum_Colspan
 
 
local align = " "
 
local bg_color = " "
 
local span = " "
 
 
Datum_Spalte = " "
 
 
if Datum_Richtung == "{{{Datum_Richtung}}}" then align = "| align=\"left\" "
 
elseif Datum_Richtung == "center"
 
then align = "| align=\"center\" "
 
elseif Datum_Richtung == "right"
 
then align = "| align=\"right\" "
 
elseif Datum_Richtung == "left"
 
then align = "| align=\"left\" "
 
else
 
align = "| align=\"center\" "
 
end
 
 
if Datum_Farbe == "{{{Datum_Color}}}"
 
then bg_color = "style=\"background: #ececec \"| "
 
elseif Datum_Farbe == nil
 
then bg_color = "style=\"background: #ececec \"| "
 
else 
 
bg_color = "style=\"background: " .. Datum_Farbe .. " \"| "
 
end
 
 
if Datum_Colspan == "{{{Datum_Colspan}}}"
 
then span = " colspan=\"1\" "
 
elseif Datum_Colspan == nil
 
then span = " colspan=\"1\" "
 
else 
 
span = "\" colspan=\"" .. Datum_Colspan .. "\" "
 
end
 
 
if Datum == "{{{Datum}}}"
 
then Datum_Spalte = " "
 
else
 
Datum_Spalte = align .. span .. bg_color .. Datum
 
end
 
        return Datum_Spalte
 
 
 
end
 
 
 
 
 
function Folge.Inhalt(frame)
 
 
local Inhalt = frame.args.Inhalt
 
local Inhalt = frame.args.Inhalt
 
local Inhalt_Richtung = frame.args.Inhalt_Align
 
local Inhalt_Richtung = frame.args.Inhalt_Align
 
local Inhalt_Farbe = frame.args.Inhalt_Color
 
local Inhalt_Farbe = frame.args.Inhalt_Color
local span_Nr = frame.args.Nr
+
local Linie_Farbe = frame.args.Linie_Color
local span_Thema = frame.args.Thema
 
local span_Moderator = frame.args.Moderator
 
local span_Gaeste = frame.args.Gaeste
 
local span_Zuschauer = frame.args.Zuschauer
 
local span_VOD = frame.args.VOD
 
local span_Datum = frame.args.Datum
 
 
 
local align = " "
+
local Colons = 0 -- Spaltenzähler für Inhalt und Linie
local bg_color = " "
+
local Inhalt_Spalte
local span_zahl = 0
 
local span = " "
 
  
if span_Nr ~= nil or "{{{Nr}}}"
+
-- Spalte Nr
then span_zahl = span_zahl + 1
+
if Nummer == nil
 +
then Nummer_Zeile = ""
 +
            Nummer_Abstand = ""
 +
        elseif Nummer == ""
 +
then Nummer_Zeile = ""
 +
            Nummer_Abstand = ""
 +
        elseif Nummer == " "
 +
then Nummer_Zeile = ""
 +
            Nummer_Abstand = ""
 +
else
 +
Colons = Colons + 1
 +
if Nummer_Richtung == nil
 +
then Nummer_Richtung = "center"
 +
end
 +
if Nummer_Farbe == nil
 +
then Nummer_Farbe = "#ececec"
 +
end
 +
Nummer_Zeile = Tabelle.Spalte(Nummer , Nummer_Richtung , Nummer_Farbe , 1)
 +
if Thema == nil and Moderator == nil and Gaeste == nil and Zuschauer == nil and VOD == nil and Datum == nil  -- falls Nr die letzte Spalte ist
 +
then
 +
Nummer_Abstand = ""
 +
else
 +
Nummer_Abstand = " |"
 +
end
 
end
 
end
 
 
if span_Thema ~= nil or "{{{Thema}}}"
+
-- Spalte Thema
then span_zahl = span_zahl + 1
+
if Thema == nil
 +
then Thema_Zeile = ""
 +
            Thema_Abstand = ""
 +
        elseif Thema == ""
 +
then Thema_Zeile = ""
 +
            Thema_Abstand = ""
 +
        elseif Thema == " "
 +
then Thema_Zeile = ""
 +
            Thema_Abstand = ""
 +
else
 +
Colons = Colons + 1
 +
if Thema_Richtung == nil
 +
then Thema_Richtung = "left"
 +
end
 +
if Thema_Farbe == nil
 +
then Thema_Farbe = "#ececec"
 +
end
 +
Thema_Zeile = Tabelle.Spalte(Thema , Thema_Richtung , Thema_Farbe , 1)
 +
if Moderator == nil and Gaeste == nil and Datum == nil and Zuschauer == nil and VOD == nil
 +
then
 +
Thema_Abstand = ""
 +
else
 +
Thema_Abstand = " |"
 +
end
 
end
 
end
 
 
if span_Moderator ~= nil or "{{{Moderator}}}"
+
-- Spalte Moderator
then span_zahl = span_zahl + 1
+
if Moderator == nil
 +
then Moderator_Zeile = ""
 +
            Moderator_Abstand = ""
 +
        elseif Moderator == ""
 +
then Moderator_Zeile = ""
 +
            Moderator_Abstand = ""
 +
        elseif Moderator == " "
 +
then Moderator_Zeile = ""
 +
            Moderator_Abstand = ""
 +
else
 +
Colons = Colons + 1
 +
if Moderator_Richtung == nil
 +
then Moderator_Richtung = "left"
 +
end
 +
if Moderator_Farbe == nil
 +
then Moderator_Farbe = "#ececec"
 +
end
 +
Moderator_Zeile = Tabelle.Spalte(Moderator , Moderator_Richtung , Moderator_Farbe , 1)
 +
            Moderator_Abstand = "|"
 +
if Gaeste == nil and Datum == nil and Zuschauer == nil and VOD == nil
 +
then
 +
Moderator_Abstand = ""
 +
else
 +
Moderator_Abstand = " |"
 +
end
 
end
 
end
 
 
if span_Gaeste ~= nil or "{{{Gaeste}}}"
+
-- Spalte Gaeste
then span_zahl = span_zahl + 1
+
if Gaeste == nil
 +
then Gaeste_Zeile = ""
 +
            Gaeste_Abstand = ""
 +
        elseif Gaeste == ""
 +
then Gaeste_Zeile = ""
 +
            Gaeste_Abstand = ""
 +
        elseif Gaeste == " "
 +
then Gaeste_Zeile = ""
 +
            Gaeste_Abstand = ""
 +
else
 +
Colons = Colons + 1
 +
if Gaeste_Richtung == nil
 +
then Gaeste_Richtung = "left"
 +
end
 +
if Gaeste_Farbe == nil
 +
then Gaeste_Farbe = "#ececec"
 +
end
 +
Gaeste_Zeile = Tabelle.Spalte(Gaeste , Gaeste_Richtung , WertColor , Gaeste_Farbe)
 +
            Gaeste_Abstand = "|"
 +
if Datum == nil and Zuschauer == nil and VOD == nil
 +
then
 +
Gaeste_Abstand = ""
 +
else
 +
Gaeste_Abstand = " |"
 +
end
 
end
 
end
 
 
if span_Zuschauer ~= nil or "{{{Zuschauer}}}"
+
-- Spalte Datum
then span_zahl = span_zahl + 1
+
if Datum == nil
 +
then Datum_Zeile = ""
 +
            Datum_Abstand = ""
 +
        elseif Datum == ""
 +
then Datum_Zeile = ""
 +
            Datum_Abstand = ""
 +
        elseif Datum == " "
 +
then Datum_Zeile = ""
 +
            Datum_Abstand = ""
 +
else
 +
Colons = Colons + 1
 +
if Datum_Richtung == nil
 +
then Datum_Richtung = "center"
 +
end
 +
if Datum_Farbe == nil
 +
then Datum_Farbe = "#ececec"
 +
end
 +
Datum_Zeile = Tabelle.Spalte(Datum , Datum_Richtung , Datum_Farbe , 1)
 +
            Datum_Abstand = "|"
 +
if Zuschauer == nil and VOD == nil
 +
then
 +
Datum_Abstand = ""
 +
else
 +
Datum_Abstand = " |"
 +
end
 
end
 
end
 
 
if span_VOD ~= nil or "{{{VOD}}}"
+
-- Spalte Zuschauer
then span_zahl = span_zahl + 1
+
if Zuschauer == nil
end
+
then Zuschauer_Zeile = ""
+
            Zuschauer_Abstand = ""
if span_Datum ~= nil or "{{{Datum}}}"
+
        elseif Zuschauer == ""
then span_zahl = span_zahl + 1
+
then Zuschauer_Zeile = ""
 +
            Zuschauer_Abstand = ""
 +
        elseif Zuschauer == " "
 +
then Zuschauer_Zeile = ""
 +
            Zuschauer_Abstand = ""
 +
else
 +
Colons = Colons + 1
 +
if Zuschauer_Richtung == nil
 +
then Zuschauer_Richtung = "right"
 +
end
 +
if Zuschauer_Farbe == nil
 +
then Zuschauer_Farbe = "#ececec"
 +
end
 +
Zuschauer_Zeile = Tabelle.Spalte(Zuschauer , Zuschauer_Richtung , Zuschauer_Farbe , 1)
 +
            Zuschauer_Abstand = "|"
 +
if VOD == nil
 +
then
 +
Zuschauer_Abstand = ""
 +
else
 +
Zuschauer_Abstand = " |"
 +
end
 
end
 
end
 
 
 +
-- Spalte VOD
 +
if VOD == nil
 +
 +
then VOD_Zeile = ""
  
Inhalt_Spalte = " "
+
        elseif VOD == ""
+
then VOD_Zeile = ""
if Inhalt_Richtung == "{{{Inhalt_Richtung}}}" then align = "| align=\"left\" "
 
elseif Inhalt_Richtung == "center"
 
then align = "| align=\"center\" "
 
elseif Inhalt_Richtung == "right"
 
then align = "| align=\"right\" "
 
elseif Inhalt_Richtung == "left"
 
then align = "| align=\"left\" "
 
else
 
align = "| align=\"left\" "
 
end
 
 
if Inhalt_Farbe == "{{{Inhalt_Color}}}"
 
then bg_color = "style=\"background: #ececec \"| "
 
elseif Inhalt_Farbe == nil
 
then bg_color = "style=\"background: #ececec \"| "
 
else 
 
bg_color = "style=\"background: " .. Inhalt_Farbe .. " \"| "
 
end
 
 
 
span = "\" colspan=\"" .. span_zahl .. "\" "
 
 
if Inhalt == "{{{Inhalt}}}"
 
then Inhalt_Spalte = " "
 
else
 
Inhalt_Spalte = "|-\n" .. align .. span .. bg_color .. Inhalt
 
end
 
        return Inhalt_Spalte
 
  
end
+
        elseif VOD == " "
 +
then VOD_Zeile = ""
  
function Folge.Linie(frame)
+
else
local Linie_Farbe = frame.args.Linie_Color
+
Colons = Colons + 1
local span_Nr = frame.args.Nr
+
if VOD_Richtung == nil
local span_Thema = frame.args.Thema
+
then VOD_Richtung = "center"
local span_Moderator = frame.args.Moderator
+
end
local span_Gaeste = frame.args.Gaeste
+
if VOD_Farbe == nil
local span_Zuschauer = frame.args.Zuschauer
+
then VOD_Farbe = "#ececec"
local span_VOD = frame.args.VOD
+
end
local span_Datum = frame.args.Datum
+
VOD_Zeile = Tabelle.Spalte(VOD , VOD_Richtung , VOD_Farbe , 1)
 
local align = " "
 
local bg_color = " "
 
local span_zahl = 0
 
local span = " "
 
  
if span_Nr == nil
 
then span_zahl = span_zahl
 
          elseif span_Nr == "{{{Nr}}}"
 
then span_zahl = span_zahl
 
          else
 
span_zahl = span_zahl + 1
 
 
end
 
end
+
 
if span_Thema ~= nil or "{{{Thema}}}"
+
-- Neue Zeile Inhalt
then span_zahl = span_zahl + 1
+
if Inhalt == nil
 +
then Inhalt_Zeile = ""
 +
            VOD_Abstand = ""
 +
        elseif Inhalt == ""
 +
then Inhalt_Zeile = ""
 +
            VOD_Abstand = ""
 +
        elseif Inhalt == " "
 +
then Inhalt_Zeile = ""
 +
            VOD_Abstand = ""
 +
else
 +
 
 +
if Inhalt_Richtung == nil
 +
then Inhalt_Richtung = "left"
 +
end
 +
if Inhalt_Farbe == nil
 +
then Inhalt_Farbe = "#ececec"
 +
end
 +
Inhalt_Spalte = Tabelle.Spalte(Inhalt , Inhalt_Richtung , Inhalt_Farbe , Colons)
 +
            Inhalt_Zeile = "\n|-\n " .. Inhalt_Spalte
 +
            VOD_Abstand = "|"
 
end
 
end
 
 
if span_Moderator ~= nil or "{{{Moderator}}}"
+
-- Neue farbige Linie (funktioniert momentan nicht)
then span_zahl = span_zahl + 1
+
if Linie_Farbe == nil
end
+
then Linie_Zeile = ""
+
 
if span_Gaeste ~= nil or "{{{Gaeste}}}"
+
else
then span_zahl = span_zahl + 1
+
Linie_Spalte = Tabelle.Spalte(" " , "left" , Linie_Farbe , Colons)
end
+
            Linie_Zeile = "\n|-\n " .. Linie_Spalte
+
VOD_Abstand = "|"
if span_Zuschauer ~= nil or "{{{Zuschauer}}}"
 
then span_zahl = span_zahl + 1
 
end
 
 
if span_VOD ~= nil or "{{{VOD}}}"
 
then span_zahl = span_zahl + 1
 
end
 
 
if span_Datum ~= nil or "{{{Datum}}}"
 
then span_zahl = span_zahl + 1
 
end
 
 
Linie_Spalte = " "
 
 
if Linie_Farbe == "{{{Linie_Color}}}"
 
then bg_color = "style=\"background: #ececec \"| "
 
elseif Linie_Farbe == nil
 
then bg_color = "style=\"background: #ececec \"| "
 
else 
 
bg_color = "style=\"background: " .. Linie_Farbe .. " \"| "
 
 
end
 
end
 
 
span = "\" colspan=\"" .. span_zahl .. "\" "
 
 
 
if Linie_Farbe == "{{{Linie_Color}}}"
+
-- Alles zusammenfassen und zurückgeben
then Linie_Spalte = " "
+
Zeile = "|-\n " .. Nummer_Zeile .. Nummer_Abstand .. Thema_Zeile .. Thema_Abstand .. Moderator_Zeile .. Moderator_Abstand .. Gaeste_Zeile .. Gaeste_Abstand .. Datum_Zeile .. Datum_Abstand .. Zuschauer_Zeile .. Zuschauer_Abstand .. VOD_Zeile .. Inhalt_Zeile .. Linie_Zeile
else
+
return Zeile
Linie_Spalte = "|-\n" .. span .. bg_color .. " "
 
end
 
        return Linie_Spalte
 
 
 
 
end
 
end
  
 
+
return p
return Folge
 

Version vom 18. Juli 2015, 22:51 Uhr

LUA-Modul für die Vorlage:Folge/LUA


p = {}
Tabelle = require( "Modul:Tabelle" )

function p.Zeile(frame)
	local Nummer = frame.args.Nr
	local Nummer_Richtung = frame.args.Nr_Align
	local Nummer_Farbe = frame.args.Nr_Color 
	local Thema = frame.args.Thema
	local Thema_Richtung = frame.args.Thema_Align
	local Thema_Farbe = frame.args.Thema_Color 
	local Moderator = frame.args.Moderatoren
	local Moderator_Richtung = frame.args.Moderatoren_Align
	local Moderator_Farbe = frame.args.Moderatoren_Color
	local Gaeste = frame.args.Gaeste
	local Gaeste_Richtung = frame.args.Gaeste_Align
	local Gaeste_Farbe = frame.args.Gaeste_Color 
	local Datum = frame.args.Datum
	local Datum_Richtung = frame.args.Datum_Align
	local Datum_Farbe = frame.args.Datum_Color
	local Zuschauer = frame.args.Zuschauer
	local Zuschauer_Richtung = frame.args.Zuschauer_Align
	local Zuschauer_Farbe = frame.args.Zuschauer_Color
	local VOD = frame.args.VOD
	local VOD_Richtung = frame.args.VOD_Align
	local VOD_Farbe = frame.args.VOD_Color 
	local Inhalt = frame.args.Inhalt
	local Inhalt_Richtung = frame.args.Inhalt_Align
	local Inhalt_Farbe = frame.args.Inhalt_Color
	local Linie_Farbe = frame.args.Linie_Color
	
	local Colons = 0 -- Spaltenzähler für Inhalt und Linie
	local Inhalt_Spalte

	 -- Spalte Nr
	if Nummer == nil
		then Nummer_Zeile = "" 
             Nummer_Abstand = ""
        elseif Nummer == ""
		then Nummer_Zeile = ""
             Nummer_Abstand = ""
        elseif Nummer == " "
		then Nummer_Zeile = ""
             Nummer_Abstand = ""
		else
			Colons = Colons + 1
			if Nummer_Richtung == nil
				then Nummer_Richtung = "center"
			end
			if Nummer_Farbe == nil
				then Nummer_Farbe = "#ececec"
			end
			Nummer_Zeile = Tabelle.Spalte(Nummer , Nummer_Richtung , Nummer_Farbe , 1)
			if Thema == nil and Moderator == nil and Gaeste == nil and Zuschauer == nil and VOD == nil and Datum == nil  -- falls Nr die letzte Spalte ist
				then
				Nummer_Abstand = ""
				else
				Nummer_Abstand = " |"
			end
	end
	
	 -- Spalte Thema
	if Thema == nil
		then Thema_Zeile = "" 
             Thema_Abstand = ""
        elseif Thema == ""
		then Thema_Zeile = ""
             Thema_Abstand = ""
        elseif Thema == " "
		then Thema_Zeile = ""
             Thema_Abstand = ""
		else
			Colons = Colons + 1
			if Thema_Richtung == nil
				then Thema_Richtung = "left"
			end
			if Thema_Farbe == nil
				then Thema_Farbe = "#ececec"
			end
			Thema_Zeile = Tabelle.Spalte(Thema , Thema_Richtung , Thema_Farbe , 1)
			if Moderator == nil and Gaeste == nil and Datum == nil and Zuschauer == nil and VOD == nil
				then
				Thema_Abstand = ""
				else
				Thema_Abstand = " |"
			end
	end
	
	 -- Spalte Moderator
	if Moderator == nil
		then Moderator_Zeile = "" 
             Moderator_Abstand = ""
        elseif Moderator == ""
		then Moderator_Zeile = ""
             Moderator_Abstand = ""
        elseif Moderator == " "
		then Moderator_Zeile = ""
             Moderator_Abstand = ""
		else
			Colons = Colons + 1
			if Moderator_Richtung == nil
				then Moderator_Richtung = "left"
			end
			if Moderator_Farbe == nil
				then Moderator_Farbe = "#ececec"
			end
			Moderator_Zeile = Tabelle.Spalte(Moderator , Moderator_Richtung , Moderator_Farbe , 1)
            Moderator_Abstand = "|"
			if Gaeste == nil and Datum == nil and Zuschauer == nil and VOD == nil
				then
				Moderator_Abstand = ""
				else
				Moderator_Abstand = " |"
			end
	end
	
	 -- Spalte Gaeste
	if Gaeste == nil
		then Gaeste_Zeile = "" 
             Gaeste_Abstand = ""
        elseif Gaeste == ""
		then Gaeste_Zeile = ""
             Gaeste_Abstand = ""
        elseif Gaeste == " "
		then Gaeste_Zeile = ""
             Gaeste_Abstand = ""
		else
			Colons = Colons + 1
			if Gaeste_Richtung == nil
				then Gaeste_Richtung = "left"
			end
			if Gaeste_Farbe == nil
				then Gaeste_Farbe = "#ececec"
			end
			Gaeste_Zeile = Tabelle.Spalte(Gaeste , Gaeste_Richtung , WertColor , Gaeste_Farbe)
            Gaeste_Abstand = "|"
			if Datum == nil and Zuschauer == nil and VOD == nil
				then
				Gaeste_Abstand = ""
				else
				Gaeste_Abstand = " |"
			end
	end
	
	 -- Spalte Datum
	if Datum == nil
		then Datum_Zeile = "" 
             Datum_Abstand = ""
        elseif Datum == ""
		then Datum_Zeile = ""
             Datum_Abstand = ""
        elseif Datum == " "
		then Datum_Zeile = ""
             Datum_Abstand = ""
		else
			Colons = Colons + 1
			if Datum_Richtung == nil
				then Datum_Richtung = "center"
			end
			if Datum_Farbe == nil
				then Datum_Farbe = "#ececec"
			end
			Datum_Zeile = Tabelle.Spalte(Datum , Datum_Richtung , Datum_Farbe , 1)
            Datum_Abstand = "|"
			if Zuschauer == nil and VOD == nil
				then
				Datum_Abstand = ""
				else
				Datum_Abstand = " |"
			end
	end
	
	 -- Spalte Zuschauer
	if Zuschauer == nil
		then Zuschauer_Zeile = "" 
             Zuschauer_Abstand = ""
        elseif Zuschauer == ""
		then Zuschauer_Zeile = ""
             Zuschauer_Abstand = ""
        elseif Zuschauer == " "
		then Zuschauer_Zeile = ""
             Zuschauer_Abstand = ""
		else
			Colons = Colons + 1
			if Zuschauer_Richtung == nil
				then Zuschauer_Richtung = "right"
			end
			if Zuschauer_Farbe == nil
				then Zuschauer_Farbe = "#ececec"
			end
			Zuschauer_Zeile = Tabelle.Spalte(Zuschauer , Zuschauer_Richtung , Zuschauer_Farbe , 1)
            Zuschauer_Abstand = "|"
			if VOD == nil
				then
				Zuschauer_Abstand = ""
				else
				Zuschauer_Abstand = " |"
			end
	end
	
	 -- Spalte VOD
	if VOD == nil

		then VOD_Zeile = "" 

        elseif VOD == ""
		then VOD_Zeile = ""

        elseif VOD == " "
		then VOD_Zeile = ""

		else
			Colons = Colons + 1
			if VOD_Richtung == nil
				then VOD_Richtung = "center"
			end
			if VOD_Farbe == nil
				then VOD_Farbe = "#ececec"
			end
			VOD_Zeile = Tabelle.Spalte(VOD , VOD_Richtung , VOD_Farbe , 1)

	end

	 -- Neue Zeile Inhalt
	if Inhalt == nil
		then Inhalt_Zeile = ""
             VOD_Abstand = ""
        elseif Inhalt == ""
		then Inhalt_Zeile = ""
             VOD_Abstand = ""
        elseif Inhalt == " "
		then Inhalt_Zeile = ""
             VOD_Abstand = ""
		else

			if Inhalt_Richtung == nil
				then Inhalt_Richtung = "left"
			end
			if Inhalt_Farbe == nil
				then Inhalt_Farbe = "#ececec"
			end
			Inhalt_Spalte = Tabelle.Spalte(Inhalt , Inhalt_Richtung , Inhalt_Farbe , Colons)
            Inhalt_Zeile = "\n|-\n " .. Inhalt_Spalte
            VOD_Abstand = "|"
	end
	
	 -- Neue farbige Linie (funktioniert momentan nicht)
	if Linie_Farbe == nil
		then Linie_Zeile = ""

		else
			Linie_Spalte = Tabelle.Spalte(" " , "left" , Linie_Farbe , Colons)
            Linie_Zeile = "\n|-\n " .. Linie_Spalte
			VOD_Abstand = "|"
	end
	
	-- Alles zusammenfassen und zurückgeben
	Zeile = "|-\n " .. Nummer_Zeile .. Nummer_Abstand .. Thema_Zeile .. Thema_Abstand .. Moderator_Zeile .. Moderator_Abstand .. Gaeste_Zeile .. Gaeste_Abstand .. Datum_Zeile .. Datum_Abstand .. Zuschauer_Zeile .. Zuschauer_Abstand .. VOD_Zeile .. Inhalt_Zeile .. Linie_Zeile 
	return Zeile
end

return p
Cookies helfen uns bei der Bereitstellung von Bohnenwiki. Durch die Nutzung von Bohnenwiki erklärst du dich damit einverstanden, dass wir Cookies speichern.