diff --git a/src/wanijo/instance/view.clj b/src/wanijo/instance/view.clj index f8139d4..8766c9a 100644 --- a/src/wanijo/instance/view.clj +++ b/src/wanijo/instance/view.clj @@ -18,6 +18,12 @@ :content [[:h1 "All Instances of schema " [:span.schema-title__name (h (:name schema))]] + [:h1 "New Instance"] + (hform/form-to [:post (path :instance-new)] + (form/render-widgets new-form {} req) + (hform/hidden-field "schema-uuid" + (:uuid schema)) + (hform/submit-button "Create!")) [:table [:thead [:tr @@ -31,13 +37,7 @@ [:a {:href (path :instance-show instance)} (h (:name instance))]] [:td (prettify-dt (:updated_at instance))] - [:td (prettify-dt (:created_at instance))]])]] - [:h1 "New Instance"] - (hform/form-to [:post (path :instance-new)] - (form/render-widgets new-form {} req) - (hform/hidden-field "schema-uuid" - (:uuid schema)) - (hform/submit-button "Create!"))])) + [:td (prettify-dt (:created_at instance))]])]]])) (defn show! [instance req] (view/layout! @@ -56,7 +56,7 @@ "Edit Instance"] " | " [:a {:href (path :vis-index)} - "Start visualisation"]]] + "Start visualisation"]]] (when (seq (:properties instance)) [:section.properties [:h2 "Properties"]