           clone_el.append(message)
         )
 
-    directory_mapping = (mapping) ->
+    directory_link = (link) ->
       line_el = clone_element('#repository_directories_line_prototype')
       anchor_el = $('a', line_el)
-      anchor_el.attr('href', mapping.url)
-      anchor_el.html(mapping.text)
+      anchor_el.attr('href', link.url)
+      anchor_el.html(link.text)
       console.log(line_el)
       line_el
 

      success_callback = (json, text_status, jqXHR) ->
        html = json.html
        form_tr = form.parent().parent()
        remove_form_clone(form_tr, () -> add_to_table(directory_mapping(json.mapping)))
        remove_empty_repository_hint()
        show_flash_message(json.text)


        callback() if callback
      )

    add_to_table = (link_el) ->
      table = $('#directory-listing')
      table.prepend(link_el)
      animateIn(link_el)

    animateIn = (element) ->
      element.stop(true, true).fadeIn({queue: false}).
