diff options
author | Tim Almdal <tnalmdal@shaw.ca> | 2009-08-12 21:55:25 -0700 |
---|---|---|
committer | Tim Almdal <tnalmdal@shaw.ca> | 2009-08-12 21:55:25 -0700 |
commit | 3823f65dfb4114caf9bd9cfbf730638927f6c970 (patch) | |
tree | 653d445d9be4e01a53767e8309555ed1026face2 /modules/organize/controllers | |
parent | 628199538526a2da8d32afe15ec0a2827f5a19c3 (diff) |
Implement the first part of drag functionality. Having trouble getting visual feedback of the drop position between thumbnails, so this commit provides a checkpoint for trying various options
Diffstat (limited to 'modules/organize/controllers')
-rw-r--r-- | modules/organize/controllers/organize.php | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/modules/organize/controllers/organize.php b/modules/organize/controllers/organize.php index 3a81ef4f..6f83f940 100644 --- a/modules/organize/controllers/organize.php +++ b/modules/organize/controllers/organize.php @@ -60,13 +60,14 @@ class Organize_Controller extends Controller { $v->album_icon = "gBranchEmpty"; $albums = $item->children(null, 0, array("type" => "album"), array("title" => "ASC")); - if ($albums->count()) { - $v->album_icon = empty($parents[$item->id]) ? "ui-icon-plus" : "ui-icon-minus"; - - foreach ($albums as $album) { + foreach ($albums as $album) { + if (access::can("view", $album)) { $v->children[] = $this->_tree($album, $parents); } } + if (count($v->children)) { + $v->album_icon = empty($parents[$item->id]) ? "ui-icon-plus" : "ui-icon-minus"; + } return $v; } } |