This commit is contained in:
Andrey Antukh 2015-12-14 20:31:21 +02:00
parent 56f7613453
commit 6b6aba7358
8 changed files with 258 additions and 37 deletions

View file

@ -197,25 +197,27 @@
(defn project-render
[own project]
(html
[:div.grid-item.project-th {:on-click (constantly nil)
:key (:uuid project)}
[:h3 (:name project)]
[:span.project-th-update
(str "Updated " (ago (:last-update project)))]
[:div.project-th-actions
[:div.project-th-icon.pages
icons/page
[:span 0]]
[:div.project-th-icon.comments
i/chat
[:span 0]]
[:div.project-th-icon.delete
{:on-click #(do
(dom/stop-propagation %)
;; (actions/delete-project conn uuid)
%)}
icons/trash]]]))
(println "project-render" project)
(let [on-click #(rs/emit! (dp/go-to-project (:id project)))]
(html
[:div.grid-item.project-th {:on-click on-click
:key (:id project)}
[:h3 (:name project)]
[:span.project-th-update
(str "Updated " (ago (:last-update project)))]
[:div.project-th-actions
[:div.project-th-icon.pages
icons/page
[:span 0]]
[:div.project-th-icon.comments
i/chat
[:span 0]]
[:div.project-th-icon.delete
{:on-click #(do
(dom/stop-propagation %)
;; (actions/delete-project conn uuid)
%)}
icons/trash]]])))
(def project-item
(util/component