"title" => GetMessage("SALE_MENU_LOCATION_DEFAULT_TITLE"), "url" => Location\Admin\DefaultSiteHelper::getListUrl(), "more_url" => array(Location\Admin\DefaultSiteHelper::getEditUrl()), ), array( "text" => GetMessage("SALE_MENU_LOCATION_TYPES"), "title" => GetMessage("SALE_MENU_LOCATION_TYPES_TITLE"), "url" => Location\Admin\TypeHelper::getListUrl(), "more_url" => array(Location\Admin\TypeHelper::getEditUrl()), ), array( "text" => GetMessage("SALE_MENU_LOCATION_SERVICES"), "title" => GetMessage("SALE_MENU_LOCATION_SERVICES_TITLE"), "url" => Location\Admin\ExternalServiceHelper::getListUrl(), "more_url" => array(Location\Admin\ExternalServiceHelper::getEditUrl()), ), array( "text" => GetMessage("SALE_LOCATION_IMPORT"), "title" => GetMessage("SALE_LOCATION_IMPORT_DESCR"), "url" => Location\Admin\Helper::getImportUrl(), ) ); } else { $locationMenu["items"] = array( array( "text" => GetMessage("sale_menu_locations"), "title" => GetMessage("sale_menu_locations_title"), "url" => "sale_location_admin.php?lang=".LANGUAGE_ID,
<?else:?> <?if($actionFailure):?> <?CAdminMessage::ShowMessage(array('MESSAGE' => $actionFailureMessage, 'type' => 'ERROR'))?> <?endif?> <? $topMenu->Show(); $args = array(); if(intval($_REQUEST['id'])) $args['id'] = intval($_REQUEST['id']); $tabControl->Begin(array( "FORM_ACTION" => Helper::getEditUrl($args) // generally, it is not safe to leave action empty )); $tabControl->BeginNextFormTab(); ?> <?$requiredFld = ' class="adm-detail-required-field"';?> <?$columns = Helper::getColumns('detail');?> <?foreach($columns as $code => $field):?> <?if($code == 'ID' && !$id) continue; // new node or copied ?> <?$value = Helper::makeSafeDisplay($formData[$code], $code);?> <?$tabControl->BeginCustomField($code, $field['title']);?>
$row->AddViewField($code, '<a href="' . $editUrl . '" title="' . Loc::getMessage('SALE_LOCATION_L_EDIT_ITEM') . '">' . $f_ID . '</a>'); } else { $row->AddInputField($code); } } $arActions = array(); $arActions[] = array("ICON" => "edit", "TEXT" => Loc::getMessage('SALE_LOCATION_L_EDIT_ITEM'), "ACTION" => $lAdmin->ActionRedirect($editUrl), "DEFAULT" => true); if ($userIsAdmin) { $arActions[] = array("ICON" => "copy", "TEXT" => Loc::getMessage('SALE_LOCATION_L_COPY_ITEM'), "ACTION" => $lAdmin->ActionRedirect($copyUrl)); $arActions[] = array("SEPARATOR" => true); $arActions[] = array("ICON" => "delete", "TEXT" => Loc::getMessage('SALE_LOCATION_L_DELETE_ITEM'), "ACTION" => "if(confirm('" . CUtil::JSEscape(Loc::getMessage('SALE_LOCATION_L_CONFIRM_DELETE_ITEM')) . "')) " . $lAdmin->ActionDoGroup($f_ID, "delete")); } $row->AddActions($arActions); } $lAdmin->AddGroupActionTable(array("delete" => true)); $aContext = array(array("TEXT" => Loc::getMessage('SALE_LOCATION_L_ADD_ITEM'), "LINK" => Helper::getEditUrl(), "TITLE" => Loc::getMessage('SALE_LOCATION_L_ADD_ITEM'), "ICON" => "btn_new")); $lAdmin->AddAdminContextMenu($aContext); $lAdmin->CheckListMode(); } // empty($fatal) ?> <?php $APPLICATION->SetTitle(Loc::getMessage('SALE_LOCATION_L_EDIT_PAGE_TITLE')); ?> <?php require_once $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/include/prolog_admin_after.php"; ?> <?php
$arMenu["items"][] = array("text" => GetMessage("SALE_TAX"), "title" => GetMessage("SALE_TAX_DESCR"), "items_id" => "menu_sale_taxes", "items" => $arSubItems); } if ($APPLICATION->GetGroupRight("sale") == "W") { $arMenu["items"][] = array("text" => GetMessage("SALE_PERSON_TYPE"), "title" => GetMessage("SALE_PERSON_TYPE_DESCR"), "url" => "sale_person_type.php?lang=" . LANGUAGE_ID, "more_url" => array("sale_person_type_edit.php")); $arMenu["items"][] = array("text" => GetMessage("SALE_STATUS"), "title" => GetMessage("SALE_STATUS_DESCR"), "url" => "sale_status.php?lang=" . LANGUAGE_ID, "more_url" => array("sale_status_edit.php")); if (Bitrix\Main\Config\Option::get("main", "~sale_converted_15", 'N') == 'Y') { $arMenu["items"][] = array("text" => GetMessage("SALE_BUSINESS_VALUE"), "title" => 'SALE_BUSINESS_VALUE title', "url" => "sale_business_value.php?lang=" . LANGUAGE_ID, "more_url" => array("sale_business_value.php")); } $arMenu["items"][] = array("text" => GetMessage("SALE_ORDER_PROPS"), "title" => GetMessage("SALE_ORDER_PROPS_DESCR"), "items_id" => "menu_sale_properties", "items" => array(array("text" => GetMessage("sale_menu_properties"), "title" => GetMessage("sale_menu_properties_title"), "url" => "sale_order_props.php?lang=" . LANGUAGE_ID, "more_url" => array("sale_order_props_edit.php")), array("text" => GetMessage("SALE_ORDER_PROPS_GR"), "title" => GetMessage("SALE_ORDER_PROPS_GR_DESCR"), "url" => "sale_order_props_group.php?lang=" . LANGUAGE_ID, "more_url" => array("sale_order_props_group_edit.php")))); /* LOCATIONS BEGIN */ // this file can be loaded directly, without module include, so ... require_once $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/sale/include.php"; if (class_exists('CSaleLocation')) { $locationMenu = array("text" => GetMessage("SALE_LOCATION"), "title" => GetMessage("SALE_LOCATION_DESCR"), "items_id" => "menu_sale_locations"); if (CSaleLocation::isLocationProEnabled()) { $locationMenu["items"] = array(array("text" => GetMessage("sale_menu_locations"), "title" => GetMessage("sale_menu_locations_title"), "url" => Location\Admin\LocationHelper::getListUrl(0), "more_url" => array(Location\Admin\LocationHelper::getEditUrl()), "module_id" => "sale", "items_id" => Location\Admin\LocationHelper::packItemsQueryString(), "dynamic" => true, "items" => Location\Admin\LocationHelper::getLocationSubMenu()), array("text" => GetMessage("SALE_LOCATION_GROUPS"), "title" => GetMessage("SALE_LOCATION_GROUPS_DESCR"), "url" => Location\Admin\GroupHelper::getListUrl(), "more_url" => array(Location\Admin\GroupHelper::getEditUrl())), array("text" => GetMessage("SALE_MENU_LOCATION_ZONES"), "title" => GetMessage("SALE_MENU_LOCATION_ZONES_TITLE"), "url" => Location\Admin\SiteLocationHelper::getListUrl(), "more_url" => array(Location\Admin\SiteLocationHelper::getEditUrl())), array("text" => GetMessage("SALE_MENU_LOCATION_DEFAULT"), "title" => GetMessage("SALE_MENU_LOCATION_DEFAULT_TITLE"), "url" => Location\Admin\DefaultSiteHelper::getListUrl(), "more_url" => array(Location\Admin\DefaultSiteHelper::getEditUrl())), array("text" => GetMessage("SALE_MENU_LOCATION_TYPES"), "title" => GetMessage("SALE_MENU_LOCATION_TYPES_TITLE"), "url" => Location\Admin\TypeHelper::getListUrl(), "more_url" => array(Location\Admin\TypeHelper::getEditUrl())), array("text" => GetMessage("SALE_MENU_LOCATION_SERVICES"), "title" => GetMessage("SALE_MENU_LOCATION_SERVICES_TITLE"), "url" => Location\Admin\ExternalServiceHelper::getListUrl(), "more_url" => array(Location\Admin\ExternalServiceHelper::getEditUrl())), array("text" => GetMessage("SALE_LOCATION_IMPORT"), "title" => GetMessage("SALE_LOCATION_IMPORT_DESCR"), "url" => Location\Admin\Helper::getImportUrl()), array("text" => GetMessage("SALE_LOCATION_REINDEX"), "title" => GetMessage("SALE_LOCATION_REINDEX_DESCR"), "url" => Location\Admin\Helper::getReindexUrl())); } else { $locationMenu["items"] = array(array("text" => GetMessage("sale_menu_locations"), "title" => GetMessage("sale_menu_locations_title"), "url" => "sale_location_admin.php?lang=" . LANGUAGE_ID, "more_url" => array("sale_location_edit.php")), array("text" => GetMessage("SALE_LOCATION_GROUPS"), "title" => GetMessage("SALE_LOCATION_GROUPS_DESCR"), "url" => "sale_location_group_admin.php?lang=" . LANGUAGE_ID, "more_url" => array("sale_location_group_edit.php")), array("text" => GetMessage("SALE_LOCATION_IMPORT"), "title" => GetMessage("SALE_LOCATION_IMPORT_DESCR"), "url" => "sale_location_import.php?lang=" . LANGUAGE_ID)); $locationMenu["items"][] = array("text" => GetMessage("SALE_MENU_LOCATION_MIGRATION"), "title" => GetMessage("SALE_MENU_LOCATION_MIGRATION_TITLE"), "url" => Location\Admin\Helper::getMigrationUrl()); } $arMenu["items"][] = $locationMenu; unset($locationMenu); } /* LOCATIONS END */ $arMenu["items"][] = array("text" => GetMessage("MAIN_MENU_1C_INTEGRATION"), "title" => GetMessage("MAIN_MENU_1C_INTEGRATION_TITLE"), "url" => "1c_admin.php?lang=" . LANGUAGE_ID, "more_url" => array("1c_admin.php")); $arMenu["items"][] = array("text" => GetMessage("MAIN_MENU_REPORT_EDIT"), "title" => GetMessage("MAIN_MENU_REPORT_EDIT_TITLE"), "url" => "sale_report_edit.php?lang=" . LANGUAGE_ID, "more_url" => array("sale_report_edit.php")); if ($APPLICATION->GetGroupRight("sale") == "W" && (LANGUAGE_ID == "ru" || LANGUAGE_ID == "ua")) { $arMenu["items"][] = array("text" => GetMessage("SALE_TRADING_PLATFORMS"), "title" => GetMessage("SALE_TRADING_PLATFORMS_DESCR"), "items_id" => "menu_sale_trading_platforms", "items" => array(array("text" => GetMessage("SALE_YANDEX_MARKET"), "title" => GetMessage("SALE_YANDEX_MARKET_DESCR"), "url" => "sale_ymarket.php?lang=" . LANGUAGE_ID, "more_url" => array("sale_ymarket.php")), array("text" => "Ebay", "title" => "Ebay", "items_id" => "menu_sale_trading_platforms_ebay", "more_url" => array("sale_ebay_actions.php"), "items" => array(array("text" => GetMessage("SALE_MENU_EBAY_WIZARD"), "title" => GetMessage("SALE_MENU_EBAY_EXCHANGE_DESCR"), "url" => "sale_ebay_wizard.php?lang=" . LANGUAGE_ID, "more_url" => array("sale_ebay_wizard.php")), array("text" => GetMessage("SALE_MENU_EBAY_SETT"), "title" => GetMessage("SALE_MENU_EBAY_SETT_DESCR"), "url" => "sale_ebay.php?lang=" . LANGUAGE_ID, "more_url" => array("sale_ebay.php")), array("text" => GetMessage("SALE_MENU_EBAY_POLICY"), "title" => GetMessage("SALE_MENU_EBAY_POLICY_DESCR"), "url" => "sale_ebay_policy.php?lang=" . LANGUAGE_ID, "more_url" => array("sale_ebay_policy.php")), array("text" => GetMessage("SALE_MENU_EBAY_EXCHANGE"), "title" => GetMessage("SALE_MENU_EBAY_EXCHANGE_DESCR"), "url" => "sale_ebay_exchange.php?lang=" . LANGUAGE_ID, "more_url" => array("sale_ebay_exchange.php")))))); } } $aMenu[] = $arMenu;
if ($actionFailure) { ?> <?php CAdminMessage::ShowMessage(array('MESSAGE' => $actionFailureMessage, 'type' => 'ERROR')); ?> <?php } ?> <?php $topMenu->Show(); $args = array(); if (intval($_REQUEST['id'])) { $args['id'] = intval($_REQUEST['id']); } $tabControl->Begin(array("FORM_ACTION" => Helper::getEditUrl($args))); $tabControl->BeginNextFormTab(); ?> <?php $requiredFld = ' class="adm-detail-required-field"'; ?> <?php $columns = Helper::getColumns('detail'); ?> <?php foreach ($columns as $code => $field) { ?> <?php
$arActions[] = array("ICON"=>"copy", "TEXT"=>Loc::getMessage('SALE_LOCATION_L_COPY_ITEM'), "ACTION"=>$lAdmin->ActionRedirect($copyUrl)); $arActions[] = array("SEPARATOR"=>true); $arActions[] = array("ICON"=>"delete", "TEXT"=>Loc::getMessage('SALE_LOCATION_L_DELETE_ITEM'), "ACTION"=>"if(confirm('".CUtil::JSEscape(Loc::getMessage('SALE_LOCATION_L_CONFIRM_DELETE_ITEM'))."')) ".$lAdmin->ActionDoGroup($f_ID, "delete")); } $row->AddActions($arActions); } $lAdmin->AddGroupActionTable(Array( "delete" => true )); $aContext = array( array( "TEXT" => Loc::getMessage('SALE_LOCATION_L_ADD_ITEM'), "LINK" => Helper::getEditUrl(), "TITLE" => Loc::getMessage('SALE_LOCATION_L_ADD_ITEM'), "ICON" => "btn_new" ), ); $lAdmin->AddAdminContextMenu($aContext); $lAdmin->CheckListMode(); } // empty($fatal) ?> <?$APPLICATION->SetTitle(Loc::getMessage('SALE_LOCATION_L_EDIT_PAGE_TITLE'))?> <?require_once($_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/main/include/prolog_admin_after.php");?> <?