discourse/discourse — pull request #2873 by mcwumbly (2014-10-13 08:29:21+00:00)
Title: FEATURE: ability to hide/show specific post revisions

Follow-up to PR #2872

As discussed here (and in a few linked topics)
https://meta.discourse.org/t/ability-to-hide-or-delete-old-revisions-on-selected-posts/19389

This has the full functionality to hide/show specific post revisions.

1. PostRevision only looks at the left-hand side of a given record.
(But at this point, both sides are still saved to the database)
2. Added methods to hide! (or later show!) a given revision
revisions are hidden when modification => hidden == true
3. A little bit of refactoring so all fields use current(field) and previous(field) methods
4. Falls back to previous/next revision or post, depending on what is available / not hidden
5. UX: Show / Hide buttons are only shown to staff
When content is hidden, its hidden from everyone (and its not leaked through the 'previous' revision)

Example:

some content you want to hide:

![screen shot 2014-10-13 at 1 26 25 am](https://cloud.githubusercontent.com/assets/2217652/4610690/d7738260-52b2-11e4-8825-88b7d2cb5cbf.png)

after it's hidden, falls back to previous revision (and button to show it appears):

![screen shot 2014-10-13 at 1 26 39 am](https://cloud.githubusercontent.com/assets/2217652/4610695/e0a5fef8-52b2-11e4-8f31-7bd1dd6b37df.png)

after navigating to previous revision, it's still hidden from the right side:

![screen shot 2014-10-13 at 1 27 06 am](https://cloud.githubusercontent.com/assets/2217652/4610700/f784591c-52b2-11e4-80df-6157e58e196c.png)