Перейти к содержанию

Модуль:Football: различия между версиями

Убрано добавление гостевых результатов в шахматке
Теперь ячейки выделяются цветом в зависимости от результата
Строка 211: Строка 211:
local score
local score


-- Новый формат:
-- Формат с номером круга:
-- круг;хозяева;гости;счёт
-- круг;хозяева;гости;счёт
if #parts >= 4 then
if #parts >= 4 then
Строка 220: Строка 220:
score = trim(parts[4])
score = trim(parts[4])


-- Старый формат:
-- Формат без номера круга:
-- хозяева;гости;счёт
-- хозяева;гости;счёт
elseif #parts >= 3 then
elseif #parts >= 3 then
Строка 862: Строка 862:


if match.played then
if match.played then
text = match.score
text = match.score
 
if matches.homeGoals > matches.awayGoals then
resultCell.addClass("ui green")
elseif matches.homeGoals < matches.awayGoals then
resultCell.addClass("ui red")
else
resultCell.addClass("ui yellow")
end
elseif match.status ~= "" then
elseif match.status ~= "" then
text = match.status
text = match.status
else
else
text = "—"
text = "—"
end
end
 
if match.round ~= "" then
 
text = text
 
end
 
resultCell
resultCell
:wikitext(text)
:wikitext(text)