Fix nil when no page
This commit is contained in:
parent
42c077f6ab
commit
08f173f3da
1 changed files with 3 additions and 2 deletions
|
|
@ -20,6 +20,7 @@ p.small.mb-2
|
||||||
= link_to(page.path, report_path(@report, page_id: page.id), class: "nav-link#{@current_page&.id == page.id ? " active" : nil }", data: { "turbo-action": :advance })
|
= link_to(page.path, report_path(@report, page_id: page.id), class: "nav-link#{@current_page&.id == page.id ? " active" : nil }", data: { "turbo-action": :advance })
|
||||||
= turbo_frame_tag "new_page_frame" do
|
= turbo_frame_tag "new_page_frame" do
|
||||||
= render partial: "reports/new_page_button", locals: { report: @report }
|
= render partial: "reports/new_page_button", locals: { report: @report }
|
||||||
|
- if @current_page
|
||||||
= turbo_frame_tag(dom_id(@current_page, :notes)) do
|
= turbo_frame_tag(dom_id(@current_page, :notes)) do
|
||||||
= render partial: "pages/notes", locals: { page: @current_page }
|
= render partial: "pages/notes", locals: { page: @current_page }
|
||||||
.col-lg-9.col-md-6.col-sm-12
|
.col-lg-9.col-md-6.col-sm-12
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue