Модуль:tablerole

Вернуться

Строка 189: Строка 189:
          
          
         -- Выбираем шаблон в зависимости от значения
         -- Выбираем шаблон в зависимости от значения
        local templateName = 'Шаблон:Ячейка/Нет'
         if lowerVal == "да" or lowerVal == "yes" or lowerVal == "true" then
         if lowerVal == "да" or lowerVal == "yes" or lowerVal == "true" then
             table.insert(cells, '|{{Шаблон:Ячейка/Да}}')
             templateName = 'Шаблон:Ячейка/Да'
        else
            table.insert(cells, '|{{Шаблон:Ячейка/Нет}}')
         end
         end
       
        -- Рендерим шаблон через Lua API
        local expanded = frame:expandTemplate{ title = templateName }
        table.insert(cells, '|' .. expanded)
     end
     end