Use section-projects to show all surveys
This commit is contained in:
parent
cb6b5d52bb
commit
636283b6a9
2 changed files with 18 additions and 14 deletions
|
@ -7,10 +7,14 @@
|
|||
#:with-navbar)
|
||||
(:import-from #:ml-sbt/section
|
||||
#:with-section
|
||||
#:with-section-projects
|
||||
#:with-title-bar)
|
||||
(:import-from #:ml-sbt/btn
|
||||
#:btn)
|
||||
(:import-from #:ml-sbt/card
|
||||
#:with-card*)
|
||||
(:import-from #:ml-sbt
|
||||
#:with-body-header
|
||||
#:with-body-main
|
||||
#:with-page))
|
||||
#:with-page
|
||||
#:t9n))
|
||||
|
|
|
@ -24,16 +24,16 @@ SURVEYS: List of survey objects."
|
|||
(when surveys
|
||||
(with-section
|
||||
(with-title-bar "All Surveys")
|
||||
(:ol :class "list-group list-group-numbered"
|
||||
(loop for survey in surveys
|
||||
for title = (survey-properties-title survey)
|
||||
for description = (survey-properties-description survey)
|
||||
for id = (survey-id survey) do
|
||||
(:li :class "list-group-item d-flex justify-content-between align-items-start"
|
||||
(:div :class "ms-2 me-auto"
|
||||
(:a :class "fw-bold clearfix"
|
||||
:href (format nil "/survey/~a" id)
|
||||
title)
|
||||
(if description
|
||||
(:span description)
|
||||
nil)))))))))))
|
||||
(with-section-projects
|
||||
(dolist (survey surveys)
|
||||
(let ((title (survey-properties-title survey))
|
||||
(description (survey-properties-description survey))
|
||||
(id (survey-id survey)))
|
||||
(with-card*
|
||||
:card-header
|
||||
title
|
||||
:card-items
|
||||
(list description id)
|
||||
:card-body
|
||||
(btn (:url (format nil "/survey/~a" id))
|
||||
(t9n "view-details" lang))))))))))))
|
||||
|
|
Loading…
Add table
Reference in a new issue