mirror of
https://github.com/Pathduck/gallery3.git
synced 2026-05-19 10:59:16 -04:00
I've redone the browsing code but I have not implemented the adding code. 1) Rename index() to browse() since index is too generic. 2) Simplify the data that we pass to _dialog and _tree 3) Change _tree to return list items only, so that the outer dialog can be a <ul> for consistency. 4) Simplify the data structures so that we're not tracking checked vs. unchecked status in the PHP code, it's all done in jquery where we can do it with just a line or two of JS 5) use glob() which pretty much entirely replaces _get_children
34 lines
1.2 KiB
PHP
34 lines
1.2 KiB
PHP
<?php defined("SYSPATH") or die("No direct script access.") ?>
|
|
<script type="text/javascript">
|
|
var GET_CHILDREN_URL = "<?= url::site("server_add/children?path=__PATH__") ?>";
|
|
</script>
|
|
|
|
<div id="gServerAdd">
|
|
<h1 style="display: none;"><?= t("Add Photos to '%title'", array("title" => p::clean($item->title))) ?></h1>
|
|
|
|
<p id="gDescription"><?= t("Photos will be added to album:") ?></p>
|
|
<ul class="gBreadcrumbs">
|
|
<? foreach ($item->parents() as $parent): ?>
|
|
<li>
|
|
<?= p::clean($parent->title) ?>
|
|
</li>
|
|
<? endforeach ?>
|
|
<li class="active">
|
|
<?= p::clean($item->title) ?>
|
|
</li>
|
|
</ul>
|
|
|
|
<?= form::open(url::abs_site("server_add/add"), array("method" => "post")) ?>
|
|
<?= access::csrf_form_field(); ?>
|
|
<ul id="gServerAddTree" class="gCheckboxTree">
|
|
<?= $tree ?>
|
|
</ul>
|
|
|
|
<span>
|
|
<?= form::submit(array("id" => "gServerPauseButton", "name" => "add", "disabled" => true, "class" => "submit", "style" => "display:none"), t("Pause")) ?>
|
|
<?= form::submit(array("id" => "gServerAddButton", "name" => "add", "disabled" => true, "class" => "submit"), t("Add")) ?>
|
|
</span>
|
|
<?= form::close() ?>
|
|
<div class="gProgressBar" style="visibility: hidden" ></div>
|
|
</div>
|