<inp2:m_include t="incs/header" />
<inp2:m_RenderElement name="combined_header" section="in-portal:change_logs" prefix="change-log" title_preset="change_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_item('change-log', 'logs/change_logs/change_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 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="change-log" grid="Default"/>
	  			</tr>
	  		</table>
		</td>
	</tr>
</tbody>
</table>

<style type="text/css">
	tr.row-create td {
		background-color: #F0FFE6;
	}

	tr.row-update td {
		background-color: #FFFFE6;
	}

	tr.row-delete td {
		background-color: #FFE6E6;
	}
</style>

<inp2:m_DefineElement name="row_class">
	<inp2:m_if check="FieldEquals" field="Action" value="1">
		row-create
	<inp2:m_else/>
		<inp2:m_if check="FieldEquals" field="Action" value="2">
			row-update
		<inp2:m_else/>
			row-delete
		</inp2:m_if>
	</inp2:m_if>
</inp2:m_DefineElement>

<inp2:m_DefineElement name="grid_changes_td" format="" nl2br="" first_chars="" td_style="">
	<inp2:Field field="$field" first_chars="$first_chars" nl2br="$nl2br" grid="$grid" no_special="1" format="$format"/>
</inp2:m_DefineElement>

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

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