anchor.diff: -;;;;; Copyright (c) 2012 Sven Michael Klose <pixel@copei.de>
  +; Copyright (c) 2012,2016 Sven Michael Klose <pixel@copei.de>
   
   (defmacro define-sql-editor (&key name singular-name
                                     template item-template
  
positive.code:          (set-port
             (,fn-inserter (+ ,item-presets
                              ,@(!? parent-reference-field
                                    `((list (cons ',! (integer (cadr x))))))
                              (form-data)))
             (action-redirect :remove ',action-add))
           nil)
  
negative.code: 
         (defun ,action (x)
           (set-port
             (,tpl-list `((records . ,,`(template-list [,tpl-item (+ (list (. 'link-item   (action-url :add (list ',action-item   (assoc-value 'id _))))
                                                                           (. 'link-edit   (action-url :add (list ',action-edit   (assoc-value 'id _))))
                                                                           (. 'link-remove (action-url :add (list ',action-remove (assoc-value 'id _)))))
                                                                     _)]
                                                       (,fn-find ,@(!? parent-name
                                                                       `((list (. ',parent-reference-field (integer (| .x. 0)))))))))
                          (link-add . ,,`(action-url :add (list ',action-add ,@(& parent-reference-field
                                                                                  `((| (param 'id) 0)))))))))
           (values (list x. (| .x. 0)) ..x))
  