Module:CRTModel: Difference between revisions

Simplify input/output display - show all inputs/outputs with inline location instead of grouping (fixes non-standard location values like rear/front) (via update-page on MediaWiki MCP Server)
Add Tube section to infobox: reads mask_type, pitch, phosphor_type, gun_type, deflection_angle, neck_diameter, visible_w, visible_h, visible_diag and displays them between ECID and Dimensions (via update-page on MediaWiki MCP Server)
Line 110: Line 110:
local release_year = trim(args.release_year)
local release_year = trim(args.release_year)
local msrp = trim(args.msrp)
local msrp = trim(args.msrp)
-- Tube specifications
local mask_type = trim(args.mask_type)
local pitch = trim(args.pitch)
local phosphor_type = trim(args.phosphor_type)
local gun_type = trim(args.gun_type)
local deflection_angle = trim(args.deflection_angle)
local neck_diameter = trim(args.neck_diameter)
local visible_w = trim(args.visible_w)
local visible_h = trim(args.visible_h)
local visible_diag = trim(args.visible_diag)


-- Use frame:extensionTag to create a proper <style> tag that won't be escaped
-- Use frame:extensionTag to create a proper <style> tag that won't be escaped
Line 261: Line 272:
local ecidWikitext = string.format('[{{fullurl:%s|curid=%d}} EC%d]', pageName, pageId, pageId)
local ecidWikitext = string.format('[{{fullurl:%s|curid=%d}} EC%d]', pageName, pageId, pageId)
addRow(container, 'ECID', frame:preprocess(ecidWikitext), true)
addRow(container, 'ECID', frame:preprocess(ecidWikitext), true)
-- Tube section: show if we have any tube specs
if mask_type or pitch or phosphor_type or gun_type or deflection_angle or neck_diameter or visible_w or visible_h or visible_diag then
addSectionRow(container, 'Tube')
if mask_type then
addRow(container, 'Mask', mask_type, false)
end
if pitch then
addRow(container, 'Pitch', pitch .. ' mm', false)
end
if phosphor_type then
addRow(container, 'Phosphors', phosphor_type, false)
end
if gun_type then
addRow(container, 'Gun type', gun_type, false)
end
if deflection_angle then
addRow(container, 'Deflection', deflection_angle .. '°', false)
end
if neck_diameter then
addRow(container, 'Neck', neck_diameter .. ' mm', false)
end
-- Visible picture size
if visible_w and visible_h then
addRow(container, 'Visible area', visible_w .. ' × ' .. visible_h .. ' mm', false)
elseif visible_diag then
addRow(container, 'Visible area', visible_diag .. '″ (diagonal)', false)
end
-- Show diagonal even if we have W×H, as supplementary info
if visible_diag and visible_w and visible_h then
addRow(container, 'Visible diag.', visible_diag .. '″', false)
end
end


-- Dimensions section: show if we have height/width/depth OR weight
-- Dimensions section: show if we have height/width/depth OR weight
MediaWiki Appliance - Powered by TurnKey Linux