From ac0e60fd90c55a3a7d4f2001eb9e4cce44a5b259 Mon Sep 17 00:00:00 2001 From: Cash Costello Date: Sat, 21 Mar 2009 16:57:57 +0000 Subject: cleaning up friends album view and individual album view --- views/default/object/album.php | 8 +---- views/default/tidypics/css.php | 10 +++--- views/default/tidypics/forms/edit.php | 63 +++++++++++++++++------------------ 3 files changed, 37 insertions(+), 44 deletions(-) (limited to 'views/default') diff --git a/views/default/object/album.php b/views/default/object/album.php index 9d3dc507f..464806ca1 100644 --- a/views/default/object/album.php +++ b/views/default/object/album.php @@ -1,12 +1,6 @@ title); - $action = "tidypics/editalbum"; - $title = $vars['entity']->title; - $body = $vars['entity']->description; - $tags = $vars['entity']->tags; - $access_id = $vars['entity']->access_id; - $subtype = $vars['subtype']; + if (isset($vars['entity'])) { + $title = sprintf(elgg_echo("album:edit"),$object->title); + $action = "tidypics/editalbum"; + $title = $vars['entity']->title; + $body = $vars['entity']->description; + $tags = $vars['entity']->tags; + $access_id = $vars['entity']->access_id; + $subtype = $vars['subtype']; - // if nothing is sent, create new, but only new albums are sent here - // new images are sent to upload.php - } else { - $title = elgg_echo("album:add"); - $action = "tidypics/addalbum"; - $tags = ""; - $title = ""; - $description = ""; - if (defined('ACCESS_DEFAULT')) - $access_id = ACCESS_DEFAULT; - else - $access_id = 0; - } + // if nothing is sent, create new, but only new albums are sent here + // new images are sent to upload.php + } else { + $title = elgg_echo("album:add"); + $action = "tidypics/addalbum"; + $tags = ""; + $title = ""; + $description = ""; + if (defined('ACCESS_DEFAULT')) + $access_id = ACCESS_DEFAULT; + else + $access_id = 0; + } // in case we have some cached details - if (isset($vars['albumtitle'])) { - $title = $vars['albumtitle']; - $body = $vars['albumbody']; - $tags = $vars['albumtags']; - } + if (isset($vars['albumtitle'])) { + $title = $vars['albumtitle']; + $body = $vars['albumbody']; + $tags = $vars['albumtags']; + } - $container_guid = get_input('container_guid'); - if (!$container_guid) $container_guid = page_owner(); - + $container_guid = get_input('container_guid'); + if (!$container_guid) $container_guid = page_owner(); + ?>
@@ -49,8 +49,7 @@ "albumtitle", "value" => $title,)); ?>

-- cgit v1.2.3