 
 @update_template_button = (path, host) ->
   if path?
-    $("#template_button").attr("href", app_root() + Routes.new_template_path({ path: path, host: host }))
+    $("#template_button").attr("href", ROOT_PATH + Routes.new_template_path({ path: path, host: host }))
     $("#template_button").removeAttr("disabled")
     $("#template_button").unbind('click', false)
   else


@update_destroy_button = (id) ->
  if id?
    $("#destroy_button").attr("href", app_root() + Routes.osc_job_path(id))
    $("#destroy_button").data("method", "DELETE")
    $("#destroy_button").removeAttr("disabled")
    $("#destroy_button").unbind('click', false)

    show_job_panel()
    $.ajax
      type: 'GET'
      url: ROOT_PATH + Routes.osc_job_path(id)
      contentType: "application/json; charset=utf-8"
      dataType: "json"
      error: (jqXHR, textStatus, errorThrown) ->
