finished sample link checking if edit or view