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.
23 lines
835 B
23 lines
835 B
(ns wanijo.instance.view.link-selection
|
|
(:require [hiccup.form :as hform]
|
|
[hiccup.core :refer [h]]
|
|
[wanijo.infra.view :as view]
|
|
[wanijo.infra.routing :refer [path]]
|
|
[formulare.core :as form]))
|
|
|
|
(defn link-selection [instance schema form req]
|
|
(view/layout
|
|
:request req
|
|
:title (str (:name instance) " - " (-> instance :schema :name))
|
|
:content
|
|
[[:h1
|
|
[:small "Link " (-> instance :schema :name h) " "]
|
|
(h (:name instance))
|
|
[:small " with "]
|
|
(h (:name schema))]
|
|
(hform/form-to [:post (path :instance-link-create
|
|
{:uuid (:uuid instance)
|
|
:schema-uuid (:uuid schema)})]
|
|
(form/render-widgets form nil req)
|
|
(hform/submit-button "Link!"))]))
|