From 764bef4e83b72a9a733086247b1fa59b66c6b9f1 Mon Sep 17 00:00:00 2001 From: Adam Zammit Date: Wed, 13 Mar 2013 14:00:24 +1100 Subject: [PATCH] Message when no cases currently available to call --- admin/outcomes.php | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/admin/outcomes.php b/admin/outcomes.php index 62d6ee9f..247d7108 100644 --- a/admin/outcomes.php +++ b/admin/outcomes.php @@ -124,7 +124,16 @@ if ($questionnaire_id != false) group by s.import_id"; - xhtml_table($db->GetAll($sql),array("description","available"),array(T_("Sample"),T_("Cases currently available to call")),"tclass",false,array("available")); + $rs = $db->GetAll($sql); + + if (empty($rs)) + { + print "
" . T_("No cases currently available to call") . "
"; + } + else + { + xhtml_table($rs,array("description","available"),array(T_("Sample"),T_("Cases currently available to call")),"tclass",false,array("available")); + } $atime = get_average_time_questionnaire(10,$questionnaire_id); $mins = intval($atime / 60);