From 252095da751cc09dcbfeadbcfac15b148d279898 Mon Sep 17 00:00:00 2001 From: Matthias Andreas Benkard Date: Thu, 10 Mar 2011 21:04:05 +0100 Subject: Add a table of all journal articles to the journal archive page. --- mulkcms.lisp | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) (limited to 'mulkcms.lisp') 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 -- cgit v1.2.3