2018-08-28 16:18:58 +00:00
|
|
|
|
<div class="card">
|
|
|
|
|
<div class="info">
|
2018-08-31 14:06:42 +00:00
|
|
|
|
<% if contact.photo.url.nil? %>
|
|
|
|
|
<img src="https://upload.wikimedia.org/wikipedia/commons/8/89/Portrait_Placeholder.png" class="avatar profile dropdown-toggle img-circle" width=65>
|
|
|
|
|
<% else %>
|
2018-09-06 11:32:44 +00:00
|
|
|
|
<%= cl_image_tag(contact.photo, class: "profile avatar dropdown-toggle img-circle", width:65, transformation: [
|
2018-09-06 13:07:15 +00:00
|
|
|
|
{ gravity: "face:auto", width: 500, height: 500, radius: "max", crop: "crop" }
|
2018-09-06 11:32:44 +00:00
|
|
|
|
])%>
|
2018-08-31 14:06:42 +00:00
|
|
|
|
<% end %>
|
2018-08-28 16:18:58 +00:00
|
|
|
|
<div class="text text-color">
|
2018-08-31 20:32:35 +00:00
|
|
|
|
<% if contact.first_name.nil? || contact.last_name.nil? %>
|
2018-08-30 02:00:09 +00:00
|
|
|
|
<p><%= contact.email %></p>
|
|
|
|
|
<% else %>
|
2018-08-31 20:32:35 +00:00
|
|
|
|
<p><%= contact.first_name %> <%= contact.last_name %></p>
|
2018-08-30 02:00:09 +00:00
|
|
|
|
<% end %>
|
2018-08-28 16:18:58 +00:00
|
|
|
|
<p class="darker">Last call: <%= Time.now %></p>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2018-08-30 02:00:09 +00:00
|
|
|
|
<div class="call" data-user-id="<%= contact.id %>">
|
2018-08-31 20:38:48 +00:00
|
|
|
|
<!-- Calls establish_call in pages_controller -->
|
2018-09-01 19:23:53 +00:00
|
|
|
|
<%= link_to establish_call_path(contact.id), remote: true, class: "modalTrigger", data: {'user-id': contact.id } do %>
|
2018-08-28 16:18:58 +00:00
|
|
|
|
<i class="fas fa-phone"></i>
|
|
|
|
|
<% end %>
|
|
|
|
|
</div>
|
2018-09-03 13:10:45 +00:00
|
|
|
|
<%= link_to connection_path(contact), method: :delete do %>
|
2018-09-03 17:59:32 +00:00
|
|
|
|
<button type="button" class="close close-location" data-dismiss="modal" aria-label="close"><span aria-hidden="true">×</span></button>
|
2018-09-03 13:10:45 +00:00
|
|
|
|
<% end %>
|
2018-08-28 16:18:58 +00:00
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<!-- Modal -->
|
2018-09-01 19:23:53 +00:00
|
|
|
|
<div class="modal fade" id="myModal<%= contact.id %>" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
|
2018-08-28 17:26:33 +00:00
|
|
|
|
<div class="vertical-alignment-helper">
|
|
|
|
|
<div class="modal-dialog vertical-align-center">
|
|
|
|
|
<div class="modal-content modal-color">
|
|
|
|
|
<div class="modal-header">
|
2018-09-01 19:23:53 +00:00
|
|
|
|
<%= link_to "#", class:"pull-right", 'data-dismiss':"modal", 'data-target':"#myModal#{contact.id}" do %>
|
2018-08-28 17:26:33 +00:00
|
|
|
|
<i class="fas fa-times-circle"></i>
|
|
|
|
|
<% end %>
|
2018-09-03 17:32:03 +00:00
|
|
|
|
|
|
|
|
|
<div class="modal-container">
|
2018-08-31 19:12:43 +00:00
|
|
|
|
<% if contact.photo.url.nil? %>
|
2018-09-03 09:25:20 +00:00
|
|
|
|
<img src="https://upload.wikimedia.org/wikipedia/commons/8/89/Portrait_Placeholder.png" class="avatar profile dropdown-toggle img-circle modal-picture" width=150>
|
2018-08-31 19:12:43 +00:00
|
|
|
|
<% else %>
|
2018-09-06 11:32:44 +00:00
|
|
|
|
<%= cl_image_tag(contact.photo, class: "profile avatar dropdown-toggle img-circle modal-picture", width:150, transformation: [
|
2018-09-06 13:07:15 +00:00
|
|
|
|
{ gravity: "face:auto", width: 500, height: 500, radius: "max", crop: "crop" }])%>
|
2018-08-31 19:12:43 +00:00
|
|
|
|
<% end %>
|
2018-08-28 17:26:33 +00:00
|
|
|
|
<div class="modal-text">
|
|
|
|
|
<h4 class="modal-title" id="myModalLabel">Calling</h4>
|
2018-08-30 02:00:09 +00:00
|
|
|
|
<h4>
|
|
|
|
|
<strong>
|
2018-08-31 20:32:35 +00:00
|
|
|
|
<% if contact.first_name.nil? || contact.last_name.nil? %>
|
2018-08-30 02:00:09 +00:00
|
|
|
|
<p><%= contact.email %></p>
|
|
|
|
|
<% else %>
|
2018-08-31 20:32:35 +00:00
|
|
|
|
<p><%= contact.first_name %> <%= contact.last_name %></p>
|
2018-08-30 02:00:09 +00:00
|
|
|
|
<% end %>
|
|
|
|
|
</strong>
|
|
|
|
|
</h4>
|
2018-08-28 17:26:33 +00:00
|
|
|
|
</div>
|
2018-08-28 16:18:58 +00:00
|
|
|
|
</div>
|
2018-09-03 17:32:03 +00:00
|
|
|
|
|
2018-08-28 16:18:58 +00:00
|
|
|
|
</div>
|
2018-08-28 17:26:33 +00:00
|
|
|
|
</div>
|
2018-08-28 16:18:58 +00:00
|
|
|
|
</div>
|
2018-08-28 17:26:33 +00:00
|
|
|
|
</div>
|
2018-08-28 16:18:58 +00:00
|
|
|
|
</div>
|
2018-08-31 10:29:24 +00:00
|
|
|
|
|