Modül:AttributePicker
Bu modül için bir Modül:AttributePicker/belge belgelendirmesi oluşturabilirsiniz
local p = {}
local Attributes = require("Modül:FMAttributes")
function p.render(frame)
local bindName = frame.args.bind or "attributes"
local html = ""
html = html .. '<tr><td colspan="2" style="font-size:12px;color:#555;">Seçim Yap:</td></tr>'
for _, attr in ipairs(Attributes) do
html = html .. string.format([[
<tr>
<td style="width:28px;text-align:center;">
<input type="checkbox" name="%s" value="%s" class="attribute-select">
</td>
<td>%s</td>
</tr>
]], bindName, attr, attr)
end
-- JS tarafı Seçilen checkbox’ları okuyup
-- seçili attribute’ları MediaWiki parametresine aktaracak string çıkışı oluşturur
html = html .. string.format([[
<tr>
<td colspan="2" style="text-align:center;padding:8px;">
<button class="attribute-generate" data-bind="%s">Seçimi Uygula</button>
</td>
</tr>
]], bindName)
return html
end
return p