Skip to content
Extraits de code Groupes Projets
Valider 44b77c58 rédigé par danielgrippi's avatar danielgrippi
Parcourir les fichiers

just have a remove from aspect icon when viewing an aspect in contacts index

parent f9a23b81
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -20,6 +20,13 @@ class AspectMembershipsController < ApplicationController ...@@ -20,6 +20,13 @@ class AspectMembershipsController < ApplicationController
flash.now[:notice] = I18n.t 'aspect_memberships.destroy.success' flash.now[:notice] = I18n.t 'aspect_memberships.destroy.success'
respond_to do |format|
format.all {}
format.html{
redirect_to :back
}
end
else else
flash.now[:error] = I18n.t 'aspect_memberships.destroy.failure' flash.now[:error] = I18n.t 'aspect_memberships.destroy.failure'
errors = membership ? membership.errors.full_messages : t('aspect_memberships.destroy.no_membership') errors = membership ? membership.errors.full_messages : t('aspect_memberships.destroy.no_membership')
......
...@@ -12,7 +12,8 @@ class ContactsController < ApplicationController ...@@ -12,7 +12,8 @@ class ContactsController < ApplicationController
@my_contacts_count = current_user.contacts.receiving.count @my_contacts_count = current_user.contacts.receiving.count
if params["a_id"] if params["a_id"]
@contacts = current_user.aspects.find(params["a_id"]).contacts.includes(:aspects, :person => :profile).order('profiles.last_name ASC').paginate(:page => params[:page], :per_page => 25) @aspect_ = current_user.aspects.find(params["a_id"])
@contacts = @aspect_.contacts.includes(:aspects, :person => :profile).order('profiles.last_name ASC').paginate(:page => params[:page], :per_page => 25)
elsif params[:set] != "all" elsif params[:set] != "all"
@contacts = current_user.contacts.receiving.includes(:aspects, :person => :profile).order('profiles.last_name ASC').paginate(:page => params[:page], :per_page => 25) @contacts = current_user.contacts.receiving.includes(:aspects, :person => :profile).order('profiles.last_name ASC').paginate(:page => params[:page], :per_page => 25)
else else
......
...@@ -5,14 +5,6 @@ ...@@ -5,14 +5,6 @@
:javascript :javascript
$(document).ready(function(){ $(document).ready(function(){
$("#people_stream").infinitescroll({
navSelector : ".pagination",
nextSelector : ".next_page",
itemSelector : ".stream_element",
loadingText: "",
loadingImg: '/images/ajax-loader.gif',
bufferPx: 400
});
}); });
- content_for :page_title do - content_for :page_title do
...@@ -53,9 +45,21 @@ ...@@ -53,9 +45,21 @@
.stream_element{:id => contact.person.id} .stream_element{:id => contact.person.id}
.right .right
= render :partial => 'people/relationship_action', - if @aspect_
:locals => { :person => contact.person, :contact => contact, = link_to(image_tag('/images/icons/monotone_close_exit_delete.png', :height => 20, :width => 20),
:current_user => current_user } {:controller => "aspect_memberships",
:action => 'destroy',
:id => 42,
:aspect_id => @aspect_.id,
:person_id => contact.person.id},
:title => "Remove #{contact.person.first_name} from \"#{@aspect_.name}\"",
:method => 'delete')
- else
= render :partial => 'people/relationship_action',
:locals => { :person => contact.person, :contact => contact,
:current_user => current_user }
= person_image_link(contact.person) = person_image_link(contact.person)
.content .content
%span.from %span.from
......
...@@ -3031,6 +3031,13 @@ ul#left_nav ...@@ -3031,6 +3031,13 @@ ul#left_nav
:min-height 30px :min-height 30px
.right .right
:top 16px :top 16px
a
@include opacity(0.3)
&:hover
@include opacity(1)
.from .from
:position relative :position relative
a a
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter