##if (CreateMenu) || IsAdminTable(@TABLE)##
{BEGIN menu_block}
<div id="menu_block{$id}" >
##if !IsAdminTable(@TABLE) || !@BUILDER.m_bDynamicPermissions##
<!-- MainMenuBegin -->
{$mainmenu horizontal}
<!-- MainMenuEnd -->	
##else##
<!-- Строим Admin menu -->
<style>
.menuitem {padding:6px 18px 10px 13px;margin-bottom:1px}
.menuitem_active {padding:6px 18px 11px 13px;}
</style>
##foreach @BUILDER.Tables as @t filter IsAdminTable(@t)##
{BEGIN ##@t.strShortTableName##_tablelink}
	<div>
##if @t.strDataSourceTable!=@TABLE.strDataSourceTable##
		<b class="rb1 rb1_menu"></b><b class="rb2 rb2_menu"></b><b class="rb3 rb3_menu"></b><b class="rb4 rb4_menu"></b>
##else##	
		<b class="rb1 rb1_menua"></b><b class="rb2 rb2_menua"></b><b class="rb3 rb3_menua"></b><b class="rb4 rb4_menua"></b>
##endif##
		<div class="menuitem##if @t.strDataSourceTable==@TABLE.strDataSourceTable##_active##endif##">
			<a class="menu_db##if @t.strDataSourceTable!=@TABLE.strDataSourceTable##2##endif##" {$##@t.strShortTableName##_tablelink_attrs}>
##if @t.strDataSourceTable=="admin_users"##
##message AA_ADDEDIT_USERS##
##elseif @t.strDataSourceTable=="admin_members"##
##message AA_ASSIGN_USERS##
##elseif @t.strDataSourceTable=="admin_rights"##
##message AA_PERMISSIONS##
##endif##
			</a>
		</div>
	</div>
{END ##@t.strShortTableName##_tablelink}
##endfor##
##endif##
</div>
{END menu_block}
##endif##
