From b39855393db4db6ab11466f0cb4f83203801ade3 Mon Sep 17 00:00:00 2001 From: Marcus Kammer Date: Sat, 22 Jun 2024 16:01:59 +0200 Subject: [PATCH] Fix code indentation and add table caption --- src/views/survey.lisp | 35 ++++++++++++++++++----------------- 1 file changed, 18 insertions(+), 17 deletions(-) diff --git a/src/views/survey.lisp b/src/views/survey.lisp index 5c2e890..41bd985 100644 --- a/src/views/survey.lisp +++ b/src/views/survey.lisp @@ -6,22 +6,23 @@ (with-page (:title "Survey Details") (body-header "Survey Details" (navbar-en)) (:main :id "main-content" - :class "container" - (:p (format nil "ID: ~a" (ml-survey:survey-id survey))) - (:h2 "Properties") - (ml-survey:survey-html survey) - (when results + :class "container" + (:p (format nil "ID: ~a" (ml-survey:survey-id survey))) + (:h2 "Properties") + (ml-survey:survey-html survey) + (when results (:h2 "Questionnaire Results") - (let ((count-answers (length (car results)))) + (let ((count-answers (length (car results)))) (:table :class "table table-hover" - (:thead - (:tr - (loop for i from 1 to count-answers do - (if (= i count-answers) - (:th :scope "col" "SUS Score") - (:th :scope "col" (format nil "Q ~a" i))))) - (:tbody - (loop for result in results do - (:tr - (loop for answer in result do - (:td answer)))))))))))) + (:caption "Questionnaire results table") + (:thead + (:tr + (loop for i from 1 to count-answers do + (if (= i count-answers) + (:th :scope "col" "SUS Score") + (:th :scope "col" (format nil "Q ~a" i))))) + (:tbody + (loop for result in results do + (:tr + (loop for answer in result do + (:td answer))))))))))))