<%
view_data = service_response.view_data
# Generate a hyperlink for standard service action with
# class "ajax_window" for unobtrusive JS. 
%>
<% if current_user and view_data[:request_link_supports_ajax_call] %>
  <%= link_to("Request", new_holding_request_url(service_response.id), 
    target: "_blank", class: "btn btn-primary ajax_window") %>
<% elsif current_user # Ordinary href link to request_url (without ajax). %>
  <%= link_to("Request", new_holding_request_url(service_response.id), 
    target: "_blank", class: "btn btn-primary") %>
<% else #Send to login screen. %>
  <%= link_to("Request", login_url({return_url: current_permalink_url, service_response_id: service_response.id}), 
    target: "_blank", class: "btn btn-primary") %>
<% end %>

<%
view_data = service_response.view_data
# Generate a hyperlink for standard service action with
# class "ajax_window" for unobtrusive JS. 
%>
<% if current_user and view_data[:request_link_supports_ajax_call] %>
  <%= link_to("Request", new_holding_request_url(service_response.id), 
    target: "_blank", class: "btn btn-primary ajax_window") %>
<% elsif current_user # Ordinary href link to request_url (without ajax). %>
  <%= link_to("Request", new_holding_request_url(service_response.id), 
    target: "_blank", class: "btn btn-primary") %>
<% else #Send to login screen. %>
  <%= link_to("Request", login_url({return_url: url_for_request(@user_request), service_response_id: service_response.id}), 
    target: "_blank", class: "btn btn-primary") %>
<% end %>

Update request login for new umlaut since we don't always have a current URL :sunflower:
Update request login for new umlaut since we don't always have a current URL :sunflower:
