summaryrefslogtreecommitdiff
path: root/modules/organize/views
diff options
context:
space:
mode:
Diffstat (limited to 'modules/organize/views')
-rw-r--r--modules/organize/views/organize_dialog.html.php28
-rw-r--r--modules/organize/views/organize_thumb_grid.html.php6
-rw-r--r--modules/organize/views/organize_tree.html.php56
3 files changed, 58 insertions, 32 deletions
diff --git a/modules/organize/views/organize_dialog.html.php b/modules/organize/views/organize_dialog.html.php
index 7c09266f..b03c066c 100644
--- a/modules/organize/views/organize_dialog.html.php
+++ b/modules/organize/views/organize_dialog.html.php
@@ -1,10 +1,11 @@
<?php defined("SYSPATH") or die("No direct script access.") ?>
<script type="text/javascript">
- var move_url = "<?= url::site("organize/move/__TARGET_ID__?csrf=$csrf") ?>";
+ var move_url = "<?= url::site("organize/move_to/__ALBUM_ID__?csrf=$csrf") ?>";
var rearrange_url = "<?= url::site("organize/rearrange/__TARGET_ID__/__BEFORE__?csrf=$csrf") ?>";
+ var sort_order_url = "<?= url::site("organize/sort_order/__ALBUM_ID__/__COL__/__DIR__?csrf=$csrf") ?>";
</script>
<div id="gOrganize" class="gDialogPanel">
- <h1 style="display:none"><?= t("Organize %name", array("name" => p::purify($title))) ?></h1>
+ <h1 style="display:none"><?= t("Organize %name", array("name" => p::purify($album->title))) ?></h1>
<div id="bd">
<div class="yui-gf">
<div class="yui-u first">
@@ -22,24 +23,19 @@
</div>
<div id="gOrganizeDetail" class="yui-u">
<div id="gMicroThumbPanel"
- ref="<?= url::site("organize/content/__ITEM_ID__/__OFFSET__") ?>">
+ ref="<?= url::site("organize/album/__ITEM_ID__/__OFFSET__") ?>">
<ul id="gMicroThumbGrid">
<?= $micro_thumb_grid ?>
</ul>
</div>
- <div id="gOrganizeEditDrawer" class="yui-u">
- <div id="gOrganizeEditDrawerPanel" class="yui-gf">
- </div>
- <div id="gOrganizeEditDrawerHandle">
- <div id="gOrganizeEditHandleButtonsRight">
- <a id="gMicroThumbDone" href="#" ref="done"
- class="gButtonLink ui-corner-all ui-state-default"><?= t("Close") ?></a>
- </div>
- </div>
- </div>
- <div id="gOrganizeProgress" style="display: none">
- <div class="gProgressBar"></div>
- <div id="gStatus"></div>
+ <div id="gOrganizeControls">
+ <a id="gOrganizeClose" href="#" ref="done"
+ class="gButtonLink ui-corner-all ui-state-default"><?= t("Close") ?></a>
+ <form>
+ <?= t("Sort order") ?>
+ <?= form::dropdown(array("id" => "gOrganizeSortColumn"), album::get_sort_order_options(), $album->sort_column) ?>
+ <?= form::dropdown(array("id" => "gOrganizeSortOrder"), array("ASC" => "Ascending", "DESC" => "Descending"), $album->sort_order) ?>
+ </form>
</div>
</div>
</div>
diff --git a/modules/organize/views/organize_thumb_grid.html.php b/modules/organize/views/organize_thumb_grid.html.php
index 5adb487a..31dc9af5 100644
--- a/modules/organize/views/organize_thumb_grid.html.php
+++ b/modules/organize/views/organize_thumb_grid.html.php
@@ -1,5 +1,5 @@
<?php defined("SYSPATH") or die("No direct script access.") ?>
-<? foreach ($item->children(25, $offset) as $child): ?>
+<? foreach ($album->children(25, $offset) as $child): ?>
<li class="gMicroThumbGridCell" ref="<?= $child->id ?>">
<div id="gMicroThumb_<?= $child->id ?>"
class="gMicroThumb <?= $child->is_album() ? "gAlbum" : "gPhoto" ?>">
@@ -8,10 +8,10 @@
</li>
<? endforeach ?>
-<? if ($item->children_count() > $offset): ?>
+<? if ($album->children_count() > $offset): ?>
<script>
setTimeout(function() {
- $.get("<?= url::site("organize/content/$item->id/" . ($offset + 25)) ?>",
+ $.get("<?= url::site("organize/content/$album->id/" . ($offset + 25)) ?>",
function(data) {
$("#gMicroThumbGrid").append(data);
$.organize.set_handlers();
diff --git a/modules/organize/views/organize_tree.html.php b/modules/organize/views/organize_tree.html.php
index 823301fc..e38976ff 100644
--- a/modules/organize/views/organize_tree.html.php
+++ b/modules/organize/views/organize_tree.html.php
@@ -1,17 +1,47 @@
<?php defined("SYSPATH") or die("No direct script access.") ?>
-<li class="gOrganizeBranch ui-icon-left <?= $can_edit ? "" : "gViewOnly" ?>" ref="<?= $album->id ?>">
- <div id="gOrganizeBranch-<?= $album->id ?>" ref="<?= $album->id ?>"
- class="<?= $selected ? "gBranchSelected" : "" ?>">
- <span id="gOrganizeIcon-<?= $album->id ?>" ref="<?= $album->id ?>"
- class="ui-icon <?= $album_icon ?>">
- </span>
- <span class="gBranchText" ref="<?= $album->id ?>"><?= p::clean($album->title) ?></span>
- </div>
- <ul id="gOrganizeChildren-<?= $album->id ?>"
- class="<?= $album_icon == "ui-icon-plus" ? "gBranchCollapsed" : "" ?>">
- <li style="display:none">&nbsp;</li>
- <? foreach ($children as $child): ?>
- <?= $child ?>
+<? foreach ($parents as $parent): ?>
+<li class="gOrganizeAlbum ui-icon-left <?= access::can("edit", $parent) ? "" : "gViewOnly" ?>"
+ ref="<?= $parent->id ?>">
+ <span class="ui-icon ui-icon-minus">
+ </span>
+ <span class="gAlbumText" ref="<?= $parent->id ?>">
+ <?= p::clean($parent->title) ?>
+ </span>
+ <ul class="ui-icon-plus">
<? endforeach ?>
+
+ <? if ($parent->id == $album->parent_id): ?>
+ <? foreach ($parent->children(null, 0, array("type" => "album")) 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" ?>">
+ </span>
+ <span class="gAlbumText <?= $peer->id == $album->id ? "selected" : "" ?>"
+ ref="<?= $peer->id ?>">
+ <?= p::clean($peer->title) ?>
+ </span>
+
+ <? if ($peer->id == $album->id): ?>
+ <ul class="ui-icon-plus">
+ <? foreach ($album->children(null, 0, array("type" => "album")) as $child): ?>
+ <li class="gOrganizeAlbum ui-icon-left <?= access::can("edit", $child) ? "" : "gViewOnly" ?>"
+ ref="<?= $child->id ?>">
+ <span class="ui-icon ui-icon-plus">
+ </span>
+ <span class="gAlbumText"
+ ref="<?= $child->id ?>">
+ <?= p::clean($child->title) ?>
+ </span>
+ </li>
+ <? endforeach ?>
+ </ul>
+ <? endif ?>
+
+ </li>
+ <? endforeach ?>
+ <? endif ?>
+
+ <? foreach ($parents as $parent): ?>
</ul>
</li>
+<? endforeach ?>