<inp2:m_include t="incs/header" />
<inp2:m_RenderElement name="combined_header" section="in-portal:email_queue" prefix="email-queue" title_preset="email_queue_list" tabs="mailing_lists/mailing_list_tabs" 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(
									'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('email-queue');
									}
				 				)
				 			);

				 			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('email-queue', 'OnDeleteAll');
										}
									}
				 				)
				 			);

				 			a_toolbar.AddButton(
								new ToolBarButton(
									'e-mail',
									'<inp2:m_phrase label="la_ToolTip_ProcessQueue" escape="1"/>',
									function() {
										open_popup('emailmessages', null, 'emails/send_queue');
									}
				 				)
				 			);

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

<inp2:m_DefineElement name="header_element">
	<strong><inp2:m_Param name="key"/></strong>: <inp2:m_Param name="value"/><br />
</inp2:m_DefineElement>

<inp2:m_DefineElement name="grid_headers_td">
	<inp2:PrintSerializedFields field="$field" render_as="header_element"/>
</inp2:m_DefineElement>

<inp2:m_RenderElement name="grid" PrefixSpecial="email-queue" IdField="EmailQueueId" grid="Default"/>
<script type="text/javascript">
	Grids['email-queue'].SetDependantToolbarButtons( new Array('delete') );
</script>

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