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

מ שילוב כיתוב, נגישות
מאין תקציר עריכה
שורה 351: שורה 351:
local labelDataPrefix = 'תווית-מידע'
local labelDataPrefix = 'תווית-מידע'
local rowStylePrefix = 'עיצוב-שורה'
local rowStylePrefix = 'עיצוב-שורה'
local rowStyleClassPrefix = 'מחלקה-שורה'
local styleSuffix = '-עיצוב'
local styleSuffix = '-עיצוב'
local k=0
local k=0
שורה 363: שורה 364:
local subHeaderName = templateParams[subheader..i]
local subHeaderName = templateParams[subheader..i]
if subHeaderName and #subHeaderName>0  then --subheader type
if subHeaderName and #subHeaderName>0  then --subheader type
table.insert(templateStructure, {header=subHeaderName,rowstyle=templateParams[rowStylePrefix..i], headerstyle=templateParams[subheader..i..styleSuffix], indic=indic})
table.insert(templateStructure, {header=subHeaderName,rowstyle=templateParams[rowStylePrefix..i], rowclass=templateParams[rowStyleClassPrefix..i], headerstyle=templateParams[subheader..i..styleSuffix], indic=indic})
else
else
local labelName = templateParams[labelPrefix..i]
local labelName = templateParams[labelPrefix..i]
שורה 377: שורה 378:
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..i..styleSuffix],  
table.insert(templateStructure, {label=labelName, data=dataTemplate, rowstyle=templateParams[rowStylePrefix..i], rowclass=templateParams[rowStyleClassPrefix..i], datastyle=templateParams[dataPrefix..i..styleSuffix],  
labelstyle=templateParams[labelPrefix..i..styleSuffix], indic=indic})
labelstyle=templateParams[labelPrefix..i..styleSuffix], indic=indic})
elseif labelName and not dataTemplate then
elseif labelName and not dataTemplate then
שורה 383: שורה 384:
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..i..styleSuffix], indic=indic})
table.insert(templateStructure, {data=dataTemplate, rowstyle=templateParams[rowStylePrefix..i], rowclass=templateParams[rowStyleClassPrefix..i], datastyle=templateParams[dataPrefix..i..styleSuffix], indic=indic})
else
else
local label_data_names = templateParams[labelDataPrefix..i]
local label_data_names = templateParams[labelDataPrefix..i]
שורה 394: שורה 395:
dataTemplate = '{{{' ..label_data_names.. '}}}'
dataTemplate = '{{{' ..label_data_names.. '}}}'
end
end
table.insert(templateStructure, {label=labelName, data=dataTemplate, rowstyle=templateParams[rowStylePrefix..i], datastyle=templateParams[dataPrefix..i..styleSuffix],  
table.insert(templateStructure, {label=labelName, data=dataTemplate, rowstyle=templateParams[rowStylePrefix..i], rowclass=templateParams[rowStyleClassPrefix..i], datastyle=templateParams[dataPrefix..i..styleSuffix],  
labelstyle=templateParams[labelPrefix..i..styleSuffix], indic=indic})
labelstyle=templateParams[labelPrefix..i..styleSuffix], indic=indic})
end
end