protected override void PreLoadComponentDefinition() { Title = "Список заявок, договорв, туристов, услуг"; Description = "Компонент выводит список заявок текущего пользователя со всеми данными"; Icon = "images/icon.gif"; Group = new BXComponentGroup("volotour-agreement", "Заявки и договора", 100, new BXComponentGroup("volotour", "ВОЛО ТУР", 1000, null)); ParamsDefinition["OrdersIBlockId"] = new BXParamSingleSelection("Инфоблок заявок", "0", BXCategory.Main); ParamsDefinition["AgreementsIBlockId"] = new BXParamSingleSelection("Инфоблок договоров", "0", BXCategory.Main); ParamsDefinition["TouristsIBlockId"] = new BXParamSingleSelection("Инфоблок туристов", "0", BXCategory.Main); ParamsDefinition["ServicesIBlockId"] = new BXParamSingleSelection("Инфоблок услуг", "0", BXCategory.Main); ParamsDefinition["PaysIBlockId"] = new BXParamSingleSelection("Инфоблок платежей", "0", BXCategory.Main); ParamsDefinition["Count"] = new BXParamText("Количество выводимых элементов в списках", "10", BXCategory.Main); }
protected override void PreLoadComponentDefinition() { Title = GetMessageRaw("Title"); Description = GetMessageRaw("Description"); Group = new BXComponentGroup("media", GetMessage("Group"), 100, BXComponentGroup.Content); Icon = "images/mediagallery.gif"; BXCategory mainCategory = BXCategory.Main; BXCategory dataSourceCategory = BXCategory.DataSource; ParamsDefinition.Add( "IBlockTypeId", new BXParamSingleSelection( GetMessageRaw("InfoBlockType"), String.Empty, mainCategory ) ); ParamsDefinition.Add( "IBlockId", new BXParamSingleSelection( GetMessageRaw("InfoBlockCode"), String.Empty, mainCategory ) ); ParamsDefinition.Add( "IBlockElementPropertyForFilePath", new BXParamSingleSelection( GetMessageRaw("IBlockElementPropertyForFilePath"), "", dataSourceCategory ) ); ParamsDefinition.Add( "IBlockElementPropertyForPlaylistPreviewImageFilePath", new BXParamSingleSelection( GetMessageRaw("IBlockElementPropertyForPlaylistPreviewImageFilePath"), "", dataSourceCategory ) ); ParamsDefinition.Add( "IBlockElementPropertyForPlayerPreviewImageFilePath", new BXParamSingleSelection( GetMessageRaw("IBlockElementPropertyForPlayerPreviewImageFilePath"), "", dataSourceCategory ) ); ParamsDefinition.Add( "IBlockElementPropertyForDownloadingFilePath", new BXParamSingleSelection( GetMessageRaw("IBlockElementPropertyForDownloadingFilePath"), "", BXCategory.DataSource ) ); BXCategory listSettings = BXCategory.ListSettings; ParamsDefinition.Add( "ListSortBy", new BXParamSingleSelection( GetMessageRaw("SortBy"), "Id", listSettings ) ); ParamsDefinition.Add( "ListSortOrder", new BXParamSort( GetMessageRaw("SortOrder"), true, listSettings ) ); ParamsDefinition.Add( "ShowSubElements", new BXParamYesNo( GetMessageRaw("DisplaySubsectionElements"), true, listSettings )); ParamsDefinition.Add( "ShowAllElementsOnIndex", new BXParamYesNo( GetMessageRaw("ShowAllElementsOnIndex"), true, listSettings )); ParamsDefinition.Add( "ListProperties", new BXParamMultiSelection( GetMessageRaw("Properties"), "-", listSettings ) ); //ParamsDefinition.Add( // "ListProperties", // new BXParamDoubleList( // GetMessageRaw("Properties"), // "", // listSettings // ) //); BXCategory detailSettings = BXCategory.DetailSettings; ParamsDefinition.Add( "DetailProperties", new BXParamMultiSelection( GetMessageRaw("Properties"), "-", detailSettings ) ); ParamsDefinition.Add( "PropertyKeywords", new BXParamSingleSelection( GetMessageRaw("SetPageKeywordsFromProperty"), "-", detailSettings ) ); ParamsDefinition.Add( "PropertyDescription", new BXParamSingleSelection( GetMessageRaw("SetPageDescriptionFromProperty"), "-", detailSettings ) ); ParamsDefinition.Add( "PlayerEnableFullScreenModeSwitch", new BXParamYesNo( GetMessageRaw("PlayerEnableFullScreenModeSwitch"), true, detailSettings ) ); ParamsDefinition.Add( "PlayerWidth", new BXParamText( GetMessageRaw("PlayerWidth"), "425px", detailSettings ) ); ParamsDefinition.Add( "PlayerHeight", new BXParamText( GetMessageRaw("PlayerHeight"), "344px", detailSettings ) ); ParamsDefinition.Add( "PlayerStretching", new BXParamSingleSelection( GetMessageRaw("PlayerStretching"), Enum.GetName(typeof(MediaPlayerStretchingMode), MediaPlayerStretchingMode.Proportionally), detailSettings ) ); string groupControlPanel = "controlPanel"; ParamsDefinition.Add( "PlayerShowControlPanel", new BXParamYesNo( GetMessageRaw("PlayerShowControlPanel"), true, detailSettings, new ParamClientSideActionGroupViewSwitch(ClientID, "PlayerShowControlPanel", groupControlPanel, string.Empty) ) ); ParamsDefinition.Add( "PlayerControlPanelBackgroundColor", new BXParamText( GetMessageRaw("PlayerControlPanelBackgroundColor"), "FFFFFF", detailSettings, new ParamClientSideActionGroupViewMember(ClientID, "PlayerControlPanelBackgroundColor", new string[] { groupControlPanel }) ) ); ParamsDefinition.Add( "PlayerControlsColor", new BXParamText( GetMessageRaw("PlayerControlsColor"), "000000", detailSettings, new ParamClientSideActionGroupViewMember(ClientID, "PlayerControlsColor", new string[] { groupControlPanel }) ) ); ParamsDefinition.Add( "PlayerControlsOverColor", new BXParamText( GetMessageRaw("PlayerControlsOverColor"), "000000", detailSettings, new ParamClientSideActionGroupViewMember(ClientID, "PlayerControlsOverColor", new string[] { groupControlPanel }) ) ); ParamsDefinition.Add( "PlayerScreenColor", new BXParamText( GetMessageRaw("PlayerScreenColor"), "000000", detailSettings ) ); ParamsDefinition.Add( "PlayerVolumeLevelInPercents", new BXParamText( GetMessageRaw("PlayerVolumeLevelInPercents"), "90", detailSettings ) ); ParamsDefinition.Add( "PlayerBufferLengthInSeconds", new BXParamText( GetMessageRaw("PlayerBufferLengthInSeconds"), "10", detailSettings ) ); ParamsDefinition.Add( "PlayerEnableAutoStart", new BXParamYesNo( GetMessageRaw("PlayerEnableAutoStart"), false, detailSettings ) ); ParamsDefinition.Add( "PlayerEnableRepeatMode", new BXParamYesNo( GetMessageRaw("PlayerEnableRepeatMode"), false, detailSettings ) ); string groupDownloading = "downloading"; ParamsDefinition.Add( "PlayerEnableDownloading", new BXParamYesNo( GetMessageRaw("PlayerEnableDownloading"), true, detailSettings, new ParamClientSideActionGroupViewSwitch(ClientID, "PlayerEnableDownloading", groupDownloading, string.Empty) ) ); ParamsDefinition.Add( "PlayerDownloadingLinkTargetWindow", new BXParamSingleSelection( GetMessageRaw("PlayerDownloadingLinkTargetWindow"), "_self", detailSettings, null, new ParamClientSideActionGroupViewMember(ClientID, "PlayerDownloadingLinkTargetWindow", new string[] { groupDownloading }) ) ); /*BXCategory treeSettings = new BXCategory(GetMessageRaw("SectionTreeCategory"), "treeSettings", 850); ParamsDefinition.Add( "DepthLevel", new BXParamText( GetMessageRaw("SubsectionsDisplayDepth"), "2", treeSettings ) ); ParamsDefinition.Add( "ShowCounters", new BXParamYesNo( GetMessageRaw("DisplayQuantityOfElementsInSection"), false, treeSettings ) ); ParamsDefinition.Add( "IncludeParentSections", new BXParamYesNo( GetMessageRaw("IncludeParentSections"), true, treeSettings ) );*/ BXCategory additionalSettings = BXCategory.AdditionalSettings; ParamsDefinition.Add( "AddAdminPanelButtons", new BXParamYesNo( GetMessageRaw("AddButtonsForThisComponentToAdminPanel"), false, additionalSettings ) ); ParamsDefinition.Add( "SetPageTitle", new BXParamYesNo( GetMessageRaw("SetPageTitle"), true, additionalSettings ) ); string clientSideActionGroupViewId = ClientID; BXCategory topSettings = new BXCategory(GetMessageRaw("TopSectionSortBy.Category"), "topSettings", 900); ParamsDefinition.Add( "ShowTopElements", new BXParamYesNo( GetMessageRaw("DisplayTopOfElements"), false, topSettings, new ParamClientSideActionGroupViewSwitch(clientSideActionGroupViewId, "ShowTopElements", "Top", "NonTop") ) ); ParamsDefinition.Add( "TopElementCount", new BXParamText( GetMessageRaw("ElementsPerPage"), "6", topSettings, new ParamClientSideActionGroupViewMember(clientSideActionGroupViewId, "TopElementCount", new string[] { "Top" }) ) ); ParamsDefinition.Add( "TopSortBy", new BXParamSingleSelection( GetMessageRaw("SortBy"), "Id", topSettings, null, new ParamClientSideActionGroupViewMember(clientSideActionGroupViewId, "TopSortBy", new string[] { "Top" }) ) ); ParamsDefinition.Add( "TopSortOrder", new BXParamSort( GetMessageRaw("SortOrder"), true, topSettings, new ParamClientSideActionGroupViewMember(clientSideActionGroupViewId, "TopSortOrder", new string[] { "Top" }) ) ); ParamsDefinition.Add( "TopProperties", new BXParamMultiSelection( GetMessageRaw("Properties"), "-", topSettings, null, new ParamClientSideActionGroupViewMember(clientSideActionGroupViewId, "TopProperties", new string[] { "Top" }) ) ); BXParamsBag<BXParam> SefParams = BXParametersDefinition.Sef; SefParams["EnableSEF"].ClientSideAction = new ParamClientSideActionGroupViewSwitch(clientSideActionGroupViewId, "EnableSEF", "Sef", "NonSef"); SefParams["SEFFolder"].ClientSideAction = new ParamClientSideActionGroupViewMember(clientSideActionGroupViewId, "SEFFolder", new string[] { "Sef" }); ParamsDefinition.Add(SefParams); ParamsDefinition.Add( "SectionIdVariable", new BXParamText( GetMessageRaw("SectionID"), "section_id", BXCategory.Sef, new ParamClientSideActionGroupViewMember(clientSideActionGroupViewId, "SectionIdVariable", new string[] { "NonSef" }) ) ); ParamsDefinition.Add( "ElementIdVariable", new BXParamText( GetMessageRaw("ElementID"), "element_id", BXCategory.Sef, new ParamClientSideActionGroupViewMember(clientSideActionGroupViewId, "ElementIdVariable", new string[] { "NonSef" }) ) ); ParamsDefinition.Add( "PageIdVariable", new BXParamText( GetMessageRaw("PageIdVariable"), "page", BXCategory.Sef, new ParamClientSideActionGroupViewMember(clientSideActionGroupViewId, "PageIdVariable", new string[] { "NonSef" }) ) ); ParamsDefinition.Add( "ShowAllVariable", new BXParamText( GetMessageRaw("ShowAllVariable"), "showall", BXCategory.Sef, new ParamClientSideActionGroupViewMember(clientSideActionGroupViewId, "ShowAllVariable", new string[] { "NonSef" }) ) ); ParamsDefinition.Add( "ElementDetailTemplate", new BXParamText( GetMessageRaw("ElementDetailTemplate"), "/#SectionId#/item-#ElementId#/", BXCategory.Sef, new ParamClientSideActionGroupViewMember(clientSideActionGroupViewId, "ElementDetailTemplate", new string[] { "Sef" }) ) ); ParamsDefinition.Add( "ElementListTemplate", new BXParamText( GetMessageRaw("ElementListTemplate"), "/#SectionId#/", BXCategory.Sef, new ParamClientSideActionGroupViewMember(clientSideActionGroupViewId, "ElementListTemplate", new string[] { "Sef" }) ) ); ParamsDefinition.Add( "CommonListPageTemplate", new BXParamText( GetMessageRaw("CommonListPageTemplate"), "/page-#PageId#", BXCategory.Sef, new ParamClientSideActionGroupViewMember(clientSideActionGroupViewId, "CommonListPageTemplate", new string[] { "Sef" }) ) ); ParamsDefinition.Add( "CommonListShowAllTemplate", new BXParamText( GetMessageRaw("CommonListShowAllTemplate"), "/all", BXCategory.Sef, new ParamClientSideActionGroupViewMember(clientSideActionGroupViewId, "CommonListShowAllTemplate", new string[] { "Sef" }) ) ); ParamsDefinition.Add( "SectionListPageTemplate", new BXParamText( GetMessageRaw("SectionListPageTemplate"), "/#SectionId#/page-#PageId#", BXCategory.Sef, new ParamClientSideActionGroupViewMember(clientSideActionGroupViewId, "SectionListPageTemplate", new string[] { "Sef" }) ) ); ParamsDefinition.Add( "SectionListShowAllTemplate", new BXParamText( GetMessageRaw("SectionListShowAllTemplate"), "/#SectionId#/all", BXCategory.Sef, new ParamClientSideActionGroupViewMember(clientSideActionGroupViewId, "SectionListShowAllTemplate", new string[] { "Sef" }) ) ); ParamsDefinition.Add(BXParametersDefinition.GetPaging(clientSideActionGroupViewId)); ParamsDefinition.Add(BXParametersDefinition.Cache); //ParamsDefinition.Add(BXParametersDefinition.Search); //ParamsDefinition.Add(BXParametersDefinition.Ajax); if (!String.IsNullOrEmpty(DesignerSite)) ParamsDefinition.Add(BXParametersDefinition.Menu(DesignerSite)); }
protected override void PreLoadComponentDefinition() { Title = GetMessage("Title"); Description = GetMessage("Description"); Icon = "images/news_all.gif"; Group = new BXComponentGroup("news", GetMessage("Group"), 20, BXComponentGroup.Content); string clientSideActionGroupViewId = ClientID; //test //ParamsDefinition.Add( // "TestParam", // new BXParamSingleSelectionWithText( // "Test param", // String.Empty, // BXCategory.Main, new BXParamValue[] { new BXParamValue("1", "1"), new BXParamValue("2", "2"), new BXParamValue("3", "3") } // ) //); //IBlockTypeId ParamsDefinition.Add( "IBlockTypeId", new BXParamSingleSelection( GetMessageRaw("InfoBlockType"), String.Empty, BXCategory.Main ) ); ParamsDefinition["IBlockTypeId"].RefreshOnDirty = true; BXCategory detailGroup = BXCategory.DetailSettings; BXCategory listGroup = BXCategory.ListSettings; listGroup.Sort = 210; detailGroup.Sort = 220; //IBlockId ParamsDefinition.Add( "IBlockId", new BXParamSingleSelection( GetMessageRaw("InfoBlockCode"), String.Empty, BXCategory.Main ) ); ParamsDefinition["IBlockId"].RefreshOnDirty = true; //NewsCount ParamsDefinition.Add( "PagingRecordsPerPage", new BXParamText( GetMessageRaw("NewsPerPage"), "20", BXCategory.Main ) ); //ParamsDefinition.Add(BXParametersDefinition.Sef); BXParamsBag<BXParam> sefParBag = BXParametersDefinition.Sef; //sefParBag["EnableSEF"].ClientSideAction = new ParamClientSideActionShowSefRelated(true); sefParBag["EnableSEF"].ClientSideAction = new ParamClientSideActionGroupViewSwitch(clientSideActionGroupViewId, "EnableSEF", "Sef", "NonSef"); //sefParBag["SEFFolder"].ClientSideAction = new ParamClientSideActionShowSefRelated(ParamClientSideActionShowSefRelatedParticipantType.Sef); sefParBag["SEFFolder"].ClientSideAction = new ParamClientSideActionGroupViewMember(clientSideActionGroupViewId, "SEFFolder", new string[] { "Sef" }); ParamsDefinition.Add(sefParBag); //ParamSection ParamsDefinition.Add( "ParamSection", new BXParamText( GetMessageRaw("SectionID"), "section", BXCategory.Sef, //new ParamClientSideActionShowSefRelated(ParamClientSideActionShowSefRelatedParticipantType.NonSef) new ParamClientSideActionGroupViewMember(clientSideActionGroupViewId, "ParamSection", new string[] { "NonSef" }) ) ); //ParamNews ParamsDefinition.Add( "ParamNews", new BXParamText( GetMessageRaw("NewsID"), "news", BXCategory.Sef, //new ParamClientSideActionShowSefRelated(ParamClientSideActionShowSefRelatedParticipantType.NonSef) new ParamClientSideActionGroupViewMember(clientSideActionGroupViewId, "ParamNews", new string[] { "NonSef" }) ) ); //ParamPage ParamsDefinition.Add( "ParamPage", new BXParamText( GetMessageRaw("PageParamForList"), "page", BXCategory.Sef, //new ParamClientSideActionShowSefRelated(ParamClientSideActionShowSefRelatedParticipantType.NonSef) new ParamClientSideActionGroupViewMember(clientSideActionGroupViewId, "ParamPage", new string[] { "NonSef" }) ) ); //ParamShowAll ParamsDefinition.Add( "ParamShowAll", new BXParamText( GetMessageRaw("ShowAllParam"), "showall", BXCategory.Sef, //new ParamClientSideActionShowSefRelated(ParamClientSideActionShowSefRelatedParticipantType.NonSef) new ParamClientSideActionGroupViewMember(clientSideActionGroupViewId, "ParamShowAll", new string[] { "NonSef" }) ) ); ParamsDefinition.Add( "ParamComment", new BXParamText( GetMessageRaw("ParamComment"), "comment", BXCategory.Sef, new ParamClientSideActionGroupViewMember(clientSideActionGroupViewId, "ParamComment", new string[] { "NonSef" }) ) ); ParamsDefinition.Add( "ParamCommentOperation", new BXParamText( GetMessageRaw("ParamCommentOperation"), "act", BXCategory.Sef, new ParamClientSideActionGroupViewMember(clientSideActionGroupViewId, "ParamCommentOperation", new string[] { "NonSef" }) ) ); ParamsDefinition.Add( "ParamCommentPage", new BXParamText( GetMessageRaw("ParamCommentPage"), "page", BXCategory.Sef, new ParamClientSideActionGroupViewMember(clientSideActionGroupViewId, "ParamCommentPage", new string[] { "NonSef" }) ) ); //Sef_News ParamsDefinition.Add( "Sef_News", new BXParamText( GetMessageRaw("PageOfDetailedView"), "/#SectionId#/news-#ElementId#/", BXCategory.Sef, //new ParamClientSideActionShowSefRelated(ParamClientSideActionShowSefRelatedParticipantType.Sef) new ParamClientSideActionGroupViewMember(clientSideActionGroupViewId, "Sef_News", new string[] { "Sef" }) ) ); //Sef_RSS ParamsDefinition.Add( "Sef_Rss", new BXParamText( GetMessageRaw("RssPage"), "/rss/", BXCategory.Sef, //new ParamClientSideActionShowSefRelated(ParamClientSideActionShowSefRelatedParticipantType.Sef) new ParamClientSideActionGroupViewMember(clientSideActionGroupViewId, "Sef_Rss", new string[] { "Sef" }) ) ); //Sef_Section ParamsDefinition.Add( "Sef_Section", new BXParamText( GetMessageRaw("SectionPage"), "/#SectionId#/", BXCategory.Sef, //new ParamClientSideActionShowSefRelated(ParamClientSideActionShowSefRelatedParticipantType.Sef) new ParamClientSideActionGroupViewMember(clientSideActionGroupViewId, "Sef_Section", new string[] { "Sef" }) ) ); //Sef_RSS ParamsDefinition.Add( "Sef_Rss_Section", new BXParamText( GetMessageRaw("SectionRssPage"), "/rss/#SectionId#/", BXCategory.Sef, //new ParamClientSideActionShowSefRelated(ParamClientSideActionShowSefRelatedParticipantType.Sef) new ParamClientSideActionGroupViewMember(clientSideActionGroupViewId, "Sef_Rss_Section", new string[] { "Sef" }) ) ); //Sef_Page ParamsDefinition.Add( "Sef_Page", new BXParamText( GetMessageRaw("OnePageInNewsList"), "/page-#pageId#", BXCategory.Sef, //new ParamClientSideActionShowSefRelated(ParamClientSideActionShowSefRelatedParticipantType.Sef) new ParamClientSideActionGroupViewMember(clientSideActionGroupViewId, "Sef_Page", new string[] { "Sef" }) ) ); //Sef_ShowAll ParamsDefinition.Add( "Sef_ShowAll", new BXParamText( GetMessageRaw("AllPagesInNewsList"), "/all", BXCategory.Sef, //new ParamClientSideActionShowSefRelated(ParamClientSideActionShowSefRelatedParticipantType.Sef) new ParamClientSideActionGroupViewMember(clientSideActionGroupViewId, "Sef_ShowAll", new string[] { "Sef" }) ) ); //Sef_Page ParamsDefinition.Add( "Sef_Section_Page", new BXParamText( GetMessageRaw("OnePageInSectionNewsList"), "/#SectionId#/page-#pageId#", BXCategory.Sef, //new ParamClientSideActionShowSefRelated(ParamClientSideActionShowSefRelatedParticipantType.Sef) new ParamClientSideActionGroupViewMember(clientSideActionGroupViewId, "Sef_Section_Page", new string[] { "Sef" }) ) ); //Sef_ShowAll ParamsDefinition.Add( "Sef_Section_ShowAll", new BXParamText( GetMessageRaw("AllPagesInSectionNewsList"), "/#SectionId#/all", BXCategory.Sef, //new ParamClientSideActionShowSefRelated(ParamClientSideActionShowSefRelatedParticipantType.Sef) new ParamClientSideActionGroupViewMember(clientSideActionGroupViewId, "Sef_Section_ShowAll", new string[] { "Sef" }) ) ); //Sef_Detail_Comment_Read ParamsDefinition.Add( "Sef_Detail_Comment_Read", new BXParamText( GetMessageRaw("SefDetailCommentRead"), "/#SectionId#/news-#ElementId#/comment-#CommentId#/", BXCategory.Sef, new ParamClientSideActionGroupViewMember(clientSideActionGroupViewId, "Sef_Detail_Comment_Read", new string[] { "Sef" }) ) ); //Sef_Detail_Comment_Operation ParamsDefinition.Add( "Sef_Detail_Comment_Operation", new BXParamText( GetMessageRaw("SefDetailCommentOperation"), "/#SectionId#/news-#ElementId#/comment-#CommentId#/act-#Operation#/", BXCategory.Sef, new ParamClientSideActionGroupViewMember(clientSideActionGroupViewId, "Sef_Detail_Comment_Operation", new string[] { "Sef" }) ) ); //Sef_Detail_Comment_Page ParamsDefinition.Add( "Sef_Detail_Comment_Page", new BXParamText( GetMessageRaw("SefDetailCommentPage"), "/#SectionId#/news-#ElementId#/page-#PageID#/", BXCategory.Sef, new ParamClientSideActionGroupViewMember(clientSideActionGroupViewId, "Sef_Detail_Comment_Page", new string[] { "Sef" }) ) ); ParamsDefinition.Add(BXParametersDefinition.Ajax); BXCategory rssCategory = new BXCategory(GetMessageRaw("RssSettings"), "RssSettings", 250); ParamsDefinition.Add( "UseRss", new BXParamYesNo( GetMessageRaw("AllowRss"), true, rssCategory ) ); ParamsDefinition.Add( "RssElementsCount", new BXParamText( GetMessageRaw("RssElementCount"), "20", rssCategory ) ); ParamsDefinition.Add( "RssDaysCount", new BXParamText( GetMessageRaw("RssDayCount"), "", rssCategory ) ); //SortBy1 ParamsDefinition.Add( "SortBy1", new BXParamSingleSelection( GetMessageRaw("SortByFirst"), "ActiveFromDate", BXCategory.DataSource ) ); //SortBy2 ParamsDefinition.Add( "SortBy2", new BXParamSingleSelection( GetMessageRaw("SortBySecond"), "ID", BXCategory.DataSource ) ); //SortOrder1 ParamsDefinition.Add( "SortOrder1", new BXParamSort( GetMessageRaw("FirstSortOrder"), BXCategory.DataSource ) ); //SortOrder2 ParamsDefinition.Add( "SortOrder2", new BXParamSort( GetMessageRaw("SecondSortOrder"), BXCategory.DataSource ) ); ParamsDefinition.Add( "ListShowPreviewText", new BXParamYesNo( GetMessageRaw("ShowPreviewText"), true, listGroup ) ); ParamsDefinition.Add( "ListShowDetailText", new BXParamYesNo( GetMessageRaw("ListShowDetailText"), false, listGroup ) ); ParamsDefinition.Add( "ListShowPreviewPicture", new BXParamYesNo( GetMessageRaw("ShowPreviewPicture"), true, listGroup ) ); //PreviewTruncateLen ParamsDefinition.Add( "PreviewTruncateLen", new BXParamText( GetMessageRaw("MaxAnnouncementOutputLength"), "0", listGroup ) ); ParamsDefinition.Add( "ListShowTitle", new BXParamYesNo( GetMessageRaw("ShowTitle"), true, listGroup ) ); //SetTitle ParamsDefinition.Add( "ListSetTitle", new BXParamYesNo( GetMessageRaw("SetPageTitle"), false, listGroup ) ); ParamsDefinition.Add( "ListShowDate", new BXParamYesNo( GetMessageRaw("ShowDate"), true, listGroup ) ); //ActiveDateFormat ParamsDefinition.Add( "ActiveDateFormat", new BXParamSingleSelection( GetMessageRaw("DateDisplayFormat"), "dd.MM.yyyy", listGroup ) ); //HideLinkWhenNoDetail ParamsDefinition.Add( "HideLinkWhenNoDetail", new BXParamYesNo( GetMessageRaw("HideLinkIfDetailedDescriptionIsNotExist"), false, listGroup ) ); //PropertyCode ParamsDefinition.Add( "PropertyCode", new BXParamMultiSelection( GetMessageRaw("Properties"), String.Empty, listGroup ) ); ParamsDefinition.Add( "DetailShowTitle", new BXParamYesNo( GetMessageRaw("ShowTitle"), true, detailGroup ) ); ParamsDefinition.Add( "DetailSetTitle", new BXParamYesNo( GetMessageRaw("SetPageTitle"), false, detailGroup ) ); //ShowDetailPicture ParamsDefinition.Add( "DetailShowDetailPicture", new BXParamYesNo( GetMessageRaw("ShowDetailPicture"), true, detailGroup ) ); ParamsDefinition.Add( "DetailShowPreviewPicture", new BXParamYesNo( GetMessageRaw("ShowPreviewPicture"), false, detailGroup ) ); ParamsDefinition.Add( "DetailShowPreviewText", new BXParamYesNo( GetMessageRaw("ShowPreviewText"), false, detailGroup ) ); ParamsDefinition.Add( "DetailShowDate", new BXParamYesNo( GetMessageRaw("ShowDate"), true, detailGroup ) ); //DetailActiveDateFormat ParamsDefinition.Add( "DetailActiveDateFormat", new BXParamSingleSelection( GetMessageRaw("DateDisplayFormat"), "dd.MM.yyyy", detailGroup ) ); ParamsDefinition.Add( "IBlockUrlTitle", new BXParamText( GetMessageRaw("LinkNameToElementsList"), GetMessageRaw("BackToNewsList"), detailGroup ) ); //DetailPropertyCode ParamsDefinition.Add( "DetailPropertyCode", new BXParamMultiSelection( GetMessageRaw("PropertiesForDetailedView"), String.Empty, detailGroup ) ); //DisplayPanel ParamsDefinition.Add( "DisplayPanel", new BXParamYesNo( GetMessageRaw("AddButtonsForThisComponentToAdminPanel"), false, BXCategory.AdditionalSettings ) ); ParamsDefinition.Add( "ShowActiveElements", new BXParamYesNo( GetMessageRaw("ShowActiveElements"), true, BXCategory.AdditionalSettings ) ); ParamsDefinition.Add( "IncludeSubsections", new BXParamYesNo( GetMessageRaw("IncludeSubsections"), true, BXCategory.AdditionalSettings ) ); //UsePermissions ParamsDefinition.Add( "UsePermissions", new BXParamYesNo( GetMessageRaw("UsePermissions"), false, BXCategory.AdditionalSettings ) ); //GroupPermissions ParamsDefinition.Add( "GroupPermissions", new BXParamMultiSelection( GetMessageRaw("GroupPermissions"), "1", BXCategory.AdditionalSettings ) ); BXCategory commentCategory = new BXCategory(GetMessageRaw("CommentSettings"), "CommentSettings", 260); ParamsDefinition.Add( "AllowComments", new BXParamYesNo( GetMessageRaw("AllowComments"), false, commentCategory, new ParamClientSideActionGroupViewSwitch(clientSideActionGroupViewId, "AllowComments", "CommentsOn", "CommentsOff") ) ); ParamsDefinition.Add( "CommentsPerPage", new BXParamText( GetMessageRaw("CommentsPerPage"), "5", commentCategory, new ParamClientSideActionGroupViewMember(clientSideActionGroupViewId, "CommentsPerPage", new string[] { "CommentsOn" }) ) ); ParamsDefinition.Add( "CommentsForumId", new BXParamText( GetMessageRaw("CommentsForumId"), "0", commentCategory, new ParamClientSideActionGroupViewMember(clientSideActionGroupViewId, "CommentsForumId", new string[] { "CommentsOn" }) ) ); ParamsDefinition.Add( "CommentAuthorProfileUrlTemplate", new BXParamText( GetMessageRaw("CommentAuthorProfileUrlTemplate"), string.Empty, commentCategory, new ParamClientSideActionGroupViewMember(clientSideActionGroupViewId, "CommentAuthorProfileUrlTemplate", new string[] { "CommentsOn" }) ) ); ParamsDefinition.Add( "DisplayEmailForGuestComment", new BXParamYesNo( GetMessageRaw("DisplayEmailForGuestComment"), true, commentCategory, new ParamClientSideActionGroupViewMember(clientSideActionGroupViewId, "DisplayEmailForGuestComment", new string[] { "CommentsOn" }) ) ); ParamsDefinition.Add( "RequireEmailForGuestComment", new BXParamYesNo( GetMessageRaw("RequireEmailForGuestComment"), true, commentCategory, new ParamClientSideActionGroupViewMember(clientSideActionGroupViewId, "RequireEmailForGuestComment", new string[] { "CommentsOn" }) ) ); ParamsDefinition.Add( "DisplayCaptchaForGuestComment", new BXParamYesNo( GetMessageRaw("DisplayCaptchaForGuestComment"), true, commentCategory, new ParamClientSideActionGroupViewMember(clientSideActionGroupViewId, "DisplayCaptchaForGuestComment", new string[] { "CommentsOn" }) ) ); ParamsDefinition.Add( "CommentMaxWordLength", new BXParamText( GetMessageRaw("CommentMaxWordLength"), "15", commentCategory, new ParamClientSideActionGroupViewMember(clientSideActionGroupViewId, "CommentMaxWordLength", new string[] { "CommentsOn" }) ) ); if (!string.IsNullOrEmpty(DesignerSite)) ParamsDefinition.Add(BXParametersDefinition.Menu(DesignerSite)); ParamsDefinition.Add(BXParametersDefinition.Search); ParamsDefinition.Add(BXParametersDefinition.Cache); BXParamsBag<BXParam> paging = BXParametersDefinition.Paging; paging.Remove("PagingRecordsPerPage"); ParamsDefinition.Add(paging); }
protected override void PreLoadComponentDefinition() { Title = GetMessageRaw("Title"); Description = GetMessageRaw("Description"); Icon = "images/eadd.gif"; Group = new BXComponentGroup("iblock.elements", GetMessageRaw("Group"), 100, BXComponentGroup.Content); //BXCategory dataSourceCategory = BXCategory.DataSource; BXCategory mainCategory = BXCategory.Main; BXCategory sefCategory = BXCategory.Sef; BXCategory accessCategory = new BXCategory(GetMessageRaw("Category.Access"), "ACCESS", 110); BXCategory listSettings = BXCategory.ListSettings; listSettings.Sort = 120; BXCategory webFormSettings = new BXCategory(GetMessageRaw("Category.WebFormGeneral"), "WEB_FORM_GENERAL_SETTINGS", 130); BXCategory fieldSettingsCategory = new BXCategory(GetMessageRaw("Category.WebFormFields"), "WEB_FORM_FIELD_SETTINGS", 140); BXCategory customNameCategory = new BXCategory(GetMessageRaw("Category.WebFormCustomNames"), "WEB_FORM_CUSTOM_NAME_SETTINGS", 150); ParamsDefinition.Add(BXParametersDefinition.Paging); BXParamsBag<BXParam> sefParBag = BXParametersDefinition.Sef; sefParBag["EnableSEF"].ClientSideAction = new ParamClientSideActionGroupViewSwitch(ClientID, "EnableSEF", "Sef", "NonSef"); sefParBag["SEFFolder"].ClientSideAction = new ParamClientSideActionGroupViewMember(ClientID, "SEFFolder", new string[] { "Sef" }); ParamsDefinition.Add(sefParBag); #region Main ParamsDefinition.Add( "IBlockTypeId", new BXParamSingleSelection( GetMessageRaw("InfoBlockType"), String.Empty, mainCategory )); ParamsDefinition.Add( "IBlockId", new BXParamSingleSelection( GetMessageRaw("InfoBlockCode"), String.Empty, mainCategory )); #endregion #region Access BXRole admin = BXRoleManager.GetById(1); ParamsDefinition.Add( "MannerOfUserIdentification", new BXParamSingleSelection( GetMessageRaw("MannerOfUserIdentification"), MannerOfUserIdentification.Current.ToString("G"), accessCategory, null, new ParamClientSideActionGroupViewSelector(ClientID, "MannerOfUserIdentification") )); ParamsDefinition.Add( "CustomUserId", new BXParamText( GetMessageRaw("CustomUserId"), "0", accessCategory, new ParamClientSideActionGroupViewMember(ClientID, "CustomUserId", new string[] { MannerOfUserIdentification.Custom.ToString("G") }) )); //просмотр своих записей ParamsDefinition.Add( "RolesAuthorizedToManage", new BXParamMultiSelection( GetMessageRaw("RolesAuthorizedToManage"), admin != null ? admin.RoleName : string.Empty, accessCategory )); ParamsDefinition.Add( "PermitOfCreation", new BXParamYesNo( GetMessageRaw("PermitOfCreation"), false, accessCategory, new ParamClientSideActionGroupViewSwitch(ClientID, "PermitOfCreation", "PermitOfElementCreation", string.Empty) )); ParamsDefinition.Add( "MaxUserElements", new BXParamText( GetMessageRaw("MaxUserElements"), "15", accessCategory, new ParamClientSideActionGroupViewMember(ClientID, "MaxUserElements", new string[] { "PermitOfElementCreation" }) )); ParamsDefinition.Add( "PermitOfModification", new BXParamYesNo( GetMessageRaw("PermitOfModification"), false, accessCategory, new ParamClientSideActionGroupViewSwitch(ClientID, "PermitOfModification", "PermitOfElementModification", string.Empty) )); ParamsDefinition.Add( "MannerOfIssueModificationPermission", new BXParamSingleSelection( GetMessageRaw("MannerOfIssueModificationPermission"), MannerOfIssueModificationPermission.Active.ToString("G"), accessCategory, null, new ParamClientSideActionGroupViewMember(ClientID, "MannerOfIssueModificationPermission", new string[] { "PermitOfElementModification" }) )); ParamsDefinition.Add( "PermitOfDeletion", new BXParamYesNo( GetMessageRaw("PermitOfDeletion"), false, accessCategory )); //просмотр чужих записей ParamsDefinition.Add( "RolesAuthorizedToView", new BXParamMultiSelection( GetMessageRaw("RolesAuthorizedToView"), admin != null ? admin.RoleName : string.Empty, accessCategory )); //управление чужими записями ParamsDefinition.Add( "RolesAuthorizedToAdminister", new BXParamMultiSelection( GetMessageRaw("RolesAuthorizedToAdminister"), admin != null ? admin.RoleName : string.Empty, accessCategory )); ParamsDefinition.Add( "RolesAuthorizedToManageOfActivation", new BXParamMultiSelection( GetMessageRaw("RolesAuthorizedToManageOfActivation"), admin != null ? admin.RoleName : string.Empty, accessCategory )); ParamsDefinition.Add( "ElementActiveAfterSave", new BXParamSingleSelection( GetMessageRaw("ElementActiveAfterSave"), MannerOfIssueModificationPermission.Active.ToString("G"), accessCategory )); ParamsDefinition.Add( "MannerOfUserAssociation", new BXParamSingleSelection( GetMessageRaw("MannerOfUserAssociation"), MannerOfUserAssociation.CreatedBy.ToString("G"), accessCategory, null, new ParamClientSideActionGroupViewSelector(ClientID, "MannerOfUserAssociation") )); ParamsDefinition.Add( "UserAssociatedByCustomIBlockProperty", new BXParamSingleSelection( GetMessageRaw("UserAssociatedByCustomIBlockProperty"), string.Empty, accessCategory, null, new ParamClientSideActionGroupViewMember(ClientID, "UserAssociatedByCustomIBlockProperty", new string[] { MannerOfUserAssociation.IBlockProperty.ToString("G") }) )); #endregion #region List ParamsDefinition.Add( "SortBy", new BXParamSingleSelection( GetMessageRaw("SortBy"), "Id", listSettings )); ParamsDefinition.Add( "SortOrder", new BXParamSort( GetMessageRaw("SortOrder"), true, listSettings )); #endregion #region WebForm ParamsDefinition.Add( "EditFields", new BXParamDoubleList( GetMessageRaw("EditFields"), "Name", webFormSettings )); ParamsDefinition.Add( "RequiredFields", new BXParamMultiSelection( GetMessageRaw("RequiredFields"), string.Empty, webFormSettings )); ParamsDefinition.Add( "TextBoxSize", new BXParamText( GetMessageRaw("TextBoxSize"), "30", webFormSettings )); ParamsDefinition.Add( "CreateButtonTitle", new BXParamText( GetMessageRaw("CreateButtonTitle"), GetMessageRaw("TitleAddElement"), webFormSettings )); ParamsDefinition.Add( "UpdateButtonTitle", new BXParamText( GetMessageRaw("UpdateButtonTitle"), GetMessageRaw("TitleSaveElement"), webFormSettings )); //ParamsDefinition.Add( // "SuccessMessageAfterCreateElement", // new BXParamText( // GetMessageRaw("SuccessMessageAfterCreateElement"), // GetMessageRaw("MessageElementHasBeenCreatedSuccessfully"), // webFormSettings // )); //ParamsDefinition.Add( // "SuccessMessageAfterUpdateElement", // new BXParamText( // GetMessageRaw("SuccessMessageAfterUpdateElement"), // GetMessageRaw("MessageElementHasBeenUpdatedSuccessfully"), // webFormSettings // )); //ParamsDefinition.Add( // "RedirectPageUrl", // new BXParamText( // GetMessageRaw("RedirectPageUrl"), // string.Empty, // webFormSettings // )); #endregion #region Field ParamsDefinition.Add( "MaxSectionSelect", new BXParamText( GetMessageRaw("MaxSectionSelect"), "3", fieldSettingsCategory )); ParamsDefinition.Add( "OnlyLeafSelect", new BXParamYesNo( GetMessageRaw("OnlyLeafSelect"), false, fieldSettingsCategory )); ParamsDefinition.Add( "MaxFileSizeUpload", new BXParamText( GetMessageRaw("MaxFileSizeUpload"), "1024", fieldSettingsCategory )); ParamsDefinition.Add( "ActiveFromDateShowTime", new BXParamYesNo( GetMessageRaw("ActiveFromDateShowTime"), false, fieldSettingsCategory )); ParamsDefinition.Add( "ActiveToDateShowTime", new BXParamYesNo( GetMessageRaw("ActiveToDateShowTime"), false, fieldSettingsCategory )); ParamsDefinition.Add( "NameFieldMacros", new BXParamText( GetMessageRaw("NameFieldMacros"), "#DetailText#-#DateCreate#-#CreatedBy#", fieldSettingsCategory )); #endregion #region CustomName ParamsDefinition.Add( "ActiveCustomTitle", new BXParamText( GetMessageRaw("ActiveCustomTitle"), String.Empty, customNameCategory ) ); ParamsDefinition.Add( "NameCustomTitle", new BXParamText( GetMessageRaw("NameCustomTitle"), String.Empty, customNameCategory )); ParamsDefinition.Add( "ActiveFromDateCustomTitle", new BXParamText( GetMessageRaw("ActiveFromDateCustomTitle"), String.Empty, customNameCategory )); ParamsDefinition.Add( "ActiveToDateCustomTitle", new BXParamText( GetMessageRaw("ActiveToDateCustomTitle"), String.Empty, customNameCategory )); ParamsDefinition.Add( "SectionsCustomTitle", new BXParamText( GetMessageRaw("SectionsCustomTitle"), String.Empty, customNameCategory )); ParamsDefinition.Add( "PreviewTextCustomTitle", new BXParamText( GetMessageRaw("PreviewTextCustomTitle"), String.Empty, customNameCategory )); ParamsDefinition.Add( "PreviewImageCustomTitle", new BXParamText( GetMessageRaw("PreviewPictureCustomTitle"), String.Empty, customNameCategory )); ParamsDefinition.Add( "DetailTextCustomTitle", new BXParamText( GetMessageRaw("DetailTextCustomTitle"), String.Empty, customNameCategory )); ParamsDefinition.Add( "DetailImageCustomTitle", new BXParamText( GetMessageRaw("DetailPictureCustomTitle"), String.Empty, customNameCategory )); ParamsDefinition.Add( "CaptchaCustomTitle", new BXParamText( GetMessageRaw("CaptchaCustomTitle"), String.Empty, customNameCategory )); #endregion #region Sef ParamsDefinition.Add( "RequestParamNameCreateElement", new BXParamText( GetMessageRaw("RequestParamNameCreateElement"), "new", BXCategory.Sef, new ParamClientSideActionGroupViewMember(ClientID, "RequestParamNameCreateElement", new string[] { "NonSef" }) )); ParamsDefinition.Add( "RequestParamNameModifyElement", new BXParamText( GetMessageRaw("RequestParamNameModifyElement"), "id", BXCategory.Sef, new ParamClientSideActionGroupViewMember(ClientID, "RequestParamNameModifyElement", new string[] { "NonSef" }) )); ParamsDefinition.Add( "RequestParamNamePageIndex", new BXParamText( GetMessageRaw("RequestParamNamePageIndex"), "page", BXCategory.Sef, new ParamClientSideActionGroupViewMember(ClientID, "RequestParamNamePageIndex", new string[] { "NonSef" }) )); ParamsDefinition.Add( "RequestParamNameShowAll", new BXParamText( GetMessageRaw("RequestParamNameShowAll"), "all", BXCategory.Sef, new ParamClientSideActionGroupViewMember(ClientID, "RequestParamNameShowAll", new string[] { "NonSef" }) )); ParamsDefinition.Add( "SefTemplateCreateElement", new BXParamText( GetMessageRaw("SefPathCreateElement"), "/new/", BXCategory.Sef, new ParamClientSideActionGroupViewMember(ClientID, "SefTemplateCreateElement", new string[] { "Sef" }) )); ParamsDefinition.Add( "SefTemplateModifyElement", new BXParamText( GetMessageRaw("SefPathModifyElement"), "/edit-#ElementId#/", BXCategory.Sef, new ParamClientSideActionGroupViewMember(ClientID, "SefTemplateModifyElement", new string[] { "Sef" }) )); ParamsDefinition.Add( "SefTemplatePageIndex", new BXParamText( GetMessageRaw("SefPathPageIndex"), "/page-#PageId#", BXCategory.Sef, new ParamClientSideActionGroupViewMember(ClientID, "SefTemplatePageIndex", new string[] { "Sef" }) )); ParamsDefinition.Add( "SefTemplateShowAll", new BXParamText( GetMessageRaw("SefPathShowAll"), "/all", BXCategory.Sef, new ParamClientSideActionGroupViewMember(ClientID, "SefTemplateShowAll", new string[] { "Sef" }) )); #endregion }
protected override void PreLoadComponentDefinition() { Title = GetMessage("SystemAuth.Title"); Description = GetMessage("SystemAuth.Description"); Icon = "images/system_auth.gif"; Group = new BXComponentGroup("Auth", GetMessage("Group"), 100, BXComponentGroup.Utility); BXCategory main = BXCategory.Main; ParamsDefinition["ProfilePath"] = new BXParamText(GetMessageRaw("UserProfilePath"), "", main); ParamsDefinition["RegistrationAllow"] = new BXParamYesNo(GetMessageRaw("RegistrationAllow"), true, main); ParamsDefinition.Add( "AddToRoles", new BXParamMultiSelection( GetMessageRaw("AddToRoles"), "", BXCategory.Main ) ); ParamsDefinition["RegistrationDoAuthentication"] = new BXParamYesNo(GetMessageRaw("RegistrationDoAuthentication"), false, main); ParamsDefinition["RegistrationRedirectUrl"] = new BXParamText(GetMessageRaw("RegistrationRedirectUrl"), "", main); ParamsDefinition.Add( "TryRegisterNewExternalUser", new BXParamYesNo( GetMessageRaw("TryRegisterNewExternalUser"), true, BXCategory.Main ) ); ParamsDefinition.Add( "EditFields", new BXParamDoubleList( GetMessageRaw("EditFields"), "Name", BXCategory.Main ) ); ParamsDefinition.Add( "UseCaptcha", new BXParamYesNo( GetMessageRaw("UseCaptcha"), false, BXCategory.Main ) ); BXCategory fields = new BXCategory(GetMessageRaw("FieldSettings"), "fields", 200); ParamsDefinition["FirstNameFieldMode"] = new BXParamSingleSelection(GetMessageRaw("FirstNameFieldMode"), "require", fields); ParamsDefinition["LastNameFieldMode"] = new BXParamSingleSelection(GetMessageRaw("LastNameFieldMode"), "require", fields); ParamsDefinition["DisplayNameFieldMode"] = new BXParamSingleSelection(GetMessageRaw("DisplayNameFieldMode"), "hide", fields); // Query string variable names BXCategory sef = BXCategory.Sef; ParamsDefinition.Add(BXParametersDefinition.Sef); ParamsDefinition["ActionVariable"] = new BXParamText(GetMessageRaw("ActionVariable"), "auth_page", sef); ParamsDefinition["RegisterTemplate"] = new BXParamText(GetMessageRaw("RegisterTemplate"), "/register/", sef); ParamsDefinition["PasswordRecoveryTemplate"] = new BXParamText(GetMessageRaw("PasswordRecoveryTemplate"), "/recovery/", sef); ParamsDefinition["PasswordResetTemplate"] = new BXParamText(GetMessageRaw("PasswordResetTemplate"), "/reset/", sef); ParamsDefinition["ConfirmationTemplate"] = new BXParamText(GetMessageRaw("ConfirmationTemplate"), "/confirmation/", sef); }
protected override void PreLoadComponentDefinition() { Title = "Список платежей"; Description = "Компонент выводит список платежей текущего пользователя со всеми данными"; Icon = "images/icon.gif"; Group = new BXComponentGroup("volotour-pays", "Платежи", 100, new BXComponentGroup("volotour", "ВОЛО ТУР", 1000, null)); ParamsDefinition["OrdersIBlockId"] = new BXParamSingleSelection("Инфоблок заявок", "0", BXCategory.Main); ParamsDefinition["PaysIBlockId"] = new BXParamSingleSelection("Инфоблок платежей", "0", BXCategory.Main); ParamsDefinition["Count"] = new BXParamText("Количество выводимых элементов в списках", "10", BXCategory.Main); }
protected override void PreLoadComponentDefinition() { Title = GetMessageRaw("Title"); Description = GetMessageRaw("Description"); Group = new BXComponentGroup("catalogue", GetMessage("Group"), 10, BXComponentGroup.Content); Icon = "images/catalog.gif"; BXCategory mainCategory = BXCategory.Main, listSettings = BXCategory.ListSettings, detailSettings = BXCategory.DetailSettings, additionalSettings = BXCategory.AdditionalSettings, treeSettings = new BXCategory(GetMessageRaw("SectionTreeCategory"), "treeSettings", 850), topSettings = new BXCategory(GetMessageRaw("TopSectionSortBy.Category"), "topSettings", 900), sef = BXCategory.Sef, commentCategory = new BXCategory(GetMessageRaw("CommentSettings"), "CommentSettings", 260), votingCategory = new BXCategory(GetMessage("Category.Voting"), "Voting", 220), comparisonCategory = new BXCategory(GetMessageRaw("Category.Comparison"), "Comparison", 230), stockCatalogCategory = new BXCategory(GetMessageRaw("Category.StockCatalog"), "StockCatalog", 240); ParamsDefinition.Add( "IBlockTypeId", new BXParamSingleSelection( GetMessageRaw("InfoBlockType"), String.Empty, mainCategory ) ); ParamsDefinition.Add( "IBlockId", new BXParamSingleSelection( GetMessageRaw("InfoBlockCode"), String.Empty, mainCategory ) ); ParamsDefinition.Add( "ListSortBy", new BXParamSingleSelection( GetMessageRaw("SortBy"), "Id", listSettings ) ); ParamsDefinition.Add( "ListSortOrder", new BXParamSort( GetMessageRaw("SortOrder"), true, listSettings ) ); ParamsDefinition.Add( "ShowSubElements", new BXParamYesNo( GetMessageRaw("DisplaySubsectionElements"), true, listSettings )); ParamsDefinition.Add( "ShowAllElementsOnIndex", new BXParamYesNo( GetMessageRaw("ShowAllElementsOnIndex"), true, listSettings )); ParamsDefinition.Add("ActiveFilter", new BXParamSingleSelection(GetMessageRaw("ActiveFilter"), "Active", listSettings)); ParamsDefinition.Add("ActiveDateFilter", new BXParamSingleSelection(GetMessageRaw("ActiveDateFilter"), "All", listSettings)); ParamsDefinition.Add("ListFilterByCustomProperty", //FilterByElementCustomProperty new BXParamYesNo( GetMessageRaw("ListFilterByCustomProperty"), false, listSettings, new ParamClientSideActionGroupViewSwitch(ClientID, "ListFilterByCustomProperty", "ListFilterByCustomProperty", string.Empty) )); ParamsDefinition.Add("ListCustomPropertyFilterSettings", //ElementCustomPropertyFilterSettings new BXParamCustomFieldFilter( GetMessageRaw("ListCustomPropertyFilterSettings"), string.Empty, listSettings, string.Empty,//BXIBlockModuleConfiguration, new ParamClientSideActionGroupViewMember(ClientID, "ListCustomPropertyFilterSettings", new string[] { "ListFilterByCustomProperty" }) )); ParamsDefinition.Add( "ListProperties", new BXParamMultiSelection( GetMessageRaw("ListProperties"), "-", listSettings )); ParamsDefinition.Add( "DetailProperties", new BXParamMultiSelection( GetMessageRaw("DetailProperties"), "-", detailSettings ) ); ParamsDefinition.Add( "PropertyKeywords", new BXParamSingleSelection( GetMessageRaw("SetPageKeywordsFromProperty"), "-", detailSettings ) ); ParamsDefinition.Add( "PropertyDescription", new BXParamSingleSelection( GetMessageRaw("SetPageDescriptionFromProperty"), "-", detailSettings ) ); ParamsDefinition.Add( "DepthLevel", new BXParamText( GetMessageRaw("SubsectionsDisplayDepth"), "2", treeSettings ) ); ParamsDefinition.Add( "ShowCounters", new BXParamYesNo( GetMessageRaw("DisplayQuantityOfElementsInSection"), false, treeSettings ) ); ParamsDefinition.Add( "IncludeParentSections", new BXParamYesNo( GetMessageRaw("IncludeParentSections"), true, treeSettings ) ); ParamsDefinition.Add( "AddAdminPanelButtons", new BXParamYesNo( GetMessageRaw("AddButtonsForThisComponentToAdminPanel"), false, additionalSettings ) ); ParamsDefinition.Add( "SetPageTitle", new BXParamYesNo( GetMessageRaw("SetPageTitle"), true, additionalSettings ) ); ParamsDefinition.Add( "RootSectionTitle", new BXParamText( GetMessageRaw("RootSectionTitle"), "", additionalSettings ) ); string clientSideActionGroupViewId = ClientID; ParamsDefinition.Add( "ShowTopElements", new BXParamYesNo( GetMessageRaw("DisplayTopOfElements"), false, topSettings, new ParamClientSideActionGroupViewSwitch(clientSideActionGroupViewId, "ShowTopElements", "Top", "NonTop") ) ); ParamsDefinition.Add( "TopElementCount", new BXParamText( GetMessageRaw("ElementsPerPage"), "6", topSettings, new ParamClientSideActionGroupViewMember(clientSideActionGroupViewId, "TopElementCount", new string[] { "Top" }) ) ); ParamsDefinition.Add( "TopSortBy", new BXParamSingleSelection( GetMessageRaw("SortBy"), "Id", topSettings, null, new ParamClientSideActionGroupViewMember(clientSideActionGroupViewId, "TopSortBy", new string[] { "Top" }) ) ); ParamsDefinition.Add( "TopSortOrder", new BXParamSort( GetMessageRaw("SortOrder"), true, topSettings, new ParamClientSideActionGroupViewMember(clientSideActionGroupViewId, "TopSortOrder", new string[] { "Top" }) ) ); ParamsDefinition.Add( "TopProperties", new BXParamMultiSelection( GetMessageRaw("Properties"), "-", topSettings, null, new ParamClientSideActionGroupViewMember(clientSideActionGroupViewId, "TopProperties", new string[] { "Top" }) ) ); BXParamsBag<BXParam> SefParams = BXParametersDefinition.Sef; SefParams["EnableSEF"].ClientSideAction = new ParamClientSideActionGroupViewSwitch(clientSideActionGroupViewId, "EnableSEF", "Sef", "NonSef"); SefParams["SEFFolder"].ClientSideAction = new ParamClientSideActionGroupViewMember(clientSideActionGroupViewId, "SEFFolder", new string[] { "Sef" }); ParamsDefinition.Add(SefParams); ParamsDefinition.Add( "SectionIdVariable", new BXParamText( GetMessageRaw("SectionID"), "section_id", sef, new ParamClientSideActionGroupViewMember(clientSideActionGroupViewId, "SectionIdVariable", new string[] { "NonSef" }) ) ); ParamsDefinition.Add( "ElementIdVariable", new BXParamText( GetMessageRaw("ElementID"), "element_id", sef, new ParamClientSideActionGroupViewMember(clientSideActionGroupViewId, "ElementIdVariable", new string[] { "NonSef" }) ) ); ParamsDefinition.Add( "PageIdVariable", new BXParamText( GetMessageRaw("PageIdVariable"), "page", sef, new ParamClientSideActionGroupViewMember(clientSideActionGroupViewId, "PageIdVariable", new string[] { "NonSef" }) ) ); ParamsDefinition.Add( "ShowAllVariable", new BXParamText( GetMessageRaw("ShowAllVariable"), "showall", sef, new ParamClientSideActionGroupViewMember(clientSideActionGroupViewId, "ShowAllVariable", new string[] { "NonSef" }) ) ); ParamsDefinition.Add( "CommentVariable", new BXParamText( GetMessageRaw("CommentVariable"), "comment", sef, new ParamClientSideActionGroupViewMember(clientSideActionGroupViewId, "CommentVariable", new string[] { "NonSef" }) ) ); ParamsDefinition.Add( "CommentOperationVariable", new BXParamText( GetMessageRaw("CommentOperationVariable"), "act", sef, new ParamClientSideActionGroupViewMember(clientSideActionGroupViewId, "CommentOperationVariable", new string[] { "NonSef" }) ) ); ParamsDefinition.Add( "CommentPageVariable", new BXParamText( GetMessageRaw("CommentPageVariable"), "page", sef, new ParamClientSideActionGroupViewMember(clientSideActionGroupViewId, "CommentPageVariable", new string[] { "NonSef" }) ) ); ParamsDefinition.Add( "ElementDetailTemplate", new BXParamText( GetMessageRaw("ElementDetailTemplate"), "/#SectionId#/item-#ElementId#/", sef, new ParamClientSideActionGroupViewMember(clientSideActionGroupViewId, "ElementDetailTemplate", new string[] { "Sef" }) ) ); ParamsDefinition.Add( "ElementListTemplate", new BXParamText( GetMessageRaw("ElementListTemplate"), "/#SectionId#/", sef, new ParamClientSideActionGroupViewMember(clientSideActionGroupViewId, "ElementListTemplate", new string[] { "Sef" }) ) ); ParamsDefinition.Add( "CommonListPageTemplate", new BXParamText( GetMessageRaw("CommonListPageTemplate"), "/page-#pageId#", sef, new ParamClientSideActionGroupViewMember(clientSideActionGroupViewId, "CommonListPageTemplate", new string[] { "Sef" }) ) ); ParamsDefinition.Add( "CommonListShowAllTemplate", new BXParamText( GetMessageRaw("CommonListShowAllTemplate"), "/all", sef, new ParamClientSideActionGroupViewMember(clientSideActionGroupViewId, "CommonListShowAllTemplate", new string[] { "Sef" }) ) ); ParamsDefinition.Add( "SectionListPageTemplate", new BXParamText( GetMessageRaw("SectionListPageTemplate"), "/#SectionId#/page-#pageId#", sef, new ParamClientSideActionGroupViewMember(clientSideActionGroupViewId, "SectionListPageTemplate", new string[] { "Sef" }) ) ); ParamsDefinition.Add( "SectionListShowAllTemplate", new BXParamText( GetMessageRaw("SectionListShowAllTemplate"), "/#SectionId#/all", sef, new ParamClientSideActionGroupViewMember(clientSideActionGroupViewId, "SectionListShowAllTemplate", new string[] { "Sef" }) ) ); ParamsDefinition.Add( "ElementDetailCommentReadTemplate", new BXParamText( GetMessageRaw("ElementDetailCommentReadTemplate"), "/#SectionId#/item-#ElementId#/comment-#CommentId#/", sef, new ParamClientSideActionGroupViewMember(clientSideActionGroupViewId, "ElementDetailCommentReadTemplate", new string[] { "Sef" }) ) ); ParamsDefinition.Add( "ElementDetailCommentOperationTemplate", new BXParamText( GetMessageRaw("ElementDetailCommentOperationTemplate"), "/#SectionId#/item-#ElementId#/comment-#CommentId#/act-#Operation#/", sef, new ParamClientSideActionGroupViewMember(clientSideActionGroupViewId, "ElementDetailCommentOperationTemplate", new string[] { "Sef" }) ) ); ParamsDefinition.Add( "ElementDetailCommentPageTemplate", new BXParamText( GetMessageRaw("ElementDetailCommentPageTemplate"), "/#SectionId#/item-#ElementId#/page-#PageID#/", sef, new ParamClientSideActionGroupViewMember(clientSideActionGroupViewId, "ElementDetailCommentPageTemplate", new string[] { "Sef" }) ) ); ParamsDefinition.Add( "ComparisonResultTemplate", new BXParamText( GetMessageRaw("Param.ComparisonResultTemplate"), "/compare", sef, new ParamClientSideActionGroupViewMember(clientSideActionGroupViewId, "ComparisonResultTemplate", new string[] { "ComparisonOn", "Sef" }) ) ); ParamsDefinition.Add( "AllowComments", new BXParamYesNo( GetMessageRaw("AllowComments"), false, commentCategory, new ParamClientSideActionGroupViewSwitch(clientSideActionGroupViewId, "AllowComments", "CommentsOn", "CommentsOff") ) ); ParamsDefinition.Add( "CommentsPerPage", new BXParamText( GetMessageRaw("CommentsPerPage"), "5", commentCategory, new ParamClientSideActionGroupViewMember(clientSideActionGroupViewId, "CommentsPerPage", new string[] { "CommentsOn" }) ) ); ParamsDefinition.Add( "CommentsForumId", new BXParamSingleSelection( GetMessageRaw("CommentsForumId"), "0", commentCategory, null, new ParamClientSideActionGroupViewMember(clientSideActionGroupViewId, "CommentsForumId", new string[] { "CommentsOn" }) ) ); ParamsDefinition.Add( "CommentAuthorProfileUrlTemplate", new BXParamText( GetMessageRaw("CommentAuthorProfileUrlTemplate"), string.Empty, commentCategory, new ParamClientSideActionGroupViewMember(clientSideActionGroupViewId, "CommentAuthorProfileUrlTemplate", new string[] { "CommentsOn" }) ) ); ParamsDefinition.Add( "DisplayEmailForGuestComment", new BXParamYesNo( GetMessageRaw("DisplayEmailForGuestComment"), true, commentCategory, new ParamClientSideActionGroupViewMember(clientSideActionGroupViewId, "DisplayEmailForGuestComment", new string[] { "CommentsOn" }) ) ); ParamsDefinition.Add( "RequireEmailForGuestComment", new BXParamYesNo( GetMessageRaw("RequireEmailForGuestComment"), true, commentCategory, new ParamClientSideActionGroupViewMember(clientSideActionGroupViewId, "RequireEmailForGuestComment", new string[] { "CommentsOn" }) ) ); ParamsDefinition.Add( "DisplayCaptchaForGuestComment", new BXParamYesNo( GetMessageRaw("DisplayCaptchaForGuestComment"), true, commentCategory, new ParamClientSideActionGroupViewMember(clientSideActionGroupViewId, "DisplayCaptchaForGuestComment", new string[] { "CommentsOn" }) ) ); ParamsDefinition.Add( "CommentMaxWordLength", new BXParamText( GetMessageRaw("CommentMaxWordLength"), "15", commentCategory, new ParamClientSideActionGroupViewMember(clientSideActionGroupViewId, "CommentMaxWordLength", new string[] { "CommentsOn" }) ) ); ParamsDefinition.Add( "EnableVotingForElement", new BXParamYesNo( GetMessageRaw("EnableVotingForElement"), false, votingCategory) ); ParamsDefinition.Add( "RolesAuthorizedToVote", new BXParamMultiSelection( GetMessageRaw("RolesAuthorizedToVote"), "User", votingCategory ) ); #region StockCatalog ParamsDefinition.Add( "DisplayStockCatalogData", new BXParamYesNo( GetMessageRaw("Param.DisplayStockCatalogData"), false, stockCatalogCategory, new ParamClientSideActionGroupViewSwitch(ClientID, "DisplayStockCatalogData", "StockCatalog", string.Empty) )); ParamsDefinition.Add( "DisplayAllPriceTiers", new BXParamYesNo( GetMessageRaw("Param.DisplayAllPriceTiers"), false, stockCatalogCategory, new ParamClientSideActionGroupViewMember(ClientID, "DisplayAllPriceTiers", new string[] { "StockCatalog" }) )); ParamsDefinition.Add( "PriceTypes", new BXParamMultiSelection( GetMessageRaw("Param.PriceTypes"), string.Empty, stockCatalogCategory, null, new ParamClientSideActionGroupViewMember(ClientID, "PriceTypes", new string[] { "StockCatalog" }) )); ParamsDefinition.Add( "InitQuantity", new BXParamText( GetMessageRaw("Param.InitQuantity"), "1", stockCatalogCategory, new ParamClientSideActionGroupViewMember(ClientID, "InitQuantity", new string[] { "StockCatalog" }) )); ParamsDefinition.Add( "AcceptQuantity", new BXParamYesNo( GetMessageRaw("Param.AcceptQuantity"), false, stockCatalogCategory, new ParamClientSideActionGroupViewMember(ClientID, "AcceptQuantity", new string[] { "StockCatalog" }) )); ParamsDefinition.Add( "IncludeVATInPrice", new BXParamYesNo( GetMessageRaw("Param.IncludeVATInPrice"), true, stockCatalogCategory, new ParamClientSideActionGroupViewMember(ClientID, "IncludeVATInPrice", new string[] { "StockCatalog" }) )); ParamsDefinition.Add( "DisplayVAT", new BXParamYesNo( GetMessageRaw("Param.DisplayVAT"), false, stockCatalogCategory, new ParamClientSideActionGroupViewMember(ClientID, "DisplayVAT", new string[] { "StockCatalog" }) )); ParamsDefinition.Add( "ShowCatalogItemProperties", new BXParamMultiSelection( GetMessageRaw("Param.ShowCatalogItemProperties"), string.Empty, stockCatalogCategory, null, new ParamClientSideActionGroupViewMember(ClientID, "ShowCatalogItemProperties", new string[] { "StockCatalog" }) )); ParamsDefinition.Add( "UserCartUrlTemplate", new BXParamText( GetMessageRaw("Param.UserCartUrlTemplate"), "personal/cart.aspx", stockCatalogCategory, new ParamClientSideActionGroupViewMember(ClientID, "UserCartUrlTemplate", new string[] { "StockCatalog" }) )); ParamsDefinition.Add( "ActionParamName", new BXParamText( GetMessageRaw("Param.ActionParamName"), "ctlg_act", stockCatalogCategory, new ParamClientSideActionGroupViewMember(ClientID, "ActionParamName", new string[] { "StockCatalog" }) )); ParamsDefinition.Add( "CatalogItemIdParamName", new BXParamText( GetMessageRaw("Param.CatalogItemIdParamName"), "ctlg_itm_id", stockCatalogCategory, new ParamClientSideActionGroupViewMember(ClientID, "CatalogItemIdParamName", new string[] { "StockCatalog" }) )); ParamsDefinition.Add( "CatalogItemQuantityParamName", new BXParamText( GetMessageRaw("Param.CatalogItemQuantityParamName"), "ctlg_itm_qty", stockCatalogCategory, new ParamClientSideActionGroupViewMember(ClientID, "CatalogItemQuantityParamName", new string[] { "StockCatalog" }) )); #endregion #region Comarison ParamsDefinition.Add( "AllowComparison", new BXParamYesNo( GetMessageRaw("Param.AllowComparison"), false, comparisonCategory, new ParamClientSideActionGroupViewSwitch(clientSideActionGroupViewId, "AllowComparison", "ComparisonOn", string.Empty))); ParamsDefinition.Add( "ComparisonSelectedFields", new BXParamMultiSelection( GetMessageRaw("Param.ComparisonSelectedFields"), string.Empty, comparisonCategory, null, new ParamClientSideActionGroupViewMember(clientSideActionGroupViewId, "ComparisonSelectedFields", new string[] { "ComparisonOn" }))); #endregion ParamsDefinition.Add(BXParametersDefinition.Paging); ParamsDefinition.Add(BXParametersDefinition.Cache); ParamsDefinition.Add(BXParametersDefinition.Search); ParamsDefinition.Add(BXParametersDefinition.Ajax); if (!String.IsNullOrEmpty(DesignerSite)) ParamsDefinition.Add(BXParametersDefinition.Menu(DesignerSite)); }
protected override void PreLoadComponentDefinition() { base.Title = GetMessage("RssShow.Title"); base.Description = GetMessage("RssShow.Description"); base.Icon = "images/rss_in.gif"; Group = new BXComponentGroup("rss", "RSS", 150, BXComponentGroup.Content); ParamsDefinition.Add(BXParametersDefinition.Cache); ParamsDefinition.Add( "RssURL", new BXParamText( GetMessageRaw("RssUrl"), "http://www.1c-bitrix.ru/rss.php", BXCategory.Main ) ); ParamsDefinition["RssURL"].RefreshOnDirty = true; ParamsDefinition.Add( "ElementsCount", new BXParamText( GetMessageRaw("DisplayedElementsCount"), "20", BXCategory.Main ) ); ParamsDefinition["ElementsCount"].RefreshOnDirty = true; }