require('strict')local genBuffer = require('Module:OutputBuffer')local getArgs = require('Module:Arguments').getArgslocal delink = require('Module:Delink')._delinklocal coord -- lazily loaded
local p =
function p.row(frame) local getBuffer, print, printf = genBuffer local args = getArgs(frame,) local delinkedName = delink printf('|- class="vcard %s;text-align:center"\n', args.image and 'with_image' or 'without_image') printf('| class="fn org" | %s\n', args.name or ) printf('| class="label" | %s\n', args.location or ) printf('| %s\n', args.date_listed or ) printf('| %s\n', args.grid_ref and frame:expandTemplate or ) local coordText if args.lat then if not coord then coord = require('Module:Coordinates')._coord end coordText = coord else coordText = end local categoryText if args.category then categoryText = "Category " .. args.category else categoryText = end printf('| %s\n', coordText) printf('| class="note" | %s\n', args.notes or categoryText or ) printf('| class="uid" | %s\n', args.hb or args.hbnum or , args.hb or args.hbnum or ) if args.image then printf(' |
\n', args.image or , args.name or , mw.uri.encode(args.hb or args.hbnum or ), mw.uri.encode(delinkedName), args.lat or , args.lon or , mw.uri.encode(args.commonscat or ), args.commonscat and ('See more images') or ) else printf('| style="vertical-align:middle;text-align:center" | %s\n', frame:expandTemplate ) end return getBufferendreturn p