Display Object Id when View button is displayed.

DSC-1025

Moved status check into a freemarker function.
Moved Object Id conditional higher in the code so that the values created can be re-used.
@scoen 

This is the same condition that I moved from line 161. The values then set in linkObjId and linkBibLevel is then reused in line 168. 

The If condition that was on line 169 I moved into a Function called "hasViewAbleObjectId" on line 1 so that it could be re-used in link 168.

Also confusing I am using a freemarker Function instead of a Macro for "hasViewAbleObjectId". Functions allow for return values.