Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/diaspora/diaspora.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorSteffen van Bergerem <svbergerem@online.de>2014-10-07 12:55:58 +0400
committerSteffen van Bergerem <svbergerem@online.de>2014-10-07 12:55:58 +0400
commitd04cf7046b93d03e8d232b69afebcd0bec0e1d58 (patch)
treedc840a3038fa00c2a2c34f66c1e8a0146e3bdf5a /app
parent803c257ecf75a64ef0796ae65a940b5bf4d8d6c3 (diff)
Fix pagination for people/guid/contacts
Diffstat (limited to 'app')
-rw-r--r--app/assets/stylesheets/profile.css.scss2
-rw-r--r--app/controllers/people_controller.rb2
-rw-r--r--app/views/people/contacts.haml2
3 files changed, 4 insertions, 2 deletions
diff --git a/app/assets/stylesheets/profile.css.scss b/app/assets/stylesheets/profile.css.scss
index aabcb0e2e..00d566a87 100644
--- a/app/assets/stylesheets/profile.css.scss
+++ b/app/assets/stylesheets/profile.css.scss
@@ -119,4 +119,6 @@
}
}
+
+ .stream_container > .pagination { text-align: center; }
}
diff --git a/app/controllers/people_controller.rb b/app/controllers/people_controller.rb
index ff2783c6a..030e2cd8c 100644
--- a/app/controllers/people_controller.rb
+++ b/app/controllers/people_controller.rb
@@ -149,7 +149,6 @@ class PeopleController < ApplicationController
if @person
@contact = current_user.contact_for(@person)
@contacts_of_contact = Contact.contact_contacts_for(current_user, @person)
- @hashes = hashes_for_people @contacts_of_contact, @aspects
gon.preloads[:person] = PersonPresenter.new(@person, current_user).full_hash_with_profile
gon.preloads[:photos] = {
count: photos_from(@person).count(:all),
@@ -158,6 +157,7 @@ class PeopleController < ApplicationController
count: @contacts_of_contact.count(:all),
}
@contacts_of_contact = @contacts_of_contact.paginate(:page => params[:page], :per_page => (params[:limit] || 15))
+ @hashes = hashes_for_people @contacts_of_contact, @aspects
respond_with @person
else
flash[:error] = I18n.t 'people.show.does_not_exist'
diff --git a/app/views/people/contacts.haml b/app/views/people/contacts.haml
index 90d89e6eb..4046fdb47 100644
--- a/app/views/people/contacts.haml
+++ b/app/views/people/contacts.haml
@@ -21,7 +21,7 @@
#people_stream.stream
- @hashes.each do |hash|
= render :partial => 'people/person', :locals => hash
- = will_paginate @contacts_of_contact
+ = will_paginate @contacts_of_contact, :renderer => WillPaginate::ActionView::BootstrapLinkRenderer
%a{:id=>"back-to-top", :title=>"#{t('layouts.application.back_to_top')}", :href=>"#"}
&#8679;