Posts view: some DRY.
Merge pull request #4482 from harrykiselev/patch-1

Posts view: some DRY.