summaryrefslogtreecommitdiffstatshomepage
path: root/tekuti/projects.scm
diff options
context:
space:
mode:
Diffstat (limited to 'tekuti/projects.scm')
-rw-r--r--tekuti/projects.scm32
1 files changed, 25 insertions, 7 deletions
diff --git a/tekuti/projects.scm b/tekuti/projects.scm
index 773ff56..bc0d7a6 100644
--- a/tekuti/projects.scm
+++ b/tekuti/projects.scm
@@ -104,10 +104,28 @@
page-list)))))))
(define* (page-project request body index project page)
- (if (file-exists? (string-append *projects-dir* project ".git"))
- (respond `(,(project-pages-menu request project (or page "summary"))
- (p "Goto: "
- (a (@ (href "http://code.ryuslash.org/cgit.cgi/"
- ,project "/" ,(or page "")))
- "cgit " ,(or page "summary")))))
- (page-not-found request body index)))
+ (let ((project-dir (string-append *projects-dir* project ".git")))
+ (if (file-exists? project-dir)
+ (respond
+ `(,(project-pages-menu request project (or page "summary"))
+ (p "Goto: "
+ (a (@ (href "http://code.ryuslash.org/cgit.cgi/"
+ ,project "/" ,(or page "")))
+ "cgit " ,(or page "summary")))
+ ,@(case (string->symbol page)
+ ((summary)
+ `((h2 "Last 10 commits")
+ (table
+ (@ (class "table table-condensed table-striped"))
+ (tr
+ (th "Time")
+ (th "Subject")
+ (th "Author"))
+ ,@(map (lambda (elm)
+ `(tr
+ (td ,(car elm))
+ (td ,(cadr elm))
+ (td ,(caddr elm))))
+ (git-latest-commits "HEAD" 10 project-dir)))))
+ (else '()))))
+ (page-not-found request body index))))