commit
08de4ca536
|
@ -6,7 +6,8 @@ a:hover {
|
|||
display: flex;
|
||||
justify-content: space-between;
|
||||
a {
|
||||
align-self: flex-end;
|
||||
align-self: center;
|
||||
margin-top: 19px;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -164,12 +165,24 @@ a:hover {
|
|||
}
|
||||
|
||||
.contacts {
|
||||
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.close {
|
||||
margin-right: 8px;
|
||||
margin-top: -46px;
|
||||
float: right;
|
||||
font-size: 27px;
|
||||
font-weight: bold;
|
||||
line-height: 1;
|
||||
color: #F55E4F;
|
||||
text-shadow: 0 1px 0 #000;
|
||||
opacity: 0.8;
|
||||
filter: alpha(opacity=20);
|
||||
}
|
||||
|
||||
.contacts-list{
|
||||
height: 90vh;
|
||||
overflow: scroll;
|
||||
|
|
|
@ -22,4 +22,10 @@ class ConnectionsController < ApplicationController
|
|||
render 'new'
|
||||
end
|
||||
end
|
||||
|
||||
def destroy
|
||||
connection = current_user.connections.find_by(contact_id: params[:id].to_i)
|
||||
connection.destroy
|
||||
redirect_to root_path
|
||||
end
|
||||
end
|
||||
|
|
|
@ -20,6 +20,10 @@
|
|||
<i class="fas fa-phone"></i>
|
||||
<% end %>
|
||||
</div>
|
||||
<%= link_to connection_path(contact), method: :delete do %>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="close"><span aria-hidden="true">×</span></button>
|
||||
<% end %>
|
||||
|
||||
</div>
|
||||
|
||||
<!-- Modal -->
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-xs-12 col-md-6 hidden-xs hidden-sm">
|
||||
<div class="video-feed">
|
||||
<div class="video-content">
|
||||
|
|
|
@ -41,6 +41,6 @@ Rails.application.routes.draw do
|
|||
patch '/users/:id', to: 'users#update'
|
||||
delete '/users/:id', to: 'users#destroy'
|
||||
|
||||
resources :connections, only: [:create]
|
||||
resources :connections, only: [:create, :destroy]
|
||||
get '/add_contact', to: 'connections#new', as: :add_contact
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue