                       ".txt"
                       nil))]
     (if extension
-      [:a {:href (str base extension)} "dump #" (:id row)]
-      [:div "No dump file for game " (:id row)])))
+      [:a {:href (str base extension)} (:id row)]
+      (:id row))))
+
+;;[:td [:a {:href (str "/game/" (:id row))} (:id row)]]
+
+(defn pretty-date [date]
+  (let [date (str date)]
+    (if (= (count date) 8)
+      (str (.substring date 0 4) "-"
+           (.substring date 4 6) "-"
+           (.substring date 6 8))
+      date)))
 
 
 (defn rs-row-to-tr [row]
   [:tr
-   [:td [:a {:href (str "/game/" (:id row))} (:id row)]]
+   [:td (make-dump-link row)]
    [:td [:a {:href (str "/user/" (:name row))} (:name row)]]
    [:td (:points row)]
    [:td (:turns row)]
-   [:td (:deathdate row)]
+   [:td (:deathdate (pretty-date row))]
    [:td [:a {:href (str "/cause/" (url-encode (:death_uniq row)))} (:death row)]]])
 
 (defn rs-to-table [rs]


(defn page-not-found []
  "<h1>Page not found</h1>")

(defn make-dump-link [row]
  (let [base (str "/user/" (:name row) "/dumps/" (:name row ) "." (:endtime row))

            [:br]
            (sql/with-query-results
              rs2
              ["select * from xlogfile where name = ? order by endtime desc limit 100" name]
              (doall rs2)
              (rs-to-table rs2))]))))))

