From 0edfb2f68d4b568814ed2f109e33bd00b8830671 Mon Sep 17 00:00:00 2001 From: Diane Trout Date: Wed, 14 Sep 2016 17:00:31 -0700 Subject: [PATCH] Report no data found when collections empty The xhtml validator caught a few cases where empty data generated some invalid html because some table or list bodies were missing. I thought it reasonable to include a message that nothing was found instead of leaving the table blank. --- htsworkflow/templates/sample_header.html | 2 ++ htsworkflow/templates/samples/library_detail.html | 6 +++--- htsworkflow/templates/samples/library_index.html | 2 ++ 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/htsworkflow/templates/sample_header.html b/htsworkflow/templates/sample_header.html index 651349f..ed9f8b1 100644 --- a/htsworkflow/templates/sample_header.html +++ b/htsworkflow/templates/sample_header.html @@ -17,6 +17,8 @@
  • {{ individual.name }} ( {{ individual.contact }} )
  • + {% empty %} +
  • None
  • {% endfor %} {% if lib.libraryaccession_set %} diff --git a/htsworkflow/templates/samples/library_detail.html b/htsworkflow/templates/samples/library_detail.html index 65747dc..4966393 100644 --- a/htsworkflow/templates/samples/library_detail.html +++ b/htsworkflow/templates/samples/library_detail.html @@ -131,7 +131,6 @@ Comment - {% if lib.lane_set.all %} {% for lane in lib.lane_set.all %} {{ lane.comment }} - {% endfor %} + {% empty %} + No data + {% endfor %} - {% endif %}

    diff --git a/htsworkflow/templates/samples/library_index.html b/htsworkflow/templates/samples/library_index.html index 4491a09..9884483 100644 --- a/htsworkflow/templates/samples/library_index.html +++ b/htsworkflow/templates/samples/library_index.html @@ -105,6 +105,8 @@ {% endif %} + {% empty %} + No results found {% endfor %} -- 2.30.2