You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 lines
787 B
28 lines
787 B
(ns wanijo.instance.view.starred
|
|
(:require [hiccup.core :refer [h]]
|
|
[wanijo.infra.view :as view]
|
|
[wanijo.infra.routing :refer [path]]
|
|
[wanijo.infra.time :refer [prettify-dt]]))
|
|
|
|
(defn starred [instances req]
|
|
(view/layout
|
|
:request req
|
|
:content
|
|
[[:h1 "Starred instances"]
|
|
[:table
|
|
[:thead
|
|
[:tr
|
|
[:th "Name"]
|
|
[:th "Starred"]
|
|
[:th "Updated"]
|
|
[:th "Created"]]]
|
|
[:tbody
|
|
(for [instance instances]
|
|
[:tr
|
|
[:td
|
|
[:a {:href (path :instance-show instance)}
|
|
(h (:name instance))]]
|
|
[:td (prettify-dt (:starred_at instance))]
|
|
[:td (prettify-dt (:updated_at instance))]
|
|
[:td (prettify-dt (:created_at instance))]])]]]))
|