From 3aaaac0191a6d35d9b7052c7e27fc1dcd7561f7d Mon Sep 17 00:00:00 2001 From: Remo Mueller Date: Sat, 10 Aug 2019 11:54:49 -0400 Subject: [PATCH] Report pages without any reports now display a message, closes #8. --- CHANGELOG.md | 4 ++++ app/views/internal/report_page.html.haml | 15 +++++++++++---- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9bd257a..c91c18e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ ## 11.0.0 +### Enhancements +- **Report Changes** + - Report pages without any reports now display a message + ## 10.0.0 (August 4, 2019) ### Enhancements diff --git a/app/views/internal/report_page.html.haml b/app/views/internal/report_page.html.haml index d3d1613..e74bd39 100644 --- a/app/views/internal/report_page.html.haml +++ b/app/views/internal/report_page.html.haml @@ -4,7 +4,14 @@ = render "internal/tabs" - content_for :sidebar, render("internal/sidebar") -- @page.reports.where(archived: false).each do |report| - = render "reports/chart", report: report if report.chart? - = render "reports/table", report: report if report.table? - = render "reports/grades", report: report if report.grades? +- @reports = @page.reports.where(archived: false) + +- if @reports.present? + - @reports.each do |report| + = render "reports/chart", report: report if report.chart? + = render "reports/table", report: report if report.table? + = render "reports/grades", report: report if report.grades? +- else + .jumbotron.jumbotron-custom-text.jumbotron-shadow + = icon("fas", "info-circle", class: "text-primary-muted") + No reports have been added to this page.