mirror of
https://github.com/Pathduck/gallery3.git
synced 2026-05-19 19:09:13 -04:00
adding a new album or photo. Simplify the data structure that we pass down to server_add_tree.html.php so that we just pass a file list and let it do whatever it wants with it.
20 lines
717 B
PHP
20 lines
717 B
PHP
<?php defined("SYSPATH") or die("No direct script access.") ?>
|
|
<? foreach ($files as $file): ?>
|
|
<? $id = substr(md5($file), 10) ?>
|
|
<li id="file_<?= $id ?>" class="<?= is_file($file) ? "gFile" : "gDirectory gCollapsed ui-icon-left" ?>">
|
|
<? if (is_dir($file)): ?>
|
|
<span onclick="open_close_branch('<?=$file?>', '<?=$id?>')" class="ui-icon ui-icon-plus"></span>
|
|
<? endif ?>
|
|
<label>
|
|
<?= form::checkbox("path[]", $file, false, "onclick=click_node(this)") ?>
|
|
<?= p::clean(basename($file)) ?>
|
|
</label>
|
|
<? if (is_dir($file)): ?>
|
|
<ul id="tree_<?= $id ?>" style="display: none"></ul>
|
|
<? endif ?>
|
|
</li>
|
|
<? endforeach ?>
|
|
<? if (!$files): ?>
|
|
<li class="gFile"> <i> <?= t("empty") ?> </i> </li>
|
|
<? endif ?>
|