Class: Www::FloorCompatibilityTableComponent
- Inherits:
-
ApplicationComponent
- Object
- ViewComponent::Base
- ApplicationComponent
- Www::FloorCompatibilityTableComponent
- Includes:
- ActionView::Helpers::UrlHelper
- Defined in:
- app/components/www/floor_compatibility_table_component.rb
Overview
Www::FloorCompatibilityTableComponent
Renders a floor type compatibility matrix for heating systems.
Data is sourced from FloorHeatingCompatibility module.
Parameters:
- category: :all (default), :cable, or :mat - filters which heating systems to show
- title: Section title (default: "Floor Type Compatibility")
- description: Introductory paragraph (optional)
- show_section_header: Whether to render section header (default: true)
- compact: If true, hides installation column for simpler display (default: false)
Examples:
Full matrix with all systems (for /floor-heating)
<%= render Www::FloorCompatibilityTableComponent.new(category: :all) %>
Cable systems only (for /floor-heating/heating-cable)
<%= render Www::FloorCompatibilityTableComponent.new(
category: :cable,
description: "Floor heating cables are compatible with a variety of flooring types."
) %>
Mat systems only (for /floor-heating/heated-floor-mat)
<%= render Www::FloorCompatibilityTableComponent.new(category: :mat) %>
Instance Method Summary collapse
-
#initialize(category: :all, title: 'Floor Type Compatibility', description: nil, show_section_header: true, compact: false) ⇒ FloorCompatibilityTableComponent
constructor
A new instance of FloorCompatibilityTableComponent.
Methods inherited from ApplicationComponent
#cms_link, #fetch_or_fallback, #image_asset_tag, #image_tag, #number_to_currency, #number_with_delimiter, #post_path, #post_url, #strip_tags
Constructor Details
#initialize(category: :all, title: 'Floor Type Compatibility', description: nil, show_section_header: true, compact: false) ⇒ FloorCompatibilityTableComponent
Returns a new instance of FloorCompatibilityTableComponent.
33 34 35 36 37 38 39 40 41 42 43 44 45 46 |
# File 'app/components/www/floor_compatibility_table_component.rb', line 33 def initialize( category: :all, title: 'Floor Type Compatibility', description: nil, show_section_header: true, compact: false ) super() @category = category @title = title @description = description @show_section_header = show_section_header @compact = compact end |