canEdit()) { // @todo cannot change it forward('photos/all'); } elgg_set_page_owner_guid($entity->getContainerGUID()); $owner = elgg_get_page_owner_entity(); gatekeeper(); group_gatekeeper(); $title = elgg_echo('album:edit'); // set up breadcrumbs elgg_push_breadcrumb(elgg_echo('photos'), 'photos/siteimagesall'); elgg_push_breadcrumb(elgg_echo('tidypics:albums'), 'photos/all'); if (elgg_instanceof($owner, 'user')) { elgg_push_breadcrumb($owner->name, "photos/owner/$owner->username"); } else { elgg_push_breadcrumb($owner->name, "photos/group/$owner->guid/all"); } elgg_push_breadcrumb($entity->getTitle(), $entity->getURL()); elgg_push_breadcrumb($title); $vars = tidypics_prepare_form_vars($entity); $content = elgg_view_form('photos/album/save', array('method' => 'post'), $vars); $body = elgg_view_layout('content', array( 'content' => $content, 'title' => $title, 'filter' => '', 'sidebar' => elgg_view('photos/sidebar', array('page' => 'album')), )); echo elgg_view_page($title, $body);