Page MenuHomePhabricator

Fixes T4815
Needs ReviewPublic

Authored by fejnartal on Apr 20 2017, 9:58 PM.
Tags
None
Referenced Files
F14908669: D17749.diff
Mon, Feb 10, 3:51 PM
Unknown Object (File)
Sun, Feb 9, 3:52 AM
Unknown Object (File)
Sun, Feb 9, 3:52 AM
Unknown Object (File)
Sun, Feb 9, 3:52 AM
Unknown Object (File)
Thu, Feb 6, 3:41 AM
Unknown Object (File)
Fri, Jan 24, 8:22 PM
Unknown Object (File)
Fri, Jan 24, 8:22 PM
Unknown Object (File)
Fri, Jan 24, 8:22 PM
Subscribers

Details

Reviewers
epriestley
Group Reviewers
Blessed Reviewers
Summary

Replicated the class PHUIPagerView.php to implement a [Prev][Next] pager
with fixed pageSize=1 and surroundingPages=0.

I had to work around the fact that in Phriction the last version of a Document
can also be referenced as v=0.

This caused the pager to diplay the [Next] button with a link to version=1
when viewing the last version of a wiki Document.

Future improvements:
Currently, the first version of a Document displays the [Prev] button with a link
to the last version. I haven't found any elegant workaround to this behaviour, so I
have left it untouched.

This also causes wiki Documents with only 1 version to display the [Prev] button linked
to itself.

Test Plan

Visit any wiki page with more than 1 versions.
Navigate backward: always using the [Prev] button.
Navigate forward: always using the [Next] button.
Visit a wiki page with only 1 version.

Diff Detail

Repository
rP Phabricator
Branch
master
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 16621
Build 22163: arc lint + arc unit