commit
08de4ca536
|
@ -6,7 +6,8 @@ a:hover {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
a {
|
a {
|
||||||
align-self: flex-end;
|
align-self: center;
|
||||||
|
margin-top: 19px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -164,12 +165,24 @@ a:hover {
|
||||||
}
|
}
|
||||||
|
|
||||||
.contacts {
|
.contacts {
|
||||||
|
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
justify-content: center;
|
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{
|
.contacts-list{
|
||||||
height: 90vh;
|
height: 90vh;
|
||||||
overflow: scroll;
|
overflow: scroll;
|
||||||
|
|
|
@ -22,4 +22,10 @@ class ConnectionsController < ApplicationController
|
||||||
render 'new'
|
render 'new'
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def destroy
|
||||||
|
connection = current_user.connections.find_by(contact_id: params[:id].to_i)
|
||||||
|
connection.destroy
|
||||||
|
redirect_to root_path
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -20,6 +20,10 @@
|
||||||
<i class="fas fa-phone"></i>
|
<i class="fas fa-phone"></i>
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</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>
|
</div>
|
||||||
|
|
||||||
<!-- Modal -->
|
<!-- Modal -->
|
||||||
|
|
|
@ -19,6 +19,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-xs-12 col-md-6 hidden-xs hidden-sm">
|
<div class="col-xs-12 col-md-6 hidden-xs hidden-sm">
|
||||||
<div class="video-feed">
|
<div class="video-feed">
|
||||||
<div class="video-content">
|
<div class="video-content">
|
||||||
|
|
|
@ -41,6 +41,6 @@ Rails.application.routes.draw do
|
||||||
patch '/users/:id', to: 'users#update'
|
patch '/users/:id', to: 'users#update'
|
||||||
delete '/users/:id', to: 'users#destroy'
|
delete '/users/:id', to: 'users#destroy'
|
||||||
|
|
||||||
resources :connections, only: [:create]
|
resources :connections, only: [:create, :destroy]
|
||||||
get '/add_contact', to: 'connections#new', as: :add_contact
|
get '/add_contact', to: 'connections#new', as: :add_contact
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue