Location: PHPKode > projects > SimpleHRM > simplehrm-1.0-beta1/simplehrm-1.0-beta1/templates/default/admin/template/tpl_list.tpl.html
<div id="box1" class="box box-25 altbox" style="width:300px">
	<div class="boxin">
		<div class="header">
			<h3>Listing</h3>
		</div>
		<div id="box1-tabular" class="content">
			<table cellspacing="0">
				<thead>
					<tr><td>Template Name</td></tr>
				</thead>
				{foreach from=$sm.file item=item}
					<tr>
						<td>
							<a href="javascript:void(0);" onclick="show_file('{$item}');" style="color:#993300">{$item}</a>
							<div id="{$item}"></div>
						</td>
					</tr>
				{/foreach}
			</table>
		</div>
	</div>
</div>

<div id="box1" class="box box-75 altbox" style="width:530px">
	<div class="boxin">
		<div class="header">
			<h3>Edit Section</h3>
			<div style="float:right">
				Search template : <input type="text" id="tpl_name" name="tpl_name" onfocus="$('#tplmsg').html('');"/>
				<input type="button" value="Go" onclick="search_tpl();" class="button" /><br />
				<div id="tplmsg"></div>
			</div>
		</div>
		<div id="edit_templates">
			Edit the template contents here.
		</div>
	</div>
</div>

{literal}
<script type="text/javascript">
	function show_file(fpath){
		var url='##LBL_ADMIN_SITE_URL##index.php';
		$.post(url,{"page":"template","choice":"gettpl",ce:0,fpath:fpath},function(res){
			$('#edit_templates').html(res);
		});
	}
	function search_tpl(){
		if($('#tpl_name').val()){
			show_file($.trim($('#tpl_name').val()));
		}else{
			$('#tplmsg').html('Please enter the template name');
		}
	}
</script>
{/literal}
Return current item: SimpleHRM