mirror of
https://github.com/Pathduck/gallery3.git
synced 2026-05-19 19:09:13 -04:00
Now we don't have checkboxes, but instead we restrict you to selecting directories and albums from only one level in the hierarchy. This makes it easier for us to make sure that we properly create the hierarchy that you want and avoid confusion about what's going to wind up where. Modify Server_Add_File_Model to have a parent_id and item_id and then modify them as we go so that we can build up a tree structure there *before* we create any items. This makes it much easier to figure out where a new item is going to go and get rid of a bunch of probably buggy code in the main task.
42 lines
1.2 KiB
PHP
42 lines
1.2 KiB
PHP
<?php defined("SYSPATH") or die("No direct script access.") ?>
|
|
<li class="ui-icon-left">
|
|
<span class="ui-icon ui-icon-folder-open"></span>
|
|
<span ondblclick="open_dir('')">
|
|
<?= t("All") ?>
|
|
</span>
|
|
<ul>
|
|
|
|
<? foreach ($parents as $dir): ?>
|
|
<li class="ui-icon-left">
|
|
<span class="ui-icon ui-icon-folder-open"></span>
|
|
<span ondblclick="open_dir('<?= $dir ?>')">
|
|
<?= basename($dir) ?>
|
|
</span>
|
|
<ul>
|
|
<? endforeach ?>
|
|
|
|
<? foreach ($files as $file): ?>
|
|
<li class="ui-icon-left">
|
|
<span class="ui-icon <?= is_dir($file) ? "ui-icon-folder-collapsed" : "ui-icon-document" ?>"></span>
|
|
<span onclick="select_file(this)"
|
|
<? if (is_dir($file)): ?>
|
|
ondblclick="open_dir($(this).attr('file'))"
|
|
<? endif ?>
|
|
file="<?= $file ?>"
|
|
>
|
|
<?= p::clean(basename($file)) ?>
|
|
</span>
|
|
</li>
|
|
<? endforeach ?>
|
|
<? if (!$files): ?>
|
|
<li> <i> <?= t("empty") ?> </i> </li>
|
|
<? endif ?>
|
|
|
|
<? foreach ($parents as $dir): ?>
|
|
</ul>
|
|
</li>
|
|
<? endforeach ?>
|
|
|
|
</ul>
|
|
</li>
|