Fix code indentation and add table caption

This commit is contained in:
Marcus Kammer 2024-06-22 16:01:59 +02:00
parent 46f52159bf
commit b39855393d
Signed by: marcuskammer
GPG key ID: C374817BE285268F

View file

@ -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))))))))))))