diff options
| author | jhilden <jakobhilden@gmail.com> | 2009-08-29 19:12:57 -0400 |
|---|---|---|
| committer | jhilden <jakobhilden@gmail.com> | 2009-08-29 19:12:57 -0400 |
| commit | ed9be096535dfbac4d62e0cc74f416a71f67648d (patch) | |
| tree | 3301809705b4418b97673d8f006332111b42fa5f /modules/organize | |
| parent | 39559fdfd09491dce669d0351768fe2b13ccdd03 (diff) | |
| parent | 0aceba6f48e5542d3edfbb1f195af50187adbac4 (diff) | |
Merge branch 'master' of git@github.com:gallery/gallery3
Diffstat (limited to 'modules/organize')
| -rw-r--r-- | modules/organize/controllers/organize.php | 7 | ||||
| -rw-r--r-- | modules/organize/views/organize_tree.html.php | 5 |
2 files changed, 8 insertions, 4 deletions
diff --git a/modules/organize/controllers/organize.php b/modules/organize/controllers/organize.php index de53c4ed..2b966657 100644 --- a/modules/organize/controllers/organize.php +++ b/modules/organize/controllers/organize.php @@ -136,6 +136,13 @@ class Organize_Controller extends Controller { $v = new View("organize_tree.html"); $v->parents = $album->parents(); $v->album = $album; + + if ($album->id == 1) { + $v->peers = array($album); + } else { + $v->peers = $album->parent()->children(null, 0, array("type" => "album")); + } + return $v; } } diff --git a/modules/organize/views/organize_tree.html.php b/modules/organize/views/organize_tree.html.php index e38976ff..36f900ac 100644 --- a/modules/organize/views/organize_tree.html.php +++ b/modules/organize/views/organize_tree.html.php @@ -10,8 +10,7 @@ <ul class="ui-icon-plus"> <? endforeach ?> - <? if ($parent->id == $album->parent_id): ?> - <? foreach ($parent->children(null, 0, array("type" => "album")) as $peer): ?> + <? foreach ($peers as $peer): ?> <li class="gOrganizeAlbum ui-icon-left <?= access::can("edit", $peer) ? "" : "gViewOnly" ?>" ref="<?= $peer->id ?>"> <span class="ui-icon <?= $peer->id == $album->id ? "ui-icon-minus" : "ui-icon-plus" ?>"> @@ -36,10 +35,8 @@ <? endforeach ?> </ul> <? endif ?> - </li> <? endforeach ?> - <? endif ?> <? foreach ($parents as $parent): ?> </ul> |
