if loop for status image in show page