Fix next/prev file attachments when Review UIs are unavailable.
Review Request #14022 — Created July 11, 2024 and submitted
The next and previous file attachment pop-outs were broken if an
attachment either did not have a Review UI, or had a Review UI which was
not available. This change makes it so we check to ensure that the link
will lead to a working page, and skip over any attachments that won't.
Created a series of attachments where some file types just didn't have
review UIs, and some had disabled review UIs (a PDF with a user who did
not have access to power pack). Saw that I no longer got links to 404s.