From e576aa1e390018a9957d3b4a7c5b8376315a93aa Mon Sep 17 00:00:00 2001 From: david Date: Sun, 17 Nov 2024 18:57:44 +0100 Subject: [PATCH] Add page to hierarchy --- app/views/exports/show.html.slim | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/app/views/exports/show.html.slim b/app/views/exports/show.html.slim index 2ec2169..e925508 100644 --- a/app/views/exports/show.html.slim +++ b/app/views/exports/show.html.slim @@ -41,13 +41,13 @@ h2 2 Protokoll - @report.pages.select { |p| p.elements.any? { |e| e.success_criteria.any? { _1.failed? } } }.each do |page| - current_page_pos += 1 - current_element_pos = 0 - /h3 = "2.#{current_page_pos} #{page.path}" + h3 = "2.#{current_page_pos} #{page.path}" - page.elements.select { |e| e.success_criteria.any? { _1.failed? } }.each do |element| - current_element_pos += 1 - current_abs_element_pos += 1 - current_sc_pos = 0 - /h4 = "2.#{current_page_pos}.#{current_element_pos} #{element.title}" - h3 = "2.#{current_abs_element_pos} #{element.title}" + h4 = "2.#{current_page_pos}.#{current_element_pos} #{element.title}" + /h3 = "2.#{current_abs_element_pos} #{element.title}" p strong Pfad: span =< page.path @@ -55,8 +55,11 @@ h2 2 Protokoll = element.description - element.success_criteria.select{ _1.failed? }.each do |sc| - current_sc_pos += 1 - h4 = "2.#{current_abs_element_pos}.#{current_sc_pos} #{sc.title}" - small = sc.number + /h4 + = "2.#{current_abs_element_pos}.#{current_sc_pos} #{sc.title}" + h5 = "2.#{current_page_pos}.#{current_element_pos}.#{current_sc_pos}" + strong Protokoll-Nummer + =< sc.number - if sc.test_comment? p = sc.test_comment - safe_display(sc.quick_criterion) do @@ -66,7 +69,7 @@ h2 2 Protokoll strong Quick Fail .body_text = _1 - safe_display(sc.quick_fix) do - strong Kriterium + strong Quick Fix .body_text = _1 strong WCAG .body_text = link_to(sc.check.external_number, sc.check.external_url)