<inp2:m_include t="incs/header" />
<inp2:m_RenderElement name="combined_header" section="in-portal:system_logs" prefix="system-log" title_preset="system_log_list" pagination="1"/>

<!-- ToolBar -->
<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
	<tbody>
		<tr>
	  		<td>
		  		<table width="100%" cellpadding="0" cellspacing="0">
		  			<tr>
		  				<td>
		  					<script type="text/javascript">
								a_toolbar = new ToolBar();

								function edit() {
								  	std_edit_temp_item('system-log', 'logs/system_logs/system_log_edit');
								}

								a_toolbar.AddButton(
									new ToolBarButton(
										'edit',
										'<inp2:m_phrase label="la_ToolTip_ViewDetails" escape="1"/>::<inp2:m_phrase label="la_ToolTip_Details" escape="1"/>',
										edit
									)
								);

								a_toolbar.AddButton(
									new ToolBarButton(
										'delete',
										'<inp2:m_phrase label="la_ToolTip_Delete" escape="1"/>',
										function() {
											std_delete_items('system-log')
										}
									)
								);

								a_toolbar.AddButton(
									new ToolBarButton(
										'reset',
										'<inp2:m_phrase label="la_ToolTip_DeleteAll" escape="1"/>',
										function() {
											if (inpConfirm('<inp2:m_Phrase name="la_Delete_Confirm" escape="1"/>')) {
												submit_event('system-log', 'OnDeleteAll');
											}
										}
									)
								);

					  			a_toolbar.AddButton( new ToolBarSeparator('sep1') );

								a_toolbar.AddButton(
									new ToolBarButton(
										'view',
										'<inp2:m_phrase label="la_ToolTip_View" escape="1"/>',
										function(id) {
											show_viewmenu(a_toolbar,'view');
										}
									)
								);

								a_toolbar.Render();
							</script>
		  				</td>

		  				<inp2:m_RenderElement name="search_main_toolbar" prefix="system-log" grid="Default"/>
		  			</tr>
		  		</table>
			</td>
		</tr>
	</tbody>
</table>

<style type="text/css">
	.log_backtrace {
		margin: 0;
		padding-left: 25px;
		font-size: 11px;
	}
</style>

<inp2:m_DefineElement name="grid_filename_td">
	<inp2:Filename/>
</inp2:m_DefineElement>

<inp2:m_DefineElement name="grid_uri_td">
	<inp2:RequestURI/>
</inp2:m_DefineElement>

<inp2:m_DefineElement name="grid_memory_td">
	<span title="<inp2:Field name='$field'/> bytes"><inp2:MemoryUsage/></span>
</inp2:m_DefineElement>

<inp2:m_DefineElement name="backtrace_element">
	<li>
		<inp2:m_Phrase name="la_LogBacktraceFunction"/>: <inp2:m_Param name="file_info"/>
	</li>
</inp2:m_DefineElement>

<inp2:m_DefineElement name="grid_backtrace_td">
	<ol class="log_backtrace">
		<inp2:PrintBacktrace render_as="backtrace_element"/>
	</ol>
</inp2:m_DefineElement>

<inp2:m_RenderElement name="grid" PrefixSpecial="system-log" IdField="LogId" grid="Default"/>

<script type="text/javascript">
	Grids['system-log'].SetDependantToolbarButtons( new Array('edit', 'delete') );
</script>

<inp2:m_include t="incs/footer"/>
