Add some view logic for edit gallery.