app/views/bookingsync_portal/admin/rentals/_connected_rental.html.erb
<div id="<%= dom_id rental %>"
class="panel panel-connected <%= "pending" unless rental.remote_rental.synchronized? %>">
<div class="panel-body-grid">
<div class="panel-body-grid-photo">
<%- if rental.ordered_photos.first -%>
<%= image_tag rental.ordered_photos.first.thumb_url, class: "img-responsive" %>
<%- end -%>
</div>
<div class="panel-body-grid-text">
<h4 title="<%= RemoteRental.human_attribute_name(:uid) %>: <%= remote_rental.uid %>">
<%= rental.name %><br>
<small><%= remote_rental.display_name %></small>
</h4>
<div class="status">
<%= link_to BookingsyncPortal::Engine.routes.url_helpers.admin_connection_path(rental.connection),
class: ["btn", "btn-xs", "remove-connection", rental.remote_rental.synchronized? ? "btn-success" : "btn-warning"],
data: { disable_with: t('.disconnecting_rental') }, method: :delete, remote: true do %>
<% unless rental.remote_rental.synchronized? %>
<span class="hover_hide"><%= icon('spinner') %></span>
<% else %>
<span class="hover_hide"><%= icon('check') %></span>
<% end %>
<span class="hover_show"><%= t('.disconnect_rental') %></span>
<% end %>
</div>
<p class="text-overflow"><%= rental_details(rental) %></p>
</div>
</div>
</div>