|
|
|
@ -75,6 +75,23 @@
|
|
|
|
|
(hform/form-to [:post (path :schema-edit)]
|
|
|
|
|
(form/render-widgets form schema req)
|
|
|
|
|
(hform/submit-button "Edit"))
|
|
|
|
|
[:h2 "Permissions"]
|
|
|
|
|
[:h3 "Read permissions"]
|
|
|
|
|
(hform/form-to [:post (path :schema-assign)]
|
|
|
|
|
(form/render-widgets assign-form
|
|
|
|
|
(assoc schema :assigned
|
|
|
|
|
(:assigned-read-users schema))
|
|
|
|
|
req)
|
|
|
|
|
(hform/hidden-field "permission" "read")
|
|
|
|
|
(hform/submit-button "Assign"))
|
|
|
|
|
[:h3 "Write permissions"]
|
|
|
|
|
(hform/form-to [:post (path :schema-assign)]
|
|
|
|
|
(form/render-widgets assign-form
|
|
|
|
|
(assoc schema :assigned
|
|
|
|
|
(:assigned-write-users schema))
|
|
|
|
|
req)
|
|
|
|
|
(hform/hidden-field "permission" "write")
|
|
|
|
|
(hform/submit-button "Assign"))
|
|
|
|
|
[:h2 "Attributes"]
|
|
|
|
|
[:ul.schema-attributes
|
|
|
|
|
(for [attr attrs]
|
|
|
|
@ -93,23 +110,6 @@
|
|
|
|
|
(form/render-widgets attr-form {} req)
|
|
|
|
|
(hform/hidden-field "schema" (:uuid schema))
|
|
|
|
|
(hform/submit-button "Create"))
|
|
|
|
|
[:h2 "Permissions"]
|
|
|
|
|
[:h3 "Read permissions"]
|
|
|
|
|
(hform/form-to [:post (path :schema-assign)]
|
|
|
|
|
(form/render-widgets assign-form
|
|
|
|
|
(assoc schema :assigned
|
|
|
|
|
(:assigned-read-users schema))
|
|
|
|
|
req)
|
|
|
|
|
(hform/hidden-field "permission" "read")
|
|
|
|
|
(hform/submit-button "Assign"))
|
|
|
|
|
[:h3 "Write permissions"]
|
|
|
|
|
(hform/form-to [:post (path :schema-assign)]
|
|
|
|
|
(form/render-widgets assign-form
|
|
|
|
|
(assoc schema :assigned
|
|
|
|
|
(:assigned-write-users schema))
|
|
|
|
|
req)
|
|
|
|
|
(hform/hidden-field "permission" "write")
|
|
|
|
|
(hform/submit-button "Assign"))
|
|
|
|
|
[:h2 "Actions"]
|
|
|
|
|
(hform/form-to {:class "inline"}
|
|
|
|
|
[:delete (path :schema-delete schema)]
|
|
|
|
|