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.
wanijo/src/wanijo/tag/view.clj

22 lines
726 B

(ns wanijo.tag.view
(:require [hiccup.form :as hform]
[hiccup.core :refer [h]]
[ring.util.anti-forgery :refer [anti-forgery-field]]
[formulare.core :as form]
[wanijo.tag.forms :as forms]
[wanijo.framework.routing :refer [path]]))
(defn tag-list [tags]
[:ul.tag-list
(for [tag tags]
[:li
[:code ":" (h (:name tag))]])])
(defn new-tag-form [{uuid :uuid}]
(list
(hform/form-to [:post (path :tag-create {:instance-uuid uuid})]
(form/render-widgets forms/new-tag {} {})
(hform/submit-button "Tag!"))
[:small (str "Comma separate each tag. "
"Tag names must not contain whitespace.")]))