move new instance form to the top

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

@ -18,6 +18,12 @@
:content :content
[[:h1 "All Instances of schema " [[:h1 "All Instances of schema "
[:span.schema-title__name (h (:name 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 [:table
[:thead [:thead
[:tr [:tr
@ -31,13 +37,7 @@
[:a {:href (path :instance-show instance)} [:a {:href (path :instance-show instance)}
(h (:name instance))]] (h (:name instance))]]
[:td (prettify-dt (:updated_at instance))] [:td (prettify-dt (:updated_at instance))]
[:td (prettify-dt (:created_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!"))]))
(defn show! [instance req] (defn show! [instance req]
(view/layout! (view/layout!

Loading…
Cancel
Save