יחידה:תבנית מידע: הבדלים בין גרסאות בדף

מאין תקציר עריכה
מאין תקציר עריכה
שורה 210: שורה 210:
local subheader = 'כותרת'
local subheader = 'כותרת'
local labelDataPrefix = 'תווית-מידע'
local labelDataPrefix = 'תווית-מידע'
local rowStylePrefix = 'עיצוב-שורה'
local k=0
local k=0
local i=1
local i=1
שורה 216: שורה 217:
local subHeaderName = templateParams[subheader..i]
local subHeaderName = templateParams[subheader..i]
if subHeaderName then --subheader type
if subHeaderName then --subheader type
table.insert(templateStructure, {header=subHeaderName})
table.insert(templateStructure, {header=subHeaderName,rowstyle=templateParams[rowStylePrefix..i]})
else
else
local labelName = templateParams[labelPrefix..i]
local labelName = templateParams[labelPrefix..i]
שורה 222: שורה 223:
if labelName and dataTemplate then
if labelName and dataTemplate then
--label: data type
--label: data type
table.insert(templateStructure, {label=labelName, data=dataTemplate})
table.insert(templateStructure, {label=labelName, data=dataTemplate, rowstyle=templateParams[rowStylePrefix..i]})
elseif labelName and not dataTemplate then
elseif labelName and not dataTemplate then
--skip it. no only label [use subheader]
--skip it. no only label [use subheader]
elseif not labelName and dataTemplate then
elseif not labelName and dataTemplate then
--only data type
--only data type
table.insert(templateStructure, {data=dataTemplate})
table.insert(templateStructure, {data=dataTemplate, rowstyle=templateParams[rowStylePrefix..i]})
else
else
local label_data_names = templateParams[labelDataPrefix..i]
local label_data_names = templateParams[labelDataPrefix..i]
שורה 241: שורה 242:
break
break
end
end
table.insert(templateStructure, {label=labelName, data=dataTemplate})
table.insert(templateStructure, {label=labelName, data=dataTemplate, rowstyle=templateParams[rowStylePrefix..i]})
end
end
end
end