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

<!-- 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()
  			{

  			}

  			<inp2:m_if check="adm_CheckPermCache">
  				$(document).ready(
  					function() {
  						Application.SetVar('continue', 1);
  						openSelector('c', '<inp2:m_t t="categories/cache_updater" pass="m"/>');
  					}
  				);
  			</inp2:m_if>

  			var a_toolbar = new ToolBar();

				a_toolbar.AddButton( new ToolBarButton('approve', '<inp2:m_phrase label="la_ToolTip_Enable" escape="1"/>', function() {
							submit_event('mod','OnMassApprove');
						}
				 ) );

				a_toolbar.AddButton( new ToolBarButton('deny', '<inp2:m_phrase label="la_ToolTip_Disable" escape="1"/>', function() {
							submit_event('mod','OnMassDecline');
						}
				 ) );

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

<inp2:m_DefineElement name="error_element">
	<inp2:m_Param name="error"/><br />
</inp2:m_DefineElement>

<inp2:m_DefineElement name="grid_module_td" format="" nl2br="" first_chars="" td_style="" currency="">
	<inp2:m_if check="ModuleLicensed">
		<inp2:m_if check="PrerequisitesMet">
			<inp2:m_if check="AlreadyInstalled">
				<inp2:Field name="$field"/>
			<inp2:m_else/>
				<a href="<inp2:InstallLink/>"><inp2:m_Phrase name="la_text_ready_to_install"/></a>
			</inp2:m_if>
		<inp2:m_else/>
			<div style="color: red;">
				<inp2:ListPrerequisites render_as="error_element"/>
			</div>
		</inp2:m_if>
	<inp2:m_else/>
		<a href="<inp2:m_Link template='dummy' prefix='_FRONT_END_' index_file='core/install.php' preset='already_installed' next_preset='update_license'/>" style="color: red;" target="_blank"><inp2:m_Phrase name="la_module_not_licensed"/></a>
	</inp2:m_if>
</inp2:m_DefineElement>

<inp2:m_RenderElement name="grid" PrefixSpecial="mod" IdField="Name" per_page="-1" grid="Default"/>

<script type="text/javascript">
	Grids['mod'].SetDependantToolbarButtons( new Array('approve','deny') );
	<inp2:m_if check="m_GetEquals" name="RefreshTree" value="1">
		var $tree_frame = getFrame('menu');
  		$tree_frame.location.href = $tree_frame.location.href;
  		window.location.href = '<inp2:m_Link/>';
  	</inp2:m_if>
</script>

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