<inp2:m_include t="incs/header"/>
<inp2:m_RenderElement name="combined_header" section="in-portal:admins" pagination="1" prefix="u.admins" title_preset="admin_list" grid="Admins"/>

<!-- ToolBar -->
<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
<tbody>
	<tr>
	  	<td>
	  		<script type="text/javascript">
	  			//do not rename - this function is used in default grid for double click!
	  			function edit()
	  			{
	  				set_hidden_field('remove_specials[u.admins]', 1);
	  				std_edit_item('u.admins', 'users/admins_edit');
	  			}

	  			var a_toolbar = new ToolBar();
				a_toolbar.AddButton( new ToolBarButton('new_item', '<inp2:m_phrase label="la_ToolTip_Add" escape="1"/>',
						function() {
							set_hidden_field('remove_specials[u.admins]', 1);
							std_precreate_item('u.admins', 'users/admins_edit')
						} ) );

				a_toolbar.AddButton( new ToolBarButton('edit', '<inp2:m_phrase label="la_ToolTip_Edit" escape="1"/>::<inp2:m_phrase label="la_ShortToolTip_Edit" escape="1"/>', edit) );
				a_toolbar.AddButton( new ToolBarButton('delete', '<inp2:m_phrase label="la_ToolTip_Delete" escape="1"/>',
						function() {
							set_hidden_field('remove_specials[u.admins]', 1);
							std_delete_items('u.admins')
						} ) );


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

				a_toolbar.AddButton( new ToolBarButton('clone', '<inp2:m_phrase label="la_ToolTip_CloneUser" escape="1"/>::<inp2:m_phrase label="la_ShortToolTip_CloneUser" escape="1"/>',
						function() {
							set_hidden_field('remove_specials[u.admins]', 1);
							submit_event('u.admins', 'OnMassCloneUsers');
						} ) );


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

				a_toolbar.AddButton( new ToolBarButton('refresh', '<inp2:m_phrase label="la_ToolTip_ResetSettings" escape="1"/>::<inp2:m_phrase label="la_ShortToolTip_ResetSettings" escape="1"/>',
						function() {
							set_hidden_field('remove_specials[u.admins]', 1);
							submit_event('u.admins', 'OnMassResetSettings');
						} ) );

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

				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="u.admins" grid="Admins"/>
	</tr>
</tbody>
</table>

<inp2:m_RenderElement name="grid" PrefixSpecial="u.admins" IdField="PortalUserId" grid="Admins" menu_filters="yes"/>
<script type="text/javascript">
	Grids['u.admins'].SetDependantToolbarButtons( new Array('edit','delete','clone') );
</script>
<inp2:m_include t="incs/footer"/>