mirror of
https://github.com/diaspora/diaspora.git
synced 2026-01-09 23:28:02 -05:00
simple filter on contacts index page (my/all contacts)
This commit is contained in:
@@ -7,7 +7,15 @@ class ContactsController < ApplicationController
|
||||
|
||||
def index
|
||||
@aspect = :manage
|
||||
@contacts = current_user.contacts.includes(:aspects, :person => :profile).order('contacts.id DESC').paginate(:page => params[:page], :per_page => 25)
|
||||
|
||||
@all_contacts_count = current_user.contacts.count
|
||||
@my_contacts_count = current_user.contacts.receiving.count
|
||||
|
||||
unless params[:set] == "all"
|
||||
@contacts = current_user.contacts.receiving.includes(:aspects, :person => :profile).order('contacts.id DESC').paginate(:page => params[:page], :per_page => 25)
|
||||
else
|
||||
@contacts = current_user.contacts.includes(:aspects, :person => :profile).order('contacts.id DESC').paginate(:page => params[:page], :per_page => 25)
|
||||
end
|
||||
end
|
||||
|
||||
def sharing
|
||||
|
||||
Reference in New Issue
Block a user