From eea4f09c56dba56a32d911f20483d1969b9d2ff5 Mon Sep 17 00:00:00 2001 From: Matthias Benkard Date: Fri, 15 Jan 2010 10:27:11 +0100 Subject: Add a comment feed for each individual journal entry. Ignore-this: e887c34ada196099771c202fb39e6de darcs-hash:6c5ad982cb8146eb03734b9a193edadfb2da5d8a --- journal.lisp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/journal.lisp b/journal.lisp index d03c4ba..071c1fa 100755 --- a/journal.lisp +++ b/journal.lisp @@ -39,7 +39,8 @@ (:index "") (:full-index "/?full") (:view-atom-feed (values "/feed")) - (:view-comment-feed (values "/comment-feed")) + (:view-comment-feed (cond (post-id (values "/comment-feed/~D" post-id)) + (t "/comment-feed"))) (:view (cond (comment-id (values "/~D#comment-~D" post-id comment-id)) (post-id (values "/~D" post-id)) (t "/"))) @@ -103,7 +104,9 @@ :flatp t)) (with-slots (entry uuid date body author website spam-p id) journal-comment - (unless spam-p + (when (and (not spam-p) + (or (not *post-number*) + (= (id-of entry) *post-number*))) (incf number) (with-tag ("entry") (emit-simple-tags :title (format nil "Kommentar zu: ~A" (title-of entry)) @@ -337,6 +340,10 @@ (<:button :type "submit" (<:as-is "Bearbeiten")))) " | " + (<:a :href (link-to :view-atom-feed :post-id id) + (<:as-is + (format nil "Kommentarfeed (Atom)" (length comments)))) + " | " (<:a :href (link-to :view :post-id id) (<:as-is (format nil "~D Kommentar~:*~[e~;~:;e~]" (length comments)))))) -- cgit v1.2.3