<inp2:m_include t="incs/header"/>
<inp2:m_RenderElement name="combined_header" prefix="visits" section="in-portal:visits" title_preset="visits_list" pagination="1"/>

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

				function edit()
	  			{

	  			}

				a_toolbar.AddButton( new ToolBarButton('refresh', '<inp2:m_phrase label="la_ToolTip_Refresh" escape="1"/>', function() {
							window.location.href = window.location.href;
						}
				) );

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

				a_toolbar.AddButton( new ToolBarButton('export', '<inp2:m_phrase label="la_ToolTip_Export" escape="1"/>', function() {
							std_csv_export('visits', 'Default', 'export/export_progress');
						}
				) );

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

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

				a_toolbar.Render();
			</script>

		</td>

		<inp2:m_RenderElement name="search_main_toolbar" prefix="visits" grid="Default"/>
	</tr>
</tbody>
</table>

<inp2:m_DefineElement name="grid_userlink_td">
	<inp2:m_if check="UserFound" user_field="$user_field">
		<a href="<inp2:UserLink edit_template='users/users_edit' user_field="$user_field"/>" onclick="return direct_edit('<inp2:m_Param name="PrefixSpecial"/>', this.href);" title="<inp2:m_phrase name="la_Edit_User"/>"><inp2:Field field="$field" grid="$grid"/></a>
	<inp2:m_else/>
		<inp2:Field field="$field" grid="$grid"/>
	</inp2:m_if>
</inp2:m_DefineElement>

<inp2:m_DefineElement name="grid_referer_td">
	<div style="overflow: hidden">
		<inp2:m_if check="FieldEquals" field="$field" value="">
			<span style="white-space: nowrap;"><inp2:m_Phrase label="la_visit_DirectReferer"/></span>
		<inp2:m_else/>
			<a href="<inp2:Field field="$field" grid="$grid"/>"><inp2:Field field="$field" grid="$grid" /></a>
		</inp2:m_if>
	</div>
</inp2:m_DefineElement>

<inp2:m_RenderElement name="grid" PrefixSpecial="visits" IdField="VisitId" grid="Default"/>
<script type="text/javascript">
	Grids['visits'].SetDependantToolbarButtons( new Array('delete') );
</script>
<inp2:m_include t="incs/footer"/>