|  |  | @ -3,11 +3,15 @@ | 
			
		
	
		
		
			
				
					
					|  |  |  |             [hiccup.core :refer [h]] |  |  |  |             [hiccup.core :refer [h]] | 
			
		
	
		
		
			
				
					
					|  |  |  |             [wanijo.infrastructure.view :as view] |  |  |  |             [wanijo.infrastructure.view :as view] | 
			
		
	
		
		
			
				
					
					|  |  |  |             [wanijo.infrastructure.routing :refer [path]] |  |  |  |             [wanijo.infrastructure.routing :refer [path]] | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             [wanijo.infrastructure.time :refer [prettify-dt]] | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             [wanijo.instance.view.view | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |              :refer [req-attrs-headings | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                      req-attrs-cells | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                      tags-for-search]] | 
			
		
	
		
		
			
				
					
					|  |  |  |             [formulare.core :as form] |  |  |  |             [formulare.core :as form] | 
			
		
	
		
		
			
				
					
					|  |  |  |             [ring.util.anti-forgery :refer [anti-forgery-field]])) |  |  |  |             [ring.util.anti-forgery :refer [anti-forgery-field]])) | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  | (defn bulk-link-selection [instance forms req] |  |  |  | (defn bulk-link-selection [instance forms req] | 
			
		
	
		
		
			
				
					
					|  |  |  |   (clojure.pprint/pprint forms) |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |   (view/layout |  |  |  |   (view/layout | 
			
		
	
		
		
			
				
					
					|  |  |  |    :request req |  |  |  |    :request req | 
			
		
	
		
		
			
				
					
					|  |  |  |    :content |  |  |  |    :content | 
			
		
	
	
		
		
			
				
					|  |  | @ -22,20 +26,29 @@ | 
			
		
	
		
		
			
				
					
					|  |  |  |      (for [{:keys [schema instances]} forms] |  |  |  |      (for [{:keys [schema instances]} forms] | 
			
		
	
		
		
			
				
					
					|  |  |  |        (list |  |  |  |        (list | 
			
		
	
		
		
			
				
					
					|  |  |  |         [:h2 "Schema " (h (:name schema))] |  |  |  |         [:h2 "Schema " (h (:name schema))] | 
			
		
	
		
		
			
				
					
					|  |  |  |         [:label |  |  |  |         (let [ident (str "name[" (:uuid schema) "]")] | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |          "Link name " |  |  |  |           [:div.sub-form | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |          [:input {:name (str "name[" (:uuid schema) "]")}]] |  |  |  |            [:label {:for ident} | 
			
				
				
			
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             "Link name"] | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |            [:input {:name ident :id ident}]]) | 
			
		
	
		
		
			
				
					
					|  |  |  |         [:table |  |  |  |         [:table | 
			
		
	
		
		
			
				
					
					|  |  |  |          [:thead |  |  |  |          [:thead | 
			
		
	
		
		
			
				
					
					|  |  |  |           [:tr |  |  |  |           [:tr | 
			
		
	
		
		
			
				
					
					|  |  |  |            [:th "Selection"] |  |  |  |            [:th "Selection"] | 
			
		
	
		
		
			
				
					
					|  |  |  |            [:th "Name"]]] |  |  |  |            [:th "Name"] | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |            (req-attrs-headings schema) | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |            [:th "Updated"] | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |            [:th "Created"]]] | 
			
		
	
		
		
			
				
					
					|  |  |  |          [:tbody |  |  |  |          [:tbody | 
			
		
	
		
		
			
				
					
					|  |  |  |           (for [{:keys [name uuid]} instances] |  |  |  |           (for [inst instances] | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |             [:tr |  |  |  |             [:tr | 
			
		
	
		
		
			
				
					
					|  |  |  |              [:td {:style "text-align: center;"} |  |  |  |              [:td {:style "text-align: center;"} | 
			
		
	
		
		
			
				
					
					|  |  |  |               [:input {:type "checkbox" |  |  |  |               [:input {:type "checkbox" | 
			
		
	
		
		
			
				
					
					|  |  |  |                        :name (str "instances[" (:uuid schema) "]") |  |  |  |                        :name (str "instances[" (:uuid schema) "]") | 
			
		
	
		
		
			
				
					
					|  |  |  |                        :value uuid}]] |  |  |  |                        :value (:uuid inst)}]] | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |              [:td (h name)]])]])) |  |  |  |              [:td (h (:name inst)) | 
			
				
				
			
		
	
		
		
	
		
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |               (tags-for-search inst)] | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |              (req-attrs-cells schema inst) | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |              [:td (-> inst :updated_at prettify-dt)] | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |              [:td (-> inst :created_at prettify-dt)]])]])) | 
			
		
	
		
		
			
				
					
					|  |  |  |      (hform/submit-button "Link!"))])) |  |  |  |      (hform/submit-button "Link!"))])) | 
			
		
	
	
		
		
			
				
					|  |  | 
 |