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

מאין תקציר עריכה
מאין תקציר עריכה
שורה 72: שורה 72:
- for image - returns image inclusion with 250px size
- for image - returns image inclusion with 250px size
]]
]]
function getProperty( propertyName, allowMulti, allowNA, entityId )
function getProperty( propertyName, allowMulti, allowNA, entityId, multiSeperator )
     local entity = nil
     local entity = nil
    if not multiSeperator then
        multiSeperator = ', '
    end
     if entityId then
     if entityId then
     entity = mw.wikibase.getEntityObject( entityId )
     entity = mw.wikibase.getEntityObject( entityId )
שורה 139: שורה 142:
return '[[קטגוריה:ויקינתונים:ערכים_חסרי_תווית_בעברית: ' .. (mw.wikibase.label( propertyName) or propertyName ) .. ']][[קטגוריה:ויקינתונים:ערכים_חסרי_תווית_בעברית]]'
return '[[קטגוריה:ויקינתונים:ערכים_חסרי_תווית_בעברית: ' .. (mw.wikibase.label( propertyName) or propertyName ) .. ']][[קטגוריה:ויקינתונים:ערכים_חסרי_תווית_בעברית]]'
end
end
return table.concat( resTable, ', ' )
return table.concat( resTable, multiSeperator )
end
end


function property( frame )
function property( frame )
     return getProperty(string.upper(frame.args[1]), (frame.args[2] and string.len(frame.args[2])>0) or false, true, frame.args['entity'])
     return getProperty(string.upper(frame.args[1]), (frame.args[2] and string.len(frame.args[2])>0) or false, true, frame.args['entity'], ', ')
end
end