piler/webui/view/theme/default/templates/search/folder.tpl

51 lines
1.7 KiB
Smarty
Raw Normal View History

2013-03-31 14:50:21 +02:00
<p class="bold"><?php print $text_folders; ?>:</p>
2012-09-06 15:27:20 +02:00
2013-03-31 14:50:21 +02:00
<div id="folders">
2012-09-06 15:27:20 +02:00
2012-09-15 15:30:35 +02:00
<?php foreach ($extra_folders as $folder) { ?>
2013-03-31 14:50:21 +02:00
<blockquote class="folder">
<form class="form-search sleek">
<img src="<?php print ICON_EMPTY; ?>" width="12" height="12" alt="" /> <input type="checkbox" id="extra_folder_<?php print $folder['id']; ?>" name="extra_folder_<?php print $folder['id']; ?>" /> <input type="text" ondrop="Piler.copy_message_to_folder('<?php print $folder['id']; ?>', Piler.current_message_id, '<?php print $text_copied; ?>'); return false;" class="input-small bold" style="color: #850505; border:none; background: transparent; " value="<?php print $folder['name']; ?>" />
</form>
</blockquote>
2012-09-06 15:27:20 +02:00
<?php } ?>
2012-09-15 15:30:35 +02:00
2012-09-06 15:27:20 +02:00
<?php
function display_folders($arr = array(), &$i) {
?>
2013-03-31 14:50:21 +02:00
<blockquote id="fldr_<?php print $i; ?>" class="folder">
<?php
$i++;
foreach($arr as $a) {
?>
2012-09-06 15:27:20 +02:00
<?php if(count($a['children']) > 0) { ?>
2013-03-31 14:50:21 +02:00
<a id="fldr_collapse_<?php print $i; ?>" href="#" onclick="Piler.close_folder(<?php print $i; ?>); return false;"><img src="<?php print ICON_MINUS; ?>" alt="" /></a>
<a id="fldr_open_<?php print $i; ?>" href="#" onclick="Piler.open_folder(<?php print $i; ?>); return false;" style="display:none;"><img src="<?php print ICON_PLUS; ?>" alt="" /></a>
<?php } else { ?> <img src="<?php print ICON_EMPTY; ?>" width="12" height="12" alt="" /> <?php } ?>
<input type="checkbox" id="folder_<?php print $a['id']; ?>" name="folder_<?php print $a['id']; ?>" /> <?php print $a['name']; ?><br />
<?php
if(count($a['children'])) { display_folders($a['children'], $i); }
}
?>
</blockquote>
<?php
}
?>
<?php
$i = 0;
display_folders($folders_by_hier, $i);
?>
</div>