|  |  |  | @ -35,7 +35,8 @@ | 
		
	
		
			
				|  |  |  |  |   {:fields {:assigned {:label "Users" | 
		
	
		
			
				|  |  |  |  |                        :required false | 
		
	
		
			
				|  |  |  |  |                        :spec ::domain/assigned-to | 
		
	
		
			
				|  |  |  |  |                        :widget :mselect} | 
		
	
		
			
				|  |  |  |  |                        :widget :mselect | 
		
	
		
			
				|  |  |  |  |                        :from-req #(if (vector? %) % [%])} | 
		
	
		
			
				|  |  |  |  |             :uuid {:widget :hidden}}}) | 
		
	
		
			
				|  |  |  |  | 
 | 
		
	
		
			
				|  |  |  |  | (defn overview! [req] | 
		
	
	
		
			
				
					|  |  |  | @ -74,10 +75,6 @@ | 
		
	
		
			
				|  |  |  |  |     (hform/form-to [:post (path :schema-edit)] | 
		
	
		
			
				|  |  |  |  |                    (form/render-widgets form schema req) | 
		
	
		
			
				|  |  |  |  |                    (hform/submit-button "Edit")) | 
		
	
		
			
				|  |  |  |  |     [:h3 "Assign to users"] | 
		
	
		
			
				|  |  |  |  |     (hform/form-to [:post (path :schema-assign)] | 
		
	
		
			
				|  |  |  |  |                    (form/render-widgets assign-form schema req) | 
		
	
		
			
				|  |  |  |  |                    (hform/submit-button "Assign")) | 
		
	
		
			
				|  |  |  |  |     [:h2 "Attributes"] | 
		
	
		
			
				|  |  |  |  |     [:ul.schema-attributes | 
		
	
		
			
				|  |  |  |  |      (for [attr attrs] | 
		
	
	
		
			
				
					|  |  |  | @ -96,6 +93,23 @@ | 
		
	
		
			
				|  |  |  |  |                    (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)] | 
		
	
	
		
			
				
					|  |  |  | 
 |