move new instance form to the top

integration-tests
Josha von Gizycki 6 years ago
parent 085736daf5
commit d8b9cfa533

@ -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!

Loading…
Cancel
Save