summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Benkard <code@mail.matthias.benkard.de>2010-01-15 10:27:11 +0100
committerMatthias Benkard <code@mail.matthias.benkard.de>2010-01-15 10:27:11 +0100
commiteea4f09c56dba56a32d911f20483d1969b9d2ff5 (patch)
treec39990620f830e3ff82cca6674e0dd1ee7813714
parentbbf2785c5b4591efbcac39b8577e4eefe00d2eaf (diff)
Add a comment feed for each individual journal entry.
Ignore-this: e887c34ada196099771c202fb39e6de darcs-hash:6c5ad982cb8146eb03734b9a193edadfb2da5d8a
-rwxr-xr-xjournal.lisp11
1 files 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))))))