<inp2:m_DefineElement name="status_mark">
	<inp2:m_if check="Field" name="$field" db="db">
		<img src="<inp2:ModulePath module="in-portal"/>img/ic_<inp2:m_param name="type"/>.gif" title="<inp2:m_phrase label="la_{$type}"/>" width="11" height="11" align="absmiddle" />
	</inp2:m_if>
</inp2:m_DefineElement>

<inp2:m_DefineElement name="grid_catitem_td" format="" no_special="">
	<inp2:m_if check="m_Get" name="type" equals_to="item_selector">
		<inp2:Field field="$field" grid="$grid" no_special="$no_special" format="$format" cut_first="100"/>
	<inp2:m_else/>
		<a href="<inp2:ItemEditLink/>" title="<inp2:m_Phrase name='la_Text_Edit'/>" onclick="return direct_edit('<inp2:m_param name="PrefixSpecial"/>', this.href);"><inp2:Field field="$field" grid="$grid" no_special="$no_special" format="$format" cut_first="100"/></a>
	</inp2:m_if>

	<inp2:m_if check="BrowseModeAvailable" pass_params="1">
		<a href="<inp2:PageBrowseLink template='__default__'/>" title="<inp2:m_Phrase name='la_alt_Browse' html_escape='1'/>">
			<img src="<inp2:m_TemplatesBase/>/img/ic_browse_mode.gif" width="8" height="7" alt="<inp2:m_Phrase name='la_alt_Browse' html_escape='1'/>" border="0"/>
		</a>
	</inp2:m_if>

	<inp2:m_if check="FieldEquals" field="Priority" value="0" inverse="inverse">
		<span class="priority"><sup><inp2:Field field="Priority"/></sup></span>
	</inp2:m_if>
	<inp2:m_RenderElement name="status_mark" field="EditorsPick" type="pick" PrefixSpecial="$PrefixSpecial"/>
	<inp2:m_RenderElement name="status_mark" field="IsPop" type="pop" PrefixSpecial="$PrefixSpecial"/>
	<inp2:m_RenderElement name="status_mark" field="IsNew" type="new" PrefixSpecial="$PrefixSpecial"/>
	<inp2:m_RenderElement name="status_mark" field="IsHot" type="hot" PrefixSpecial="$PrefixSpecial"/>
</inp2:m_DefineElement>

<inp2:m_DefineElement name="grid_primary_category_td" format="">
	<inp2:Field name="CategoryId" db="db" result_to_var="item_category"/>

	<inp2:m_if check="m_Get" name="type" equals_to="item_selector">
		<inp2:CategoryName />
	<inp2:m_else/>
		<a href="<inp2:m_Link template='catalog/catalog' m_cat_id='$item_category' anchor='tab-{$Prefix}' no_pass_through='1'/>"><inp2:CategoryName /></a>
	</inp2:m_if>
</inp2:m_DefineElement>

<inp2:m_DefineElement name="grid_category_td" format="">
	<td valign="top" class="text">
		<inp2:CategoryName />
	</td>
</inp2:m_DefineElement>

<inp2:m_DefineElement name="no_perm_grid" prefix="" perm_label="">
	<table width="100%" border="0" cellspacing="0" cellpadding="4" class="tableborder_full" height="200">
		<tr class="table-color1">
			<td align="center" valign="middle" class="text">
				<inp2:m_phrase name="$perm_label"/>
			</td>
		</tr>
	</table>
</inp2:m_DefineElement>

<inp2:m_DefineElement name="inp_edit_relation">
	<inp2:m_RenderElement design="form_row" pass_params="1">
		<td class="control-cell">
			<inp2:m_if check="{$prefix}_Field" field="$field">
				<img src="<inp2:{$prefix}_ModulePath />img/itemicons/<inp2:{$prefix}_ItemIcon grid="Default"/>" align="absmiddle"/>
				<inp2:{$prefix}_Field field="ItemName" no_special="1"/> (<inp2:{$prefix}_Field field="ItemType"/>)
			</inp2:m_if>
		</td>
	</inp2:m_RenderElement>
</inp2:m_DefineElement>

<inp2:m_DefineElement name="structure_reload_element">
	var $menu_frame = getFrame('menu');

	if ( $menu_frame.ajax_requests_count == 0 ) {
		<inp2:m_if check="m_Recall" var="RefreshStructureTree">
			<inp2:m_DefineElement name="structure_node">
				$menu_frame.ReloadFolder('<inp2:m_param name="section_url" js_escape="1"/>', true);
			</inp2:m_DefineElement>
			<inp2:adm_PrintSection render_as="structure_node" section_name="in-portal:browse"/>
			<inp2:m_RemoveVar var="RefreshStructureTree"/>
		</inp2:m_if>

		$menu_frame.SyncActive('<inp2:m_t pass="m" m_opener="r"/>');
	}
</inp2:m_DefineElement>

<inp2:m_DefineElement name="reflect_catalog_buttons">
	<inp2:m_if check="c_ModuleRootCategory">
		a_toolbar.DisableButton('upcat');
		a_toolbar.DisableButton('homecat');
	<inp2:m_else/>
		a_toolbar.EnableButton('upcat');
		a_toolbar.EnableButton('homecat');
	</inp2:m_if>

	$Catalog.reflectPasteButton(<inp2:c_HasClipboard/>);
</inp2:m_DefineElement>