From a60fa48142fe205a4ac3802336da83dff1242c5e Mon Sep 17 00:00:00 2001 From: ckonstanski Date: Sun, 10 May 2026 21:22:32 -0600 Subject: generalized About Us for Lessons and Gigs --- lisp/service/about-us-service.lisp | 21 ++++++++++++--------- lisp/service/menu-service.lisp | 3 ++- 2 files changed, 14 insertions(+), 10 deletions(-) (limited to 'lisp/service') diff --git a/lisp/service/about-us-service.lisp b/lisp/service/about-us-service.lisp index e3df34a..1ede1d2 100644 --- a/lisp/service/about-us-service.lisp +++ b/lisp/service/about-us-service.lisp @@ -4,12 +4,14 @@ (in-package :bogenherr) (defclass about-us-service (rest-service) - () + ((category :initarg :category + :initform nil + :accessor category)) (:documentation "")) -(defun about-us-json () +(defun about-us-json (category) (with-noauth (instance about-us-service) - t)) + (setf (category instance) category))) (defclass about-us/view-service (about-us-service) ((content :initarg :content @@ -21,14 +23,15 @@ (location :initform nil)) (:documentation "")) -(defun about-us-view-json () +(defun about-us-view-json (category) (with-noauth (instance about-us/view-service) + (setf (category instance) category) (with-valid-user (user "about-us-modify") (setf (admin-p instance) nil) (setf (admin-p instance) t)) (with-bogenherr-database (let* ((general-pkg (make-instance 'general-pkg)) - (about-us (get-about-us general-pkg))) + (about-us (get-about-us general-pkg category))) (when about-us (setf (content instance) (content about-us))))))) @@ -40,22 +43,22 @@ (location-p :initform nil)) (:documentation "")) -(defun about-us-modify-json () +(defun about-us-modify-json (category) (with-auth (instance about-us/modify-service "about-us-modify") (with-bogenherr-database (let* ((general-pkg (make-instance 'general-pkg)) - (about-us (get-about-us general-pkg))) + (about-us (get-about-us general-pkg category))) (setf (form instance) (make-form "about-us-modify-form" nil nil `((:label "Content" :name "txt-content" :field-type "textarea" :value ,(content about-us) :required "required") (:label "Modify" :field-type "button" :onclick "on_about_us_modify_submit_clicked()")))))))) -(defun about-us-modify-submit-json (content) +(defun about-us-modify-submit-json (category content) (with-auth (instance about-us/modify-service "about-us-modify") (with-bogenherr-database (let* ((general-pkg (make-instance 'general-pkg)) - (about-us (get-about-us general-pkg))) + (about-us (get-about-us general-pkg category))) (when about-us (setf (content about-us) content) (update-record general-pkg about-us)))) diff --git a/lisp/service/menu-service.lisp b/lisp/service/menu-service.lisp index 9c4845c..086c58e 100644 --- a/lisp/service/menu-service.lisp +++ b/lisp/service/menu-service.lisp @@ -4,7 +4,8 @@ (in-package :bogenherr) (defparameter *menu-config* '((:id "a_menu_home" :label "Home" :handler "/home" :permissions "_Public") - (:id "a_menu_about_us" :label "About the Studio" :handler "/about-us" :permissions "_Public") + (:id "a_menu_lessons" :label "About the Studio" :handler "/lessons" :permissions "_Public") + (:id "a_menu_gigs" :label "For Hire" :handler "/gigs" :permissions "_Public") (:id "a_menu_gallery" :label "Gallery" :handler "/gallery" :permissions "_Public") ;;(:id "a_menu_testimonials" :label "Testimonials" :handler "/testimonials" :permissions "_Public") (:id "a_menu_contact_us" :label "Contact Me" :handler "/contact-us" :permissions "_Public") -- cgit v1.3