{* $Id: fgal_listing_conf.tpl 45057 2013-03-05 12:10:16Z jonnybradley $ *}

{if is_array($fgal_options) and count($fgal_options) gt 0}
	{foreach key=key item=item from=$fgal_options}
		{if $key eq 'default_view'}
<tr>
	<td><label for="fgal_{$key}">{$item.name}:<label></td>
	<td>
		<select id="fgal_{$key}" name="fgal_{$key}">
			<option value="list"{if $item.value eq 'list'} selected="selected"{/if}>{tr}List{/tr}</option>
			<option value="browse"{if $item.value eq 'browse'} selected="selected"{/if}>{tr}Browse{/tr}</option>
			<option value="page"{if $item.value eq 'page'} selected="selected"{/if}>{tr}Page{/tr}</option>
			{if $prefs.fgal_elfinder_feature eq 'y'}
				<option value="finder"{if $item.value eq 'finder'} selected="selected"{/if}>{tr}Finder View{/tr}</option>
			{/if}
		</select>
	</td>
</tr>
		{elseif $key eq 'icon_fileId'}
			<tr>
				<td><label for="fgal_{$key}">{$item.name}:<label></td>
				<td>
					<input type="text" id="fgal_{$key}" name="fgal_{$key}" value="{$item.value}"><br>
					<em>{tr}Enter the ID of any file in any gallery to be used as the icon for this gallery in browse view{/tr}</em>
				</td>
			</tr>
		{else}
<tr>
	<td><label for="fgal_{$key}{if isset($fgal_ext)}{$fgal_ext}{/if}">{$item.name}:</label></td>
	{assign var='pref_name' value="fgal_$key"}
	<td><input type="checkbox" id="fgal_{$key}" name="fgal_{$key}" {if $item.value eq 'y'}checked="checked"{/if}{if $edit_mode eq 'y' and $prefs.$pref_name neq 'y'} disabled="disabled"{/if}>
		{if $edit_mode eq 'y' and $prefs.$pref_name neq 'y'}
			<em>{tr}The checkbox is disabled because this preference is disabled globally.{/tr}</em>
			{if $tiki_p_admin eq 'y' or $tiki_p_admin_file_galleries eq 'y'}
			<a href="tiki-admin.php?page=fgal">{tr}Please, enable the preference globally first.{/tr}</a>
			{else}
				{tr}You can ask your site Admin to enable the preference.{/tr}
			{/if}
		{/if}
	</td>
</tr>
		{/if}
	{/foreach}
{/if}

{if is_array($fgal_listing_conf) and count($fgal_listing_conf) gt 0}
	{foreach key=key item=item from=$fgal_listing_conf}
<tr>
	<td><label for="fgal_list_{$key}">{$item.name}:</label></td>
	<td>
		<select id="fgal_list_{$key}" name="fgal_list_{$key}">
		{if $key eq 'name' or $key eq 'name_admin'}
			<option value="a"{if $item.value eq 'a'} selected="selected"{/if}>{tr}Name-filename{/tr}</option>
			<option value="n"{if $item.value eq 'n'} selected="selected"{/if}>{tr}Name{/tr}</option>
			<option value="f"{if $item.value eq 'f'} selected="selected"{/if}>{tr}Filename only{/tr}</option>
		{elseif $key neq 'deleteAfter'}
			<option value='n'{if $item.value eq 'n'} selected="selected"{/if}>{tr}Hide{/tr}</option>
			<option value='y'{if $item.value eq 'y'} selected="selected"{/if}>{tr}Show as a column{/tr}</option>
			<option value='o'{if $item.value eq 'o'} selected="selected"{/if}>{tr}Show in popup box{/tr}</option>
			<option value='a'{if $item.value eq 'a'} selected="selected"{/if}>{tr}Both{/tr}</option>
		{/if}
		{if $key eq 'lockedby' or $key eq 'lockedby_admin'}
			<option value='i'{if $item.value eq 'i'} selected="selected"{/if}>{tr}Show an icon in a column{/tr}</option>
		{/if}
		
		{if $key eq 'deleteAfter'}
			<option value='n'{if $item.value eq 'n'} selected="selected"{/if}>{tr}Hide{/tr}</option>
			<option value='y'{if $item.value eq 'y'} selected="selected"{/if}>{tr}Show as a column{/tr}</option>
		{/if}
		</select>
	</td>
</tr>
	{/foreach}
{/if}
