<div class="panel_section">
	<div class="panel_content">
		<div class="cr">&nbsp;</div>
		{if $nothing_to_search}
			<font class="error">{$lang.nothing_to_search}</font><br><br><br>
		{else}
			<table cellpadding="0" cellspacing="1" border="0" width="100%" class="table_main">
				<tr>
					<th>{$lang.number}</th>
					<th>{$lang.file_name}</th>
					<th>{$lang.find_in_strings}</th>
					<th width="70">{$lang.default_select.title_edit}</th>
				</tr>
				{foreach from=$search_result item=res name=find_in_files}
				<tr {if $smarty.foreach.find_in_files.iteration mod 2 eq 1}class="even"{else}class="odd"{/if}>
					<td align="center" class="vtop">{$smarty.foreach.find_in_files.iteration}</td>
					<td  class="vtop" nowrap>{$res.short_file_path}</td>
					<td align="left">
						{assign var="jumpto" value=""}
						{foreach from=$res.strings item=str name=str key=key}
							{if $jumpto!=''}
								{assign var="jumpto" value=$jumpto|cat:"|"|cat:$key}
							{else}
								{assign var="jumpto" value=$jumpto|cat:$key}
							{/if}
							{$smarty.foreach.str.iteration}. {$str}<br>
						{/foreach}
					</td>
					<td align="center" class="vtop"><a href="#" class="admin_button" id="open_button" onclick="UpdateField('admin_settings.php?sel=lang_edit&search_string={$search_string}','{$jumpto}', '{$lang_folder}', '{$res.mode}', '{$res.filename}');">{$lang.button.edit}<span>&nbsp;</span></a></td>
				</tr>
				{foreachelse}
				<tr>
					<td colspan="4" class="error" align="center">{$lang.no_matches}</td>
				</tr>
				{/foreach}
			</table>
		{/if}
		<script>
			{literal}
			function UpdateField(url, param_data, language, mode, file) {
				$("#language").val(language);
				$("#language").change();
				$("#mode").val(mode);
				$.post(
					"admin_settings.php",  
					{
						async: false, 
						sel: "mode", 
						lang_name: language, 
						mode: mode
					}, 
					function(data){
						$("#files").html(data); 
						$("#file").val(file);
						$("#file").change();
					}
				);
			}
			{/literal}
		</script>
	</div>
</div>