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

מאין תקציר עריכה
מאין תקציר עריכה
שורה 250: שורה 250:
self:removeEmptyHeaders()
self:removeEmptyHeaders()
-- error if there is no data/structure given to template from wiki page or wikidata
-- error if there is no data/structure given to template from wiki page or wikidata
if (#self.templateStructure)==0 then
if ((#self.templateStructure)==0) and not self.args.subtemplate then
local templateTitle = mw.getCurrentFrame():getParent():getTitle()
local templateTitle = mw.getCurrentFrame():getParent():getTitle()
return ('[[קטגוריה:שגיאות פרמטריות בתבנית ' .. mw.ustring.gsub(templateTitle, 'תבנית:', '', 1))..']][[קטגוריה:שגיאות פרמטריות]]'
return ('[[קטגוריה:שגיאות פרמטריות בתבנית ' .. mw.ustring.gsub(templateTitle, 'תבנית:', '', 1))..']][[קטגוריה:שגיאות פרמטריות]]'
שורה 256: שורה 256:
-- sub infobox
-- sub infobox
if self.args.title == '-' then
if self.args.subtemplate then
self.root:cssText(self.args.tablestyle):css('width', '100%')
self.root:cssText(self.args.tablestyle):css('width', '100%'):css('line-height', '1.4em')
else
else
self.root:addClass('infobox'):css('width', '18em'):cssText(self.args.tablestyle)
self.root:addClass('infobox'):css('width', '18em'):cssText(self.args.tablestyle)
שורה 429: שורה 429:
args.tablestyle = frame.args['טבלה-עיצוב']
args.tablestyle = frame.args['טבלה-עיצוב']
args.tableclass = frame.args['טבלה-מחלקה']
args.tableclass = frame.args['טבלה-מחלקה']
args.subtemplate = frame.args['תת-תבנית']
local isSelfUse = (mw.title.getCurrentTitle().namespace==10)
local isSelfUse = (mw.title.getCurrentTitle().namespace==10)
self.autoDocumentation = frame.args['תיעוד-אוטומטי']
self.autoDocumentation = frame.args['תיעוד-אוטומטי']
שורה 545: שורה 546:
end
end
end
end
 
if args.title=='-' then
args.subtemplate = true
end
self.args = args
self.args = args
self.templateStructure = templateStructure
self.templateStructure = templateStructure