Fix ml-sbt macros
This commit is contained in:
parent
c2ef65f8db
commit
334d13cc94
4 changed files with 13 additions and 15 deletions
|
@ -25,10 +25,10 @@
|
|||
(let ((questionnaires (list-questionnaires))
|
||||
(container "container-fluid"))
|
||||
(with-page (:title "New Survey")
|
||||
(body-header container "New Survey"
|
||||
(with-navbar container "New Survey"
|
||||
(body-header "fluid" "New Survey"
|
||||
(with-navbar "fluid" "New Survey"
|
||||
"Home" "/" "New Survey" "/new-survey"))
|
||||
(body-main container
|
||||
(body-main "fluid"
|
||||
;; If `questionnaires' is an empty list, show the user an warning
|
||||
;; message.
|
||||
(unless questionnaires
|
||||
|
|
|
@ -62,12 +62,12 @@ available in its environment for full functionality."
|
|||
(defun view (q)
|
||||
(declare (type questionnaire q))
|
||||
(with-page (:title "SUS Form")
|
||||
(body-header t "System Usability Form")
|
||||
(body-header "fluid" "System Usability Form")
|
||||
(with-form (load-form q))))
|
||||
|
||||
(defun view-submit ()
|
||||
(with-page (:title "Confirmation")
|
||||
(body-header t "Confirmation")
|
||||
(body-header "fluid" "Confirmation")
|
||||
(:main :id "main-content"
|
||||
:class "container"
|
||||
(:div :class "alert alert-info"
|
||||
|
|
|
@ -90,12 +90,11 @@
|
|||
(defun view (survey &optional assessments)
|
||||
"Generates the view to show the survey created."
|
||||
(check-type survey survey)
|
||||
(let ((container "container-fluid"))
|
||||
(with-page (:title "Survey Details")
|
||||
(body-header container "Survey Details"
|
||||
(with-navbar container nil
|
||||
(body-header "fluid" "Survey Details"
|
||||
(with-navbar "fluid" nil
|
||||
"Home" "/" "New Survey" "/new-survey"))
|
||||
(body-main container
|
||||
(body-main "fluid"
|
||||
(:div :class "row"
|
||||
(with-section-props (with-title-bar "Properties")
|
||||
(:p (format nil "ID: ~a" (survey-id survey)))
|
||||
|
@ -103,7 +102,7 @@
|
|||
(with-section-col (with-title-bar "Assesments")
|
||||
(loop for assessment in assessments
|
||||
when assessments
|
||||
do (assessment-html assessment (survey-id survey)))))))))
|
||||
do (assessment-html assessment (survey-id survey))))))))
|
||||
|
||||
(defun nps-calc (time-data)
|
||||
"Calculate the Net Promoter Score (NPS) from a list of SCORES."
|
||||
|
|
|
@ -34,12 +34,11 @@
|
|||
|
||||
SURVEYS: List of survey objects."
|
||||
(check-type surveys surveys-list)
|
||||
(let ((container "container-fluid"))
|
||||
(with-page (:title "Surveys")
|
||||
(body-header container "Surveys"
|
||||
(with-navbar container "Home"
|
||||
(body-header "fluid" "Surveys"
|
||||
(with-navbar "fluid" "Home"
|
||||
"Home" "/" "New Survey" "/new-survey"))
|
||||
(body-main container
|
||||
(body-main "fluid"
|
||||
(when surveys
|
||||
(with-section
|
||||
(with-title-bar "All Surveys")
|
||||
|
@ -55,7 +54,7 @@ SURVEYS: List of survey objects."
|
|||
title)
|
||||
(if description
|
||||
(:span description)
|
||||
nil)))))))))))
|
||||
nil))))))))))
|
||||
|
||||
(define-easy-handler (surveys-handler :uri "/") nil
|
||||
(let* ((survey-db (ml-survey/fileops:read-from-file (ml-survey/fileops:make-surveys-db-file)))
|
||||
|
|
Loading…
Add table
Reference in a new issue