Refactorings and gui improvements
Some checks failed
/ Run tests (push) Successful in 1m22s
/ Run system tests (push) Failing after 1m33s
/ Build, push and deploy image (push) Successful in 3m22s

This commit is contained in:
david 2024-11-03 21:58:25 +01:00
parent c965e03e5a
commit d1294c2fc4
46 changed files with 358 additions and 128020 deletions

View file

@ -0,0 +1,26 @@
div id=dom_id(report, :page_nav)
- if report.pages.any?
details open=true
summary Struktur
nav
ul
- report.pages.each do |page|
- is_current = current_page == page
li
details open=current_page_displayed(page) class=""
summary
i.bi.me-1 class="bi-file-earmark-check#{is_current ? "-fill" : "" }"
- if is_current
=< "#{page.position} #{page.path}"
- else
=< link_to("#{page.position} #{page.path}", report_path(report, page_id: page.id), class: "#{is_current ? " active text-decoration-underline" : nil }", data: { "turbo-frame": :_top })
ul id=dom_id(page, :page_nav_elements)
- page.elements.each do |element|
li
i.bi.bi-boxes.me-1
- if current_page == page
=< link_to("#{element.number} #{element.title}", "##{dom_id(element)}", data: { "turbo": false })
- else
=< link_to("#{element.number} #{element.title}", report_path(report, page_id: page.id, anchor: dom_id(element)), data: { "turbo": false })
= turbo_frame_tag "new_page_frame" do
= render partial: "reports/new_page_button", locals: { report: report }