done
This commit is contained in:
parent
ebdad02216
commit
480fbbdbfb
|
@ -6,7 +6,8 @@ a:hover {
|
|||
display: flex;
|
||||
justify-content: space-between;
|
||||
a {
|
||||
align-self: flex-end;
|
||||
align-self: center;
|
||||
margin-top: 19px;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -145,6 +146,19 @@ a:hover {
|
|||
overflow: scroll;
|
||||
}
|
||||
|
||||
.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);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -15,4 +15,10 @@ class ConnectionsController < ApplicationController
|
|||
|
||||
end
|
||||
end
|
||||
|
||||
def destroy
|
||||
connection = current_user.connections.find_by(contact_id: params[:id].to_i)
|
||||
connection.destroy
|
||||
redirect_to root_path
|
||||
end
|
||||
end
|
||||
|
|
|
@ -6,4 +6,3 @@
|
|||
|
||||
<%= f.submit %>
|
||||
<% end %>
|
||||
</div>
|
||||
|
|
|
@ -26,6 +26,10 @@ end
|
|||
<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>
|
||||
|
||||
|
||||
|
|
|
@ -12,6 +12,8 @@
|
|||
<%= render "pages/contact", contact: contact %>
|
||||
<% end %>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<div class="video-feed half">
|
||||
<div class="video-content">
|
||||
|
|
|
@ -42,6 +42,6 @@ Rails.application.routes.draw do
|
|||
patch '/users/:id', to: 'users#update'
|
||||
delete '/users/:id', to: 'users#destroy'
|
||||
|
||||
resources :connections, only: [:create, :new]
|
||||
resources :connections, only: [:create, :new, :destroy]
|
||||
#get '/add_contact', to: 'connections#create'
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue