0
0
Fork 0

Fix prev/next links on public profile page (#6497)

* Fix prev/next links on public profile page

* Don't make pagination urls if no available statuses

* Fix empty check method

* Put left chevron before prev page link

* Add scope for pagination "starting at" a given id

* Status pagination try 2:

s/prev/older and s/next/newer
"older" on left, "newer" on right
Use new scope for "newer" link
Extract magic 20 page size to constant
Remove max_id from feed pagination as it's not respected

* Reinstate max_id for accounts atom stream

* normalize
This commit is contained in:
Ian McCowan 2018-02-25 18:31:28 -08:00 committed by Eugen Rochko
parent 5cc716688a
commit c33931b613
5 changed files with 53 additions and 17 deletions

View file

@ -39,6 +39,9 @@
= render partial: 'stream_entries/status', collection: @statuses, as: :status
- if @statuses.size == 20
- if @newer_url || @older_url
.pagination
= link_to safe_join([t('pagination.next'), fa_icon('chevron-right')], ' '), @next_url, class: 'next', rel: 'next'
- if @older_url
= link_to safe_join([fa_icon('chevron-left'), t('pagination.older')], ' '), @older_url, class: 'older', rel: 'older'
- if @newer_url
= link_to safe_join([t('pagination.newer'), fa_icon('chevron-right')], ' '), @newer_url, class: 'newer', rel: 'newer'