Модуль:Карточка: различия между версиями
Pok (обсуждение | вклад) мНет описания правки |
Pok (обсуждение | вклад) мНет описания правки |
||
| Строка 181: | Строка 181: | ||
if args.title then | if args.title then | ||
local node = h.printTitleWrapper(out) | local node = h.printTitleWrapper(out) | ||
node:wikitext(args.title) | node:wikitext("{{ucfirst:" .. args.title .. "}}") | ||
end | end | ||
end | end | ||
| Строка 426: | Строка 426: | ||
function h.printLabel(node, item, args) | function h.printLabel(node, item, args) | ||
local text = args[item .. '_display'] or args[item .. '_label'] or item | |||
return node | return node | ||
:addClass('druid-label') | :addClass('druid-label') | ||
:addClass('druid-label-' .. h.escape(item)) | :addClass('druid-label-' .. h.escape(item)) | ||
:wikitext( | :wikitext("{{ucfirst:" .. text .. "}}") | ||
end | end | ||
| Строка 466: | Строка 467: | ||
:addClass('druid-data-' .. h.escape(item)) | :addClass('druid-data-' .. h.escape(item)) | ||
:addClass('druid-data-nonempty') | :addClass('druid-data-nonempty') | ||
:wikitext( | :wikitext("\n\n{{ucfirst:" .. args[item] .. "}}") | ||
return true | return true | ||
end | end | ||
| Строка 503: | Строка 504: | ||
end | end | ||
if not next(emptySections) then | if not next(emptySections) then | ||
th:wikitext(args[section .. '_label'] or section) | th:wikitext("{{ucfirst:" .. (args[section .. '_label'] or section) .. "}}") | ||
return | return | ||
end | end | ||
| Строка 511: | Строка 512: | ||
:addClass('druid-toggleable') | :addClass('druid-toggleable') | ||
:attr('data-druid', h.counter .. '-' .. i) | :attr('data-druid', h.counter .. '-' .. i) | ||
:wikitext(args[section .. '_label'] or section) | :wikitext("{{ucfirst:" .. (args[section .. '_label'] or section) .. "}}") | ||
-- we are going to print the section content even in empty nodes | -- we are going to print the section content even in empty nodes | ||
-- for compatibility with browsers without :has, where hiding empty rows won't happen | -- for compatibility with browsers without :has, where hiding empty rows won't happen | ||