Only display previous / next / random entry links when it makes sense

Signed-off-by: Miller Peterson <miller.peterson@gmail.com>