Merge pull request #27 from beatriceo/contacts

fixed contacts and added a scrollable feature
This commit is contained in:
Beatrice Olivera 2018-08-31 12:05:37 +01:00 committed by GitHub
commit 9828142868
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 39 additions and 1 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

View File

@ -123,3 +123,31 @@ a:hover {
justify-content: center;
align-items: center;
}
.contact {
color: white;
}
.contacts {
height: 570px;
overflow: scroll;
}

View File

@ -1,7 +1,7 @@
<div class="container">
<div class="contacts-container text-color">
<div class="contacts half">
<h2>Contacts</h2>
<h2 class="contact">Contacts</h2>
<% current_user.contacts.each do |contact| %>
<%= render "pages/contact", contact: contact %>
<% end %>

View File

@ -0,0 +1,10 @@
<%= simple_form_for(@page) do |p| %>
<%= p.input :first_name, as: :text, input_html: { autocomplete: "off" } %>
<%= p.input :last_name, as: :text, input_html: { autocomplete: "off" } %>
<%= p.input :email, as: :text, input_html: { autocomplete: "off" } %>
<%= p.input :photo %>
<%= p.input :photo_cache, as: :hidden %>
<%= p.button :submit, class: "btn btn-primary" %>
<% end %>