Aaron E Krohn

Not really sure what I did here.

... ... @@ -41,6 +41,8 @@
(item-obj)
(parent-obj)
(parent-name))
(no-cache)
(setf uri-params (parse-uri-params (request-uri* *REQUEST*)))
;; Ensure our 2nd URI param is a valid integer
... ... @@ -299,16 +301,13 @@ Param 1+: Any parameter that is an integer will be selected as
(redirect (format nil "/objective/~A/view" item-id))))
(defun project-text-summary-page ()
(let ((project-list))
(let ((item-list))
(setf project-list (project-list-active))
(dolist (project project-list)
(setf (tasks project) (task-list-all (id project))))
(project-text-summary-view project-list)))
(setf item-list (action-items-build-select nil nil '("complete")))
(action-items-list-text-view item-list)))
(defun action-item-set-status-data ()
(let ((status-types)
(uri-params)
(let ((uri-params)
(set-marked)
(status-id)
(status-type nil)
... ...
... ... @@ -33,6 +33,12 @@
(define-condition database-connect-failed (error) ())
;;;;;;;;
;; Swank remote administration
;;;;;;;;
;(swank-loader:init)
;(swank:create-server :port 1338 :dont-close t)
;;;;;;;;
;; Web server initialization
;;;;;;;;
(defvar *utf-8* (flex:make-external-format :utf-8 :eol-style :lf))
... ... @@ -45,6 +51,7 @@
:document-root *web-root-path*
:message-log-destination *message-log-path*
:access-log-destination *access-log-path*))
(defun start-web ()
(hunchentoot:start *web-server*))
(defun stop-web ()
... ...
... ... @@ -141,8 +141,8 @@
adj-func old-pri new-pri (parent-id item-obj)))
(with-transaction ()
;; For simplicity, we modify all affected projects' priority before
;; we set the priority of our target project.
;; For simplicity, we modify all affected objectives' priority before
;; we set the priority of our target objective.
(execute update-query)
(update-dao item-obj))
t))
... ... @@ -192,6 +192,7 @@
(q.ai).details
FROM q
ORDER BY breadcrumb"))
(query-dao 'action-item query-str)))
(defun action-item-update (item-id item-name item-details priority parent-id status-id)
... ...
... ... @@ -22,11 +22,13 @@
:author "Aaron E Krohn <aaron.krohn@gmail.com>"
:license "GPL v2"
:depends-on ("hunchentoot"
; "swank"
"postmodern"
"local-time"
"split-sequence"
"cl-ppcre"
"cl-who")
:components ((:file "packages")
(:file "config" :depends-on ("packages"))
(:file "classes" :depends-on ("packages"))
... ...
... ... @@ -40,7 +40,8 @@
(create-folder-dispatcher-and-handler "/css/" (web-rp-str "css/"))
;; Fixed URL dispatchers... except for the first one.
(create-regex-dispatcher "/objectives(.*)" 'action-items-list-filter-page)
(create-prefix-dispatcher "/objectives" 'action-items-list-filter-page)
(create-regex-dispatcher "/objectives/.*" 'action-items-list-filter-page)
(create-prefix-dispatcher "/objective/new" 'action-item-create-page)
(create-prefix-dispatcher "/objective/add" 'action-item-create-data)
(create-prefix-dispatcher "/objectives/report" 'action-item-text-summary-page)
... ...
... ... @@ -18,8 +18,10 @@
(in-package :pr0nage)
(defun action-items-context-menu (status)
; (print status)
; (print 'foo)
(with-html-output-to-string (*standard-output* nil :indent t)
(htm
(:ul
(:li (:a :href "/objective/new" "New Objective"))
(if (eq status :active)
... ... @@ -33,25 +35,22 @@
(htm (:li (:a :href "/objectives/archived" "Archived"))))
(if (eq status :all)
(htm (:li (:strong "All")))
(htm (:li (:a :href "/objectives/all" "All"))))))))
;; For reference
;(defun projects-list-nested-view (the-list &optional (root :null))
; (with-html-output-to-string (*standard-output* nil)
; (let ((this-list))
; (setf this-list
; (sort
; (remove-if-not
; #'(lambda (io) (eq root (parent-id io)))
; the-list)
; #'< :key
; #'priority))
; (:ul
; (dolist (item this-list)
; (htm (:li
; (fmt "~A ~A"
; (name item)
; (nest-the-list the-list (id item)))))))))
(htm (:li (:a :href "/objectives/all" "All"))))
(if (eq status :custom)
(htm (:li (:strong "Filtered")))))))
(defun action-items-list-nested-text-view (item-list &optional (root 0) (depth 0))
(let ((this-list '())
(the-list-new '()))))
(defun action-items-list-text-view (item-list)
(standard-page
(:title "Activity summary")
(:pre
(dolist (project proj-list)
(fmt "~%~A. ~A~%" (priority project) (name project))
(dolist (task (tasks project))
(fmt " - ~A~%" (name task)))))))
(defun action-items-list-nested-view (the-list status-list &optional (root 0))
(let ((this-list '())
... ... @@ -64,6 +63,7 @@
(push item this-list)
(push item the-list-new)))
;; This would be obsolete if I could get the query's ORDER BY correct
(setf this-list (sort this-list #'< :key 'priority))
(with-html-output-to-string (*standard-output* nil :indent t)
... ... @@ -97,23 +97,23 @@
(status-action-links-view
(id item)
(status-id item)
status-list))))
status-list))
(fmt "~A"
(action-items-list-nested-view
the-list-new
status-list
(id item)))))))))
(defmacro action-items-list-view (title status h3 item-list status-list)
"Create our main projects page"
`(standard-page
(:title ,title)
(action-items-context-menu ,status)
(:h3 ,h3)
(if (zerop (length ,item-list))
(id item)))))))))))
(defun action-items-list-view (title status h3 item-list status-list)
"Create our main projects page"
(standard-page
(:title title)
(:div (fmt "~A" (action-items-context-menu status)))
(:h3 (fmt "~A" h3))
(if (zerop (length item-list))
(htm (:p "No objectives found"))
(htm (:div :id "objectives-table"
(fmt "~A" (action-items-list-nested-view ,item-list ,status-list)))))))
(fmt "~A" (action-items-list-nested-view item-list status-list)))))))
(defun action-item-view-view (item-id
item-name
... ... @@ -128,6 +128,7 @@
"Define our handler for viewing projects"
(standard-page
(:title (fmt "View Objective :: ~A" item-name))
(action-items-context-menu :active)
(:h3 (fmt "Objective :: ~A" item-name) (:a :href (format nil "/objective/~A/edit" item-id) "&#x270e;"))
(:table
(:tr (:th "Name") (:td (fmt "~A" item-name)))
... ... @@ -147,7 +148,6 @@
(htm (:p "No child objectives found"))
(htm (:div :id "child-objectives" (fmt "~A" (action-items-list-nested-view child-list status-list item-id)))))))
(defun action-item-update-view (item-id item-name item-priority parent-id status-id details item-list status-type-list)
"Objective edit form"
(standard-page
... ... @@ -223,14 +223,3 @@
(:tr
(:td :colspan 2 (:input :type "submit" :value "Save" :class "btn")))))))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(defun project-text-summary-view (proj-list)
(standard-page
(:title "Activity summary")
(:pre
(dolist (project proj-list)
(fmt "~%~A. ~A~%" (priority project) (name project))
(dolist (task (tasks project))
(fmt " - ~A~%" (name task)))))))
... ...
... ... @@ -23,7 +23,7 @@
`(with-html-output-to-string (*standard-output* nil :prologue t :indent t)
(:html :lang "en"
(:head
(:meta :charset=utf-8)
(:meta :charset "utf-8")
(:title ,title)
(:link :type "text/css"
:rel "stylesheet"
... ... @@ -31,10 +31,9 @@
(:body
(:div :id "header"
(:a :href "/objectives"
:border 0
(:img :src "/img/logo.png"
:alt "PR0ject maNAGEment"
:class "logo")))
(:img :src "/img/logo.png"
:alt "PR0ject maNAGEment"
:class "logo")))
(:div :id "navigation"
(:ul
(:li (:a :href "/objectives" "Home"))
... ...