This commit is contained in:
Benjamin Myara
2018-08-31 15:06:42 +01:00
parent d0803e7e72
commit c67849c3dc
13 changed files with 80 additions and 2 deletions

View File

@@ -0,0 +1,9 @@
<div class="align-center">
<h2>Add a new contact:</h2>
<%= form_for User.new, url: connections_path do |f| %>
<%= f.label :email, class: "email" %>:
<%= f.text_field :email %>
<%= f.submit %>
<% end %>
</div>

View File

@@ -6,7 +6,11 @@ end
<div class="card">
<div class="info">
<img src="https://kitt.lewagon.com/placeholder/users/ssaunier" alt="" class="profile img-circle" width=65>
<% 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 %>
<%= cl_image_tag contact.photo, class: "profile avatar dropdown-toggle img-circle", width:65%>
<% end %>
<div class="text text-color">
<% if contact.nil? || contact.nil? %> <!-- REPLACE WITH FIRST NAME AND LAST NAME -->
<p><%= contact.email %></p>

View File

@@ -1,10 +1,18 @@
<div class="container">
<div class="contacts-container text-color">
<div class="contacts half">
<h2>Contacts</h2>
<div class="contacts-header">
<h2>Contacts</h2>
<%= link_to new_connection_path do %>
<i class="fas fa-plus-square"></i>
<% end %>
</div>
<% current_user.contacts.each do |contact| %>
<%= render "pages/contact", contact: contact %>
<% end %>
</div>
<div class="video-feed half">
<div class="video-content">