Refactorings and gui improvements
This commit is contained in:
parent
c965e03e5a
commit
d1294c2fc4
46 changed files with 358 additions and 128020 deletions
26
app/views/reports/_page_nav.html.slim
Normal file
26
app/views/reports/_page_nav.html.slim
Normal 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 }
|
||||
Loading…
Add table
Add a link
Reference in a new issue