Make a survey available under surveys/ resource

This commit is contained in:
Marcus Kammer 2025-02-16 09:24:37 +01:00
parent 8cee7a5e6b
commit 3179d72c81
Signed by: marcuskammer
GPG key ID: C374817BE285268F
4 changed files with 7 additions and 7 deletions

View file

@ -2,7 +2,7 @@
(defsystem "dev.metalisp.survey"
:description "Create questionnaires and analyze the results."
:version "0.5.21"
:version "0.5.22"
:author "Marcus Kammer <marcus.kammer@mailbox.org>"
:source-control (:git "https://code.metalisp.dev/marcuskammer/dev.metalisp.survey.git")
:licence "MIT"

View file

@ -42,7 +42,7 @@
(defun survey-uri-p (uri)
(let ((parts (ml-survey/app:split-uri uri)))
(and (= (length parts) 2)
(string= (first parts) "survey")
(string= (first parts) "surveys")
(every #'digit-char-p (second parts)))))
(defun survey-uri (request)

View file

@ -7,8 +7,8 @@
(let ((lang "en"))
(with-page (:title "Survey Details")
(with-body-header "fluid" "Survey Details" lang
(with-navbar "fluid" "metalisp.survey" "/" "Home"
"Home" "/" "Create" "/create"))
(with-navbar "fluid" "metalisp.survey" "/" "Surveys"
"Surveys" "/" "Create" "/create"))
(with-body-main "fluid"
(:div :class "row"
(with-section-props (with-title-bar "Properties")

View file

@ -18,8 +18,8 @@ SURVEYS: List of survey objects."
(let ((lang "en"))
(with-page (:title "Surveys")
(with-body-header "fluid" "Surveys" lang
(with-navbar "fluid" "metalisp.survey" "/" "Home"
"Home" "/" "Create" "/create"))
(with-navbar "fluid" "metalisp.survey" "/" "Surveys"
"Surveys" "/" "Create" "/create"))
(with-body-main "fluid"
(when surveys
(with-section
@ -35,5 +35,5 @@ SURVEYS: List of survey objects."
:card-items
(list description id)
:card-body
(btn (:url (format nil "/survey/~a" id))
(btn (:url (format nil "/surveys/~a" id))
(t9n "view-details" lang))))))))))))