[bknr-cvs] r2411 - branches/bos/projects/bos/web
ksprotte at common-lisp.net
ksprotte at common-lisp.net
Mon Jan 28 16:09:33 UTC 2008
Author: ksprotte
Date: Mon Jan 28 11:09:33 2008
New Revision: 2411
Modified:
branches/bos/projects/bos/web/news-handlers.lisp
Log:
a test commit for #7
Modified: branches/bos/projects/bos/web/news-handlers.lisp
==============================================================================
--- branches/bos/projects/bos/web/news-handlers.lisp (original)
+++ branches/bos/projects/bos/web/news-handlers.lisp Mon Jan 28 11:09:33 2008
@@ -11,22 +11,23 @@
(defmethod handle-object-form ((handler edit-news-handler) action (news-item (eql nil)) req)
(let ((language (session-variable :language)))
- (with-bos-cms-page (req :title "Choose news item to edit")
+ (with-bos-cms-page (req :title "Edit news items")
(content-language-chooser req)
- (if (all-news-items)
- (html
- (:h2 "Choose existing news item")
- (:ul
- (dolist (news-item (all-news-items))
- (let ((id (store-object-id news-item)))
- (html (:li (cmslink #?"edit-news/$(id)"
- (:princ-safe (format-date-time (news-item-time news-item)))
- " - "
- (:princ-safe (or (news-item-title news-item language) "[no title in this language]")))))))))
- (html
- (:h2 "No news items created yet")))
+ (:h2 "Create new item")
((:form :method "post")
- (submit-button "new" "new")))))
+ (submit-button "new" "new"))
+ (if (all-news-items)
+ (html
+ (:h2 "Choose existing news item")
+ (:ul
+ (dolist (news-item (all-news-items))
+ (let ((id (store-object-id news-item)))
+ (html (:li (cmslink #?"edit-news/$(id)"
+ (:princ-safe (format-date-time (news-item-time news-item)))
+ " - "
+ (:princ-safe (or (news-item-title news-item language) "[no title in this language]")))))))))
+ (html
+ (:h2 "No news items created yet"))))))
(defmethod handle-object-form ((handler edit-news-handler) (action (eql :new)) (news-item (eql nil)) req)
(redirect (format nil "/edit-news/~D" (store-object-id (make-news-item))) req))
More information about the Bknr-cvs
mailing list