<inp2:m_include t="incs/header" />
<inp2:m_RenderElement name="combined_header" section="in-portal:session_logs" prefix="session-log" title_preset="session_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() {

								}

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

								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="session-log" grid="Default"/>
		  			</tr>
		  		</table>
			</td>
		</tr>
	</tbody>
</table>

<style type="text/css">
	tr.row-active td {
		background-color: #EAFFDC;
	}
	tr.row-expired td {
		color: #555;
	}
</style>

<inp2:m_DefineElement name="row_class">
	<inp2:m_if check="FieldEquals" field="Status" value="0">
		row-active
	<inp2:m_else/>
		<inp2:m_if check="FieldEquals" field="Status" value="2">
			row-expired
		</inp2:m_if>
	</inp2:m_if>
</inp2:m_DefineElement>

<inp2:m_DefineElement name="affected_td">
	<inp2:m_if check="Field" name="AffectedItems">
		<inp2:Field name="SessionLogId" result_to_var="sessionlog_id"/>
		<a href="<inp2:m_t t='logs/change_logs/change_log_list' pass='m,change-log' grid_name='Default' custom_filters[change-log][Default][SessionLogId][range][from]='$sessionlog_id' custom_filters[change-log][Default][SessionLogId][range][to]='' change-log_event='OnSearch'/>"><inp2:Field name="AffectedItems"/></a>
	<inp2:m_else/>
		<inp2:Field name="AffectedItems"/>
	</inp2:m_if>
</inp2:m_DefineElement>

<inp2:m_RenderElement name="grid" PrefixSpecial="session-log" IdField="SessionLogId" grid="Default" row_class_render_as="row_class"/>
<script type="text/javascript">
	Grids['session-log'].SetDependantToolbarButtons( new Array('delete') );
</script>

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