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

Версия 1.3, добавлена ручная корректировка мест в случае абсолютного равенства по всем показателям
Версия 1.3.1
 
(не показана 1 промежуточная версия этого же участника)
Строка 2: Строка 2:
-- Модуль:MatchTable
-- Модуль:MatchTable
-- Оболочка для вывода таблиц матчей
-- Оболочка для вывода таблиц матчей
-- Версия 1.3
-- Версия 1.3.1
-- =======================================
-- =======================================
local p = {}
local p = {}
Строка 317: Строка 317:
                 end)
                 end)
                  
                  
                -- Подсветка неразрешенных споров
                 for k = 1, #sub - 1 do
                 for k = 1, #sub - 1 do
                     local a = sub[k]
                     local a = sub[k]
Строка 446: Строка 445:
          
          
         local is_tied = (cleanParam(args['err' .. n]) == "yes")
         local is_tied = (cleanParam(args['err' .. n]) == "yes")
        local is_bold = (cleanParam(args['bold' .. n]) == "yes")


         local r = tbl:tag('tr')
         local r = tbl:tag('tr')
Строка 455: Строка 455:
             td:wikitext(content)
             td:wikitext(content)
         end
         end
       
        local rank_str = tostring(n)
        if is_bold then rank_str = "'''" .. rank_str .. "'''" end
          
          
         local name_str = string.format('[[%s]]', name)
         local name_str = string.format('[[%s]]', name)
        if is_bold then name_str = "'''" .. name_str .. "'''" end
         if is_tied then name_str = highlight_tie(name_str) end
         if is_tied then name_str = highlight_tie(name_str) end
          
          
Строка 465: Строка 469:
         if is_tied then goals_str = highlight_tie(goals_str) end
         if is_tied then goals_str = highlight_tie(goals_str) end


         addCell(tostring(n))
         addCell(rank_str)
         addCell(name_str)
         addCell(name_str)
         addCell(pts_str)
         addCell(pts_str)