summaryrefslogtreecommitdiff
path: root/mulkcms.lisp
diff options
context:
space:
mode:
authorMatthias Andreas Benkard <code@mail.matthias.benkard.de>2011-03-10 21:04:05 +0100
committerMatthias Andreas Benkard <code@mail.matthias.benkard.de>2011-03-10 21:04:05 +0100
commit252095da751cc09dcbfeadbcfac15b148d279898 (patch)
tree52c2d41dfe28def323720646cb2de0a557cd325d /mulkcms.lisp
parent559777bb473f27fb0d6ec7e739856386e07fee62 (diff)
Add a table of all journal articles to the journal archive page.
Diffstat (limited to 'mulkcms.lisp')
-rw-r--r--mulkcms.lisp18
1 files changed, 14 insertions, 4 deletions
diff --git a/mulkcms.lisp b/mulkcms.lisp
index 638026e..f15b6cb 100644
--- a/mulkcms.lisp
+++ b/mulkcms.lisp
@@ -7,6 +7,7 @@
(unless (member "html-human-date" *template-formatters* :key #'car :test #'equal)
(setq *template-formatters*
(list* (cons "html-human-date" 'format-human-date)
+ (cons "html-short-human-date" 'format-short-human-date)
(cons "html-iso-date" 'format-iso-date)
(cons "article-html" 'format-article)
*template-formatters*)))
@@ -23,6 +24,10 @@
:type :wild
:directory *templates*))))
+(defun format-short-human-date (date)
+ ;; FIXME
+ "(some date)")
+
(defun format-human-date (date)
;; FIXME
"(some date)")
@@ -128,9 +133,10 @@
ORDER BY min(date) DESC"
:column)
-(defun find-journal-archive-request-handler (path &optional action characteristics)
+(defun find-journal-archive-request-handler (path full-p &optional action characteristics)
(declare (ignore action))
- (when (string= path "journal")
+ (when (or (string= path "journal")
+ (string= path "journal/"))
(lambda ()
(with-db
(let* ((articles (find-journal-articles))
@@ -141,19 +147,23 @@
(mapcar (lambda (x)
(find-article-params x characteristics))
articles)))
- (displayed-revisions (subseq revisions 0 10))
+ (displayed-revisions (if full-p revisions (subseq revisions 0 10)))
(page-skeleton (template "page_skeleton"))
(page-template (template "journal_page"))
(template-params (list :title *site-name*
:root *base-uri*
:site-name *site-name*
:site-subtitle ""
- :link ""))
+ :link ""
+ :full-archive-link ""
+ :full-archive-label "Full archive (slow!)"))
(head (expand-template page-template (list* :head t
:articles displayed-revisions
+ :minor-articles revisions
template-params)))
(body (expand-template page-template (list* :body t
:articles displayed-revisions
+ :minor-articles revisions
template-params))))
(expand-template page-skeleton (list :title *site-name*
:head head