summaryrefslogtreecommitdiff
path: root/templates/ajax_file_browser_inc.tpl
blob: 0dc5f5b3e93d5dab329559b012f098c3da39517b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
{* too much hassle to provide non-js version of this stuff for now *}
{if $gBitThemes->isJavascriptEnabled()}
	{if $fileList}
		<div style="margin-bottom:1em;cursor:hand;">
			{foreach from=$fileList.dir item=finfo}
				<div class="{cycle values="even,odd"}" style="margin-left:{$finfo.indent}px;" id="{$finfo.relpath|escape}" title="open" onclick='BitFileBrowser.browse(this.id,this.title,"{$smarty.request.ajax_path_conf}");'>
					{biticon ipackage="icons" iname="folder"  id="image-`$finfo.relpath`"  iexplain="Open"} {$finfo.name}
				</div>
				<div id="{$finfo.relpath|escape}-bitInsert"></div>
			{/foreach}

			{foreach from=$fileList.file item=finfo}
				{if $finfo.relpath}
					<div class="{cycle values="even,odd"}" style="margin-left:{$finfo.indent}px;" onclick='document.getElementById("ajax_input").value="{$finfo.relpath}"' title="{tr}Last Modified{/tr}: {$finfo.mtime|bit_long_datetime}">
						{biticon iname=view-list-text iexplain="File"} {$finfo.name} <small class="floatright clearright">{$finfo.size|display_bytes}</small>
					</div>
				{else}
					<div class="{cycle values="even,odd"}" style="margin-left:{$finfo.indent}px;">
						{biticon ipackage="icons" iname="dialog-warning"   iexplain="Empty"} [{tr}empty{/tr}]
					</div>
				{/if}
			{/foreach}
		</div>
	{else}
		<h2 id="ajax_load_title"><a href="javascript:void(0);" onclick='BitFileBrowser.load("{$ajax_path_conf}");' style="cursor:hand;">{tr}Load Files{/tr}</a></h2>
		<div id="ajax_load"></div>
		{formhelp note="Click on the folders to open them and on the files to insert the path in the input field."}
	{/if}
{/if}