         animals_ids: Object.keys(app.selectedItemsIndex)
       })}"
 
-    #TODO call modal to directly add a new intervention instead of redirect
-    Turbolinks.visit link
+    E.dialog.open link,
+      returns:
+        success: (frame, data, status, request) ->
+          frame.dialog "close"
+          return
+
+        invalid: (frame, data, status, request) ->
+          frame.html request.responseText
+          return
     false
 
 

#= require bootstrap/modal

((G, $) ->

  $(document).ajaxSend (e, xhr, options) ->
    token = $('meta[name=\'csrf-token\']').attr('content')

      window.app = new golumn(golumn_id)
      window.loadData(golumn_id, $(this))

) ekylibre, golumn, jQuery
