Adds delete and edit functionality to gallery pages.