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

מאין תקציר עריכה
מאין תקציר עריכה
שורה 226: שורה 226:
if labelName and dataTemplate then
if labelName and dataTemplate then
--label: data type
--label: data type
table.insert(templateStructure, {label=labelName, data=dataTemplate, rowstyle=templateParams[rowStylePrefix..i], datastyle=templateParams[dataPrefix..styleSuffix], labelstyle=templateParams[labelPrefix..styleSuffix]})
table.insert(templateStructure, {label=labelName, data=dataTemplate, rowstyle=templateParams[rowStylePrefix..i], datastyle=templateParams[dataPrefix..i..styleSuffix], labelstyle=templateParams[labelPrefix..i..styleSuffix]})
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, rowstyle=templateParams[rowStylePrefix..i], datastyle=templateParams[dataPrefix..styleSuffix]})
table.insert(templateStructure, {data=dataTemplate, rowstyle=templateParams[rowStylePrefix..i], datastyle=templateParams[dataPrefix..i..styleSuffix]})
else
else
local label_data_names = templateParams[labelDataPrefix..i]
local label_data_names = templateParams[labelDataPrefix..i]
שורה 245: שורה 245:
break
break
end
end
table.insert(templateStructure, {label=labelName, data=dataTemplate, rowstyle=templateParams[rowStylePrefix..i], datastyle=templateParams[dataPrefix..styleSuffix], labelstyle=templateParams[labelPrefix..styleSuffix]})
table.insert(templateStructure, {label=labelName, data=dataTemplate, rowstyle=templateParams[rowStylePrefix..i], datastyle=templateParams[dataPrefix..i..styleSuffix], labelstyle=templateParams[labelPrefix..i..styleSuffix]})
end
end
end
end