Modül:AttributePicker: Revizyonlar arasındaki fark
Gezinti kısmına atla
Arama kısmına atla
Değişiklik özeti yok |
Değişiklik özeti yok |
||
| 4. satır: | 4. satır: | ||
function p.render(frame) | function p.render(frame) | ||
local bindName = frame.args.bind or "attributes" | local bindName = frame.args.bind or "attributes" | ||
-- table oluştur | |||
local root = mw.html.create("tbody") | |||
-- başlık satırı | |||
local header = root:tag("tr") | |||
header:tag("td") | |||
:attr("colspan", "2") | |||
:cssText("font-size:12px;color:#555;") | |||
:wikitext("Seçim Yap:") | |||
for _, attr in ipairs(Attributes) do | for _, attr in ipairs(Attributes) do | ||
local row = root:tag("tr") | |||
-- checkbox hücresi | |||
local cell1 = row:tag("td") | |||
cell1:cssText("width:28px;text-align:center;padding:4px;") | |||
cell1:tag("input") | |||
:attr("type", "checkbox") | |||
:attr("name", bindName) | |||
:attr("value", attr) | |||
:addClass("attribute-select") | |||
-- attribute adı hücresi | |||
local cell2 = row:tag("td") | |||
cell2:wikitext(attr) | |||
end | end | ||
-- buton satırı | |||
local last = root:tag("tr") | |||
local bt = last:tag("td") | |||
bt:attr("colspan", "2") | |||
bt:cssText("text-align:center;padding:8px;") | |||
bt:tag("button") | |||
:addClass("attribute-generate") | |||
:attr("data-bind", bindName) | |||
:wikitext("Seçimi Uygula") | |||
return | return tostring(root) | ||
end | end | ||
return p | return p | ||
08.53, 4 Aralık 2025 itibarı ile sayfanın şu anki hâli
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"
-- table oluştur
local root = mw.html.create("tbody")
-- başlık satırı
local header = root:tag("tr")
header:tag("td")
:attr("colspan", "2")
:cssText("font-size:12px;color:#555;")
:wikitext("Seçim Yap:")
for _, attr in ipairs(Attributes) do
local row = root:tag("tr")
-- checkbox hücresi
local cell1 = row:tag("td")
cell1:cssText("width:28px;text-align:center;padding:4px;")
cell1:tag("input")
:attr("type", "checkbox")
:attr("name", bindName)
:attr("value", attr)
:addClass("attribute-select")
-- attribute adı hücresi
local cell2 = row:tag("td")
cell2:wikitext(attr)
end
-- buton satırı
local last = root:tag("tr")
local bt = last:tag("td")
bt:attr("colspan", "2")
bt:cssText("text-align:center;padding:8px;")
bt:tag("button")
:addClass("attribute-generate")
:attr("data-bind", bindName)
:wikitext("Seçimi Uygula")
return tostring(root)
end
return p