about summary refs log tree commit diff
path: root/app/views
diff options
context:
space:
mode:
authorIan McCowan <imccowan@gmail.com>2018-02-25 18:31:28 -0800
committerEugen Rochko <eugen@zeonfederated.com>2018-02-26 03:31:28 +0100
commitc33931b613c7da4cc2c22ff8411c38556dc579cb (patch)
tree87b59f8a474cddad9d888b1f6499daf52da9fd2a /app/views
parent5cc716688abdf7eaafc58d804209510601190791 (diff)
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
Diffstat (limited to 'app/views')
-rw-r--r--app/views/accounts/show.html.haml7
1 files changed, 5 insertions, 2 deletions
diff --git a/app/views/accounts/show.html.haml b/app/views/accounts/show.html.haml
index accad5f78..21c585dab 100644
--- a/app/views/accounts/show.html.haml
+++ b/app/views/accounts/show.html.haml
@@ -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'