├── LearningKit
├── App_Data
│ └── CMSModules
│ │ └── WebFarm
│ │ └── webfarm.sync
├── Kentico
│ ├── Scripts
│ │ ├── builders
│ │ │ ├── components
│ │ │ │ ├── index.esm.js
│ │ │ │ ├── index.system.js
│ │ │ │ ├── app-globals-8931cc91.js
│ │ │ │ └── app-globals-d5563cb5.system.js
│ │ │ ├── Core-icons.eot
│ │ │ ├── Core-icons.ttf
│ │ │ ├── Core-icons.woff
│ │ │ └── web-components.css
│ │ └── modal-dialog.js
│ └── Content
│ │ ├── Selectors
│ │ ├── Dialogs
│ │ │ ├── Pages
│ │ │ │ └── page-selector.css
│ │ │ ├── Shared
│ │ │ │ └── error-page.css
│ │ │ ├── Attachments
│ │ │ │ └── attachment-selector.css
│ │ │ ├── PageTemplates
│ │ │ │ ├── DefaultTemplateImage.png
│ │ │ │ └── page-template-selector.js
│ │ │ └── MediaFiles
│ │ │ │ ├── media-files-selector.css
│ │ │ │ └── media-files-selector.js
│ │ └── FormComponents
│ │ │ ├── Pages
│ │ │ └── page-selector.admin.js
│ │ │ ├── Path
│ │ │ └── path-selector.admin.js
│ │ │ ├── Attachments
│ │ │ └── attachment-selector.admin.js
│ │ │ └── MediaFiles
│ │ │ └── media-files-selector.admin.js
│ │ └── InlineEditors
│ │ └── DropdownEditor
│ │ ├── DropdownEditor.css
│ │ └── dropdown-editor.js
├── Views
│ ├── _ViewStart.cshtml
│ ├── Shared
│ │ ├── Widgets
│ │ │ ├── _RandomWidget.cshtml
│ │ │ ├── _ExtendedFormWidget.cshtml
│ │ │ ├── _ColorWidget.cshtml
│ │ │ ├── _NumberWidget.cshtml
│ │ │ └── _SelectorsWidget.cshtml
│ │ ├── Sections
│ │ │ ├── _DefaultSection.cshtml
│ │ │ ├── _Col5050.cshtml
│ │ │ └── _CustomSection.cshtml
│ │ ├── FormSections
│ │ │ └── _TwoColumnFormSection.cshtml
│ │ ├── Personalization
│ │ │ └── ConditionTypes
│ │ │ │ └── _HasGivenConsentConfiguration.cshtml
│ │ ├── FormComponents
│ │ │ ├── _CustomDropDownComponent.cshtml
│ │ │ ├── _CustomPropertyComponent.cshtml
│ │ │ ├── _ColorFormComponent.cshtml
│ │ │ ├── _CustomFormComponent.cshtml
│ │ │ └── _RgbInputComponent.cshtml
│ │ ├── InlineEditors
│ │ │ ├── _NumberEditor.cshtml
│ │ │ └── _ColorEditor.cshtml
│ │ ├── PageTemplates
│ │ │ └── _LandingPageTemplate.cshtml
│ │ ├── _PageTemplateLayout.cshtml
│ │ ├── ModalDialogs
│ │ │ └── ColorModalDialog
│ │ │ │ └── _ColorModalDialog.cshtml
│ │ ├── _Layout.cshtml
│ │ └── PageTypes
│ │ │ └── LearningKit_PageBuilder.cshtml
│ ├── HttpErrors
│ │ └── NotFound.cshtml
│ ├── EmailRegister
│ │ ├── ConfirmUser.cshtml
│ │ ├── CheckYourEmail.cshtml
│ │ ├── EmailConfirmationFailed.cshtml
│ │ └── RegisterWithEmailConfirmation.cshtml
│ ├── PasswordReset
│ │ ├── ResetPasswordSucceeded.cshtml
│ │ ├── ResetPasswordInvalid.cshtml
│ │ ├── CheckYourEmail.cshtml
│ │ ├── RequestPasswordReset.cshtml
│ │ └── ResetPassword.cshtml
│ ├── NewsletterSubscription
│ │ ├── UnsubscribeFailure.cshtml
│ │ ├── UnsubscribeSuccess.cshtml
│ │ ├── ConfirmSubscription.cshtml
│ │ ├── SubscribeSuccess.cshtml
│ │ └── Subscribe.cshtml
│ ├── ExternalAuthentication
│ │ ├── ExternalAuthenticationFailure.cshtml
│ │ ├── Lockout.cshtml
│ │ └── SignInCallback.cshtml
│ ├── Roles
│ │ ├── RestrictedPage.cshtml
│ │ └── ManageRoles.cshtml
│ ├── Checkout
│ │ ├── ThankYou.cshtml
│ │ └── PreviewAndPay.cshtml
│ ├── PrivacyPage
│ │ ├── ConsentDetails.cshtml
│ │ └── Index.cshtml
│ ├── MediaLibrary
│ │ └── ShowMediaFiles.cshtml
│ ├── TrackingConsent
│ │ └── Consent.cshtml
│ ├── Personalization
│ │ └── PersonalizedGreeting.cshtml
│ ├── Search
│ │ └── SearchIndex.cshtml
│ ├── Order
│ │ ├── MyOrders.cshtml
│ │ └── OrderDetail.cshtml
│ ├── ProductFilter
│ │ ├── FilterPageProperty.cshtml
│ │ ├── FilterSKUProperty.cshtml
│ │ └── FilterForeignProperty.cshtml
│ ├── PageBuilder
│ │ └── PageBuilder.cshtml
│ ├── ProductListing
│ │ └── Listing.cshtml
│ ├── RegisterWithConsent
│ │ └── RegisterWithConsent.cshtml
│ ├── Register
│ │ └── Register.cshtml
│ ├── web.config
│ ├── Account
│ │ └── SignIn.cshtml
│ └── AzureSearch
│ │ └── AzureSearch.cshtml
├── AppSettings.config.template
├── Global.asax
├── ConnectionStrings.config.template
├── Content
│ ├── Images
│ │ └── default-avatar.png
│ ├── FormComponents
│ │ ├── RgbInputComponent
│ │ │ └── colorInputParser.js
│ │ └── ColorFormComponent
│ │ │ └── colorFormComponent.js
│ └── InlineEditors
│ │ ├── NumberEditor
│ │ └── number-editor.js
│ │ └── ColorEditor
│ │ └── color-editor.js
├── Models
│ ├── Register
│ │ ├── RegisterWithConsentViewModel.cs
│ │ └── RegisterViewModel.cs
│ ├── Account
│ │ ├── EditUserAccountViewModel.cs
│ │ └── SignInViewModel.cs
│ ├── MediaLibrary
│ │ └── MediaFileViewModel.cs
│ ├── ModalDialogs
│ │ └── ColorModalDialogViewModel.cs
│ ├── PageBuilder
│ │ └── PageBuilderModel.cs
│ ├── InlineEditors
│ │ ├── ColorEditor
│ │ │ └── ColorEditorModel.cs
│ │ └── NumberEditor
│ │ │ └── NumberEditorModel.cs
│ ├── Checkout
│ │ ├── OrderPaymentResultViewModel.cs
│ │ ├── DeliveryDetailsViewModel.cs
│ │ ├── PreviewAndPayViewModel.cs
│ │ ├── ResponseViewModel.cs
│ │ ├── ShoppingCartItemViewModel.cs
│ │ ├── PaymentMethodViewModel.cs
│ │ ├── ShippingOptionViewModel.cs
│ │ ├── OrderViewModel.cs
│ │ └── ShoppingCartViewModel.cs
│ ├── ProductFilter
│ │ ├── ProductFilterCheckboxViewModel.cs
│ │ └── ProductFilterViewModel.cs
│ ├── PrivacyPage
│ │ ├── ConsentDetailsModel.cs
│ │ └── ConsentListingModel.cs
│ ├── TrackingConsent
│ │ └── TrackingConsentViewModel.cs
│ ├── Search
│ │ ├── AzureSearch
│ │ │ ├── FacetViewModel.cs
│ │ │ ├── DocumentViewModel.cs
│ │ │ └── AzureSearchViewModel.cs
│ │ └── SmartSearch
│ │ │ └── SearchResultModel.cs
│ ├── FormComponents
│ │ ├── FormComponentProperties
│ │ │ ├── CustomDropDownComponentProperties.cs
│ │ │ ├── ColorFormComponentProperties.cs
│ │ │ ├── CustomFormComponentProperties.cs
│ │ │ ├── RgbInputComponentProperties.cs
│ │ │ └── CharacterSizeProperties.cs
│ │ ├── ColorFormComponent.cs
│ │ ├── CustomPropertyComponent.cs
│ │ ├── CustomFormComponent.cs
│ │ ├── CustomDropDownComponent.cs
│ │ └── RgbInputComponent.cs
│ ├── Personalization
│ │ ├── ConditionTypes
│ │ │ └── HasGivenConsentViewModel.cs
│ │ └── CurrentContactViewModel.cs
│ ├── Widgets
│ │ ├── SelectorsWidget
│ │ │ ├── SelectorsWidgetViewModel.cs
│ │ │ └── SelectorsWidgetProperties.cs
│ │ ├── ColorWidget
│ │ │ └── ColorWidgetProperties.cs
│ │ ├── NumberWidget
│ │ │ └── NumberWidgetProperties.cs
│ │ └── ExtendedFormWidget
│ │ │ └── ExtendedFormWidgetProperties.cs
│ ├── Products
│ │ ├── PriceDetailViewModel.cs
│ │ └── ProductListItemViewModel.cs
│ ├── PasswordReset
│ │ ├── RequestPasswordResetViewModel.cs
│ │ └── ResetPasswordViewModel.cs
│ ├── Sections
│ │ └── CustomSection
│ │ │ └── CustomSectionProperties.cs
│ ├── NewsletterSubscription
│ │ ├── NewsletterConfirmSubscriptionModel.cs
│ │ ├── NewsletterSubscribeViewModel.cs
│ │ └── MarketingEmailUnsubscribeModel.cs
│ └── PageTemplates
│ │ └── LandingPage
│ │ └── LandingPageProperties.cs
├── Controllers
│ ├── HomeController.cs
│ ├── HttpErrorsController.cs
│ ├── Builders
│ │ ├── ModalDialogs
│ │ │ └── ColorModalDialogController.cs
│ │ ├── Sections
│ │ │ └── Col5050Controller.cs
│ │ ├── FormSections
│ │ │ └── TwoColumnFormSectionController.cs
│ │ ├── Widgets
│ │ │ └── RandomWidgetController.cs
│ │ ├── PageBuilderController.cs
│ │ └── Personalization
│ │ │ └── ConditionTypes
│ │ │ └── HasGivenConsentController.cs
│ ├── AdminRedirectController.cs
│ ├── OnlineMarketing
│ │ └── PersonalizationController.cs
│ └── Search
│ │ └── SearchController.cs
├── Properties
│ ├── WebAssemblyInfo.cs
│ └── AssemblyInfo.cs
├── FormBuilder
│ ├── FormComponentFilters
│ │ ├── FormComponentsFilter.cs
│ │ └── IndividualFormComponentFilter.cs
│ ├── VisibilityConditions
│ │ ├── AdministratorPropertyCondition.cs
│ │ ├── NumberSignPropertyCondition.cs
│ │ ├── IsBetweenVisibilityCondition.cs
│ │ ├── CustomVisibilityCondition.cs
│ │ └── IsInPersonaVisibilityCondition.cs
│ ├── FormBuilderHelper.cs
│ └── ValidationRules
│ │ ├── IsHexadecimalNumber.cs
│ │ ├── ValueLiesBetween.cs
│ │ ├── CustomValidationRule.cs
│ │ └── ValueOfDependeeLiesBetween.cs
├── Scripts
│ ├── variantSelector.js
│ ├── countryStateSelector.js
│ └── addressSelector.js
├── App_Start
│ ├── ApplicationConfig.cs
│ ├── RouteConfig.cs
│ ├── DependencyResolverConfig.cs
│ ├── PageBuilderComponentRegister.cs
│ └── Startup.Auth.Basic.cs
├── Areas
│ └── CodeSnippets
│ │ └── Views
│ │ ├── CodeSnippets.cshtml
│ │ └── web.config
├── PageTemplateFilters
│ └── LandingPageTemplateFilter.cs
├── CMSRegistrationSource.cs
└── Personalization
│ └── ConditionTypes
│ ├── HasGivenConsentConditionTypeCustom.cs
│ └── HasGivenConsentConditionType.cs
├── LearningKitCustomizations
├── OutputCache
│ ├── OutputCacheKeyOptionsExtensions.cs
│ └── ContactGenderOutputCacheKey.cs
├── Properties
│ └── AssemblyInfo.cs
├── EventLog
│ └── CsvEventWriter.cs
├── FormBuilder
│ ├── FormBuilderCustomizations.cs
│ ├── FormWidgetMarkupInjection.cs
│ └── FormBuilderStaticMarkupConfiguration.cs
└── Membership
│ └── ExtendedUser.cs
├── LICENSE
├── LearningKit.sln
└── README.md
/LearningKit/App_Data/CMSModules/WebFarm/webfarm.sync:
--------------------------------------------------------------------------------
1 | True
--------------------------------------------------------------------------------
/LearningKit/Kentico/Scripts/builders/components/index.esm.js:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/LearningKit/Views/_ViewStart.cshtml:
--------------------------------------------------------------------------------
1 | @{
2 | Layout = "~/Views/Shared/_Layout.cshtml";
3 | }
--------------------------------------------------------------------------------
/LearningKit/Kentico/Content/Selectors/Dialogs/Pages/page-selector.css:
--------------------------------------------------------------------------------
1 | body {
2 | margin: 0;
3 | }
--------------------------------------------------------------------------------
/LearningKit/AppSettings.config.template:
--------------------------------------------------------------------------------
1 |
A page was not found for the requested URL.
8 |9 | @Html.ActionLink("> Back to the home index", "Index", "Home") 10 |
-------------------------------------------------------------------------------- /LearningKit/Models/ModalDialogs/ColorModalDialogViewModel.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace LearningKit.Models.ModalDialogs 4 | { 5 | public class ColorModalDialogViewModel 6 | { 7 | public IEnumerable9 | Thank you for confirming your user account. You can now @(Html.ActionLink("Sign in", "SignIn", "Account")). 10 |
-------------------------------------------------------------------------------- /LearningKit/Models/PrivacyPage/ConsentDetailsModel.cs: -------------------------------------------------------------------------------- 1 | namespace LearningKit.Models.PrivacyPage 2 | { 3 | public class ConsentDetailsModel 4 | { 5 | public string ConsentShortText { get; set; } 6 | 7 | public string ConsentFullText { get; set; } 8 | 9 | public string ConsentDisplayName { get; set; } 10 | } 11 | } -------------------------------------------------------------------------------- /LearningKit/Models/TrackingConsent/TrackingConsentViewModel.cs: -------------------------------------------------------------------------------- 1 | namespace LearningKit.Models.TrackingConsent 2 | { 3 | //DocSection:ViewModel 4 | public class TrackingConsentViewModel 5 | { 6 | public string ShortText { get; set; } 7 | 8 | public bool IsAgreed { get; set; } 9 | } 10 | //EndDocSection:ViewModel 11 | } -------------------------------------------------------------------------------- /LearningKit/Views/PasswordReset/ResetPasswordSucceeded.cshtml: -------------------------------------------------------------------------------- 1 | 2 | @{ 3 | ViewBag.Title = "Password reset successful"; 4 | Layout = "~/Views/Shared/_Layout.cshtml"; 5 | } 6 | 7 |9 | Your password was successfully changed. You can now @(Html.ActionLink("Sign in", "SignIn", "Account")). 10 |
-------------------------------------------------------------------------------- /LearningKit/Models/Search/AzureSearch/FacetViewModel.cs: -------------------------------------------------------------------------------- 1 | namespace LearningKit.Models.Search.AzureSearch 2 | { 3 | // Encapsulates facet data 4 | public class FacetViewModel 5 | { 6 | public string Name { get; set; } 7 | 8 | public string Value { get; set; } 9 | 10 | public bool Selected { get; set; } 11 | } 12 | } -------------------------------------------------------------------------------- /LearningKit/Models/FormComponents/FormComponentProperties/CustomDropDownComponentProperties.cs: -------------------------------------------------------------------------------- 1 | using Kentico.Forms.Web.Mvc; 2 | 3 | 4 | namespace LearningKit.FormBuilder.FormComponentProperties 5 | { 6 | public class CustomDropDownComponentProperties : SelectorProperties 7 | { 8 | // Implement any required custom properties here 9 | } 10 | } -------------------------------------------------------------------------------- /LearningKit/Models/PrivacyPage/ConsentListingModel.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Linq; 3 | 4 | using CMS.DataProtection; 5 | 6 | namespace LearningKit.Models.PrivacyPage 7 | { 8 | public class ConsentListingModel 9 | { 10 | public IEnumerableThe newsletter unsubscription did not succeed.
9 | 10 |11 | @Html.ActionLink("> Back to the home index", "Index", "Home") 12 |
13 | -------------------------------------------------------------------------------- /LearningKit/Views/Shared/Sections/_Col5050.cshtml: -------------------------------------------------------------------------------- 1 | @using Kentico.PageBuilder.Web.Mvc 2 | @using Kentico.Web.Mvc 3 | 4 |You were successfully unsubscribed from the newsletter.
9 | 10 |11 | @Html.ActionLink("> Back to the home index", "Index", "Home") 12 |
13 | -------------------------------------------------------------------------------- /LearningKit/Properties/WebAssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using CMS; 2 | 3 | // Ensures that the Xperience API can discover and work with custom classes/components registered in the MVC web project 4 | // Placed into a separate class because AssemblyInfo.cs cannot access code from external libraries in cases where 5 | // the web project is precompiled with outputs merged into a single assembly 6 | [assembly: AssemblyDiscoverable] -------------------------------------------------------------------------------- /LearningKit/Views/PasswordReset/ResetPasswordInvalid.cshtml: -------------------------------------------------------------------------------- 1 | 2 | @{ 3 | ViewBag.Title = "Password reset failed"; 4 | Layout = "~/Views/Shared/_Layout.cshtml"; 5 | } 6 | 7 |9 | The link that you followed is invalid and you cannot reset your password. 10 |
11 |12 | @Html.ActionLink("> Back to the home index", "Index", "Home") 13 |
14 | -------------------------------------------------------------------------------- /LearningKit/Views/EmailRegister/CheckYourEmail.cshtml: -------------------------------------------------------------------------------- 1 | 2 | @{ 3 | Layout = "~/Views/Shared/_Layout.cshtml"; 4 | ViewBag.Title = "Check your email"; 5 | } 6 | 7 |9 | You need to confirm your new user account before you can sign in. Please check your email. 10 |
11 |12 | @Html.ActionLink("> Back to the home index", "Index", "Home") 13 |
-------------------------------------------------------------------------------- /LearningKit/Views/ExternalAuthentication/ExternalAuthenticationFailure.cshtml: -------------------------------------------------------------------------------- 1 | 2 | @{ 3 | ViewBag.Title = "Failed external authentication"; 4 | Layout = "~/Views/Shared/_Layout.cshtml"; 5 | } 6 | 7 |9 | Authentication via the external service was not successful. 10 |
11 |12 | @Html.ActionLink("> Back to the home index", "Index", "Home") 13 |
-------------------------------------------------------------------------------- /LearningKit/Controllers/HttpErrorsController.cs: -------------------------------------------------------------------------------- 1 | using System.Web.Mvc; 2 | 3 | namespace LearningKit.Controllers 4 | { 5 | public class HttpErrorsController : Controller 6 | { 7 | //DocSection:NotFound 8 | public ActionResult NotFound() 9 | { 10 | Response.StatusCode = 404; 11 | 12 | return View(); 13 | } 14 | //EndDocSection:NotFound 15 | } 16 | } -------------------------------------------------------------------------------- /LearningKit/Views/EmailRegister/EmailConfirmationFailed.cshtml: -------------------------------------------------------------------------------- 1 | 2 | @{ 3 | Layout = "~/Views/Shared/_Layout.cshtml"; 4 | ViewBag.Title = "Email confirmation failed"; 5 | } 6 | 7 |9 | The link that you followed is invalid and email confirmation of the new user account failed. 10 |
11 |12 | @Html.ActionLink("> Back to the home index", "Index", "Home") 13 |
-------------------------------------------------------------------------------- /LearningKit/Views/Shared/Personalization/ConditionTypes/_HasGivenConsentConfiguration.cshtml: -------------------------------------------------------------------------------- 1 | @model LearningKit.Personalization.ConditionTypes.HasGivenConsentViewModel 2 | 3 | @using (Html.BeginForm("Validate", "HasGivenConsent")) 4 | { 5 | @Html.LabelFor(model => model.ConsentCodeName) 6 |9 | This page is only available for users who are assigned to a role with the 'KenticoRole' code name within the connected Kentico application. 10 |
11 |12 | @Html.ActionLink("> Back to the home index", "Index", "Home") 13 |
-------------------------------------------------------------------------------- /LearningKit/Models/Widgets/SelectorsWidget/SelectorsWidgetViewModel.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace LearningKit.Models.Widgets.SelectorsWidget 4 | { 5 | public class SelectorsWidgetViewModel 6 | { 7 | public string MediaFileUrl { get; set; } 8 | 9 | public string DocumentPath { get; set; } 10 | 11 | public Guid? DocumentGuid { get; set; } 12 | 13 | public string AttachmentUrl { get; set; } 14 | } 15 | } -------------------------------------------------------------------------------- /LearningKit/Views/Checkout/ThankYou.cshtml: -------------------------------------------------------------------------------- 1 | @*DocSection:ThankYou*@ 2 | @{ 3 | Layout = "~/Views/Shared/_Layout.cshtml"; 4 | ViewBag.Title = "Thank-you page"; 5 | } 6 | 7 |Order number: @ViewBag.OrderID
10 |Your order was succesfully created. Thank you for your patronage!
11 | @*EndDocSection:ThankYou*@ 12 | 13 |14 | @Html.ActionLink("> Back to the home index", "Index", "Home") 15 |
-------------------------------------------------------------------------------- /LearningKit/Views/Shared/Sections/_CustomSection.cshtml: -------------------------------------------------------------------------------- 1 | @using Kentico.PageBuilder.Web.Mvc 2 | @using Kentico.Web.Mvc 3 | 4 | @using LearningKit.Models.Sections.CustomSection 5 | 6 | @model ComponentViewModel9 | Authentication via the external service was successful, but the corresponding Xperience user account is currently disabled. You cannot sign in. 10 |
11 |12 | @Html.ActionLink("> Back to the home index", "Index", "Home") 13 |
14 | -------------------------------------------------------------------------------- /LearningKit/Views/PasswordReset/CheckYourEmail.cshtml: -------------------------------------------------------------------------------- 1 | 2 | @{ 3 | ViewBag.Title = "Password reset email sent"; 4 | Layout = "~/Views/Shared/_Layout.cshtml"; 5 | } 6 | 7 |9 | The system has sent a password reset email to the specified address. Click the link within the email to reset your password. 10 |
11 |12 | @Html.ActionLink("> Back to the home index", "Index", "Home") 13 |
14 | 15 | -------------------------------------------------------------------------------- /LearningKit/Models/Search/AzureSearch/DocumentViewModel.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace LearningKit.Models.Search.AzureSearch 4 | { 5 | // Encapsulates document search results 6 | public class DocumentViewModel 7 | { 8 | public string DocumentTitle { get; set; } 9 | 10 | public string DocumentShortDescription { get; set; } 11 | 12 | public IDictionaryYou have successfully confirmed your newsletter subscription.
13 | } 14 | else 15 | { 16 | @Html.ValidationSummary(true, "") 17 | } 18 | 19 |20 | @Html.ActionLink("> Back to the home index", "Index", "Home") 21 |
-------------------------------------------------------------------------------- /LearningKit/Views/Shared/InlineEditors/_ColorEditor.cshtml: -------------------------------------------------------------------------------- 1 | @using Kentico.PageBuilder.Web.Mvc 2 | @using Kentico.Web.Mvc 3 | 4 | @model LearningKit.Models.InlineEditors.ColorEditor.ColorEditorModel 5 | 6 | @using (Html.Kentico().BeginInlineEditor("color-editor", 7 | Model.PropertyName, 8 | new { data_url = Url.Action("Index", "ColorModalDialog") })) 9 | { 10 |You have subscribed to the newsletter. You need to confirm your subscription via email before it becomes active.
13 | } 14 | else 15 | { 16 |You have successfully subscribed to the newsletter.
17 | } 18 | 19 |20 | @Html.ActionLink("> Back to the home index", "Index", "Home") 21 |
-------------------------------------------------------------------------------- /LearningKit/Models/FormComponents/FormComponentProperties/ColorFormComponentProperties.cs: -------------------------------------------------------------------------------- 1 | using CMS.DataEngine; 2 | using Kentico.Forms.Web.Mvc; 3 | 4 | namespace LearningKit.FormBuilder.FormComponents 5 | { 6 | public class ColorFormComponentProperties : FormComponentProperties9 | Authentication via the external service was successful, but a problem occurred when attempting to create a corresponding user account in Xperience. For example, a conflict with an existing username may have occurred. 10 |
11 |18 | @Html.ActionLink("> Back to the home index", "Index", "Home") 19 |
20 | 21 | -------------------------------------------------------------------------------- /LearningKit/Views/PrivacyPage/ConsentDetails.cshtml: -------------------------------------------------------------------------------- 1 | @model LearningKit.Models.PrivacyPage.ConsentDetailsModel 2 | 3 | @{ 4 | ViewBag.Title = "Consent details"; 5 | Layout = "~/Views/Shared/_Layout.cshtml"; 6 | } 7 | 8 |@Model.ConsentDisplayName
11 | @*DocSection:ConsentTexts*@ 12 |@Html.Raw(Model.ConsentShortText)
14 |@Html.Kentico().ResolveUrls(Model.ConsentFullText)
16 | @*EndDocSection:ConsentTexts*@ 17 | 18 |19 | @Html.ActionLink("> Back to the privacy page", "Index", "PrivacyPage") 20 |
21 |22 | @Html.ActionLink("> Back to the home index", "Index", "Home") 23 |
-------------------------------------------------------------------------------- /LearningKit/Views/MediaLibrary/ShowMediaFiles.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | Layout = "~/Views/Shared/_Layout.cshtml"; 3 | ViewBag.Title = "Media library file listing"; 4 | } 5 | 6 | @using LearningKit.Models.MediaLibrary 7 | 8 | @*DocSection:ShowMediaFiles*@ 9 | @model IEnumerable23 | @Html.ActionLink("> Back to the home index", "Index", "Home") 24 |
25 | -------------------------------------------------------------------------------- /LearningKit/Views/Shared/FormComponents/_CustomPropertyComponent.cshtml: -------------------------------------------------------------------------------- 1 | @*DocSection:PlaceholderTextView*@ 2 | @using Kentico.Forms.Web.Mvc 3 | 4 | @model LearningKit.FormBuilder.FormComponents.CustomPropertyComponent 5 | 6 | @{ 7 | @* Gets a collection of system HTML attributes necessary for the correct functionality of the form component inputs *@ 8 | var htmlAttributes = ViewData.Kentico().GetEditorHtmlAttributes(); 9 | 10 | @* Specifies additional HTML attributes for the form component *@ 11 | htmlAttributes["size"] = Model.Properties.CharacterSize; 12 | } 13 | 14 | @* Renders the input element for the 'Value' property of the form component *@ 15 | @Html.TextBoxFor(m => m.Value, htmlAttributes) 16 | @*EndDocSection:PlaceholderTextView*@ -------------------------------------------------------------------------------- /LearningKit/Kentico/Content/InlineEditors/DropdownEditor/dropdown-editor.js: -------------------------------------------------------------------------------- 1 | (function () { 2 | window.kentico.pageBuilder.registerInlineEditor("kentico-dropdown-editor", { 3 | init: function (options) { 4 | var editor = options.editor; 5 | var dropdown = editor.querySelector(".ktc-selector"); 6 | dropdown.addEventListener("change", function () { 7 | var event = new CustomEvent("updateProperty", { 8 | detail: { 9 | value: dropdown.value, 10 | name: options.propertyName 11 | } 12 | }); 13 | editor.dispatchEvent(event); 14 | }); 15 | } 16 | }); 17 | })(); 18 | -------------------------------------------------------------------------------- /LearningKit/Controllers/Builders/Sections/Col5050Controller.cs: -------------------------------------------------------------------------------- 1 | using System.Web.Mvc; 2 | 3 | using Kentico.PageBuilder.Web.Mvc; 4 | 5 | using LearningKit.Controllers.Sections; 6 | 7 | // Registers the '50/50' page builder section 8 | // This section does not require a custom controller, but uses one for demonstration purposes 9 | [assembly: RegisterSection("LearningKit.Sections.Col5050", typeof(Col5050Controller), "50/50 columns", IconClass = "icon-l-cols-2")] 10 | 11 | namespace LearningKit.Controllers.Sections 12 | { 13 | public class Col5050Controller : SectionController 14 | { 15 | // GET action used to retrieve the section markup 16 | public ActionResult Index() 17 | { 18 | return PartialView("Sections/_Col5050"); 19 | } 20 | } 21 | } -------------------------------------------------------------------------------- /LearningKit/Views/TrackingConsent/Consent.cshtml: -------------------------------------------------------------------------------- 1 | @model LearningKit.Models.TrackingConsent.TrackingConsentViewModel 2 | 3 |5 | @Html.Raw(Model.ShortText) 6 |
7 | @if (Model.IsAgreed) 8 | { 9 | using (Html.BeginForm("Revoke", "TrackingConsent", FormMethod.Post)) 10 | { 11 | @Html.AntiForgeryToken() 12 | 13 | } 14 | } 15 | else 16 | { 17 | using (Html.BeginForm("Accept", "TrackingConsent", FormMethod.Post)) 18 | { 19 | @Html.AntiForgeryToken() 20 | 21 | } 22 | } 23 |24 | @Html.ActionLink("> Back to the home index", "Index", "Home") 25 |
26 |34 | @Html.ActionLink("> Back to the home index", "Index", "Home") 35 |
-------------------------------------------------------------------------------- /LearningKit/Controllers/Builders/Widgets/RandomWidgetController.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Web.Mvc; 3 | 4 | using Kentico.PageBuilder.Web.Mvc; 5 | 6 | using LearningKit.Controllers.Widgets; 7 | 8 | // Assembly attribute to register the widget for the connected Xperience instance. 9 | [assembly: RegisterWidget("LearningKit.Widgets.RandomWidget", typeof(RandomWidgetController), "Random number", IconClass = "icon-modal-question")] 10 | namespace LearningKit.Controllers.Widgets 11 | { 12 | ///34 | @Html.ActionLink("> Back to the home index", "Index", "Home") 35 |
-------------------------------------------------------------------------------- /LearningKit/Content/FormComponents/ColorFormComponent/colorFormComponent.js: -------------------------------------------------------------------------------- 1 | function openColorModalDialog(dialogData) { 2 | // Gets the form component's input element 3 | var inputElement = window.document.querySelector('#' + dialogData.colorInputId); 4 | 5 | // Opens the modal dialog 6 | kentico.modalDialog.open({ 7 | url: dialogData.modalDialogUrl, 8 | applyCallback: function(dialogWindow) { 9 | // Retrieves the selected value from the modal dialog 10 | var selectedValue = dialogWindow.document.querySelector('input[name="color"]:checked').value; 11 | // Updates the value of the input element in the property configuration dialog 12 | inputElement.value = selectedValue; 13 | }, 14 | applyButtonText: 'Confirm color selection', 15 | title: 'Select a color', 16 | // Passes the current color to the modal dialog data 17 | data: { value: inputElement.value } 18 | }); 19 | } -------------------------------------------------------------------------------- /LearningKit/FormBuilder/FormComponentFilters/IndividualFormComponentFilter.cs: -------------------------------------------------------------------------------- 1 | using System.Linq; 2 | using System.Collections.Generic; 3 | 4 | using Kentico.Forms.Web.Mvc; 5 | using Kentico.Forms.Web.Mvc.FormComponents; 6 | 7 | 8 | namespace LearningKit.FormBuilder 9 | { 10 | public class IndividualFormComponentsFilter : IFormComponentFilter 11 | { 12 | public IEnumerableUse the widget properties dialog to select media files or pages from the connected Xperience database.
5 | 6 | Selected image: 7 | 8 |21 | Pages: 22 |
Enter the email address associated with your user account. The system will send you an email with a link that allows you to reset your password.
11 | @using (Html.BeginForm("RequestPasswordReset", "PasswordReset", FormMethod.Post)) 12 | { 13 | @Html.AntiForgeryToken() 14 | 15 |33 | @Html.ActionLink("> Back to the home index", "Index", "Home") 34 |
-------------------------------------------------------------------------------- /LearningKit/Models/FormComponents/FormComponentProperties/CustomFormComponentProperties.cs: -------------------------------------------------------------------------------- 1 | using CMS.DataEngine; 2 | 3 | using Kentico.Forms.Web.Mvc; 4 | 5 | namespace LearningKit.FormBuilder.FormComponentProperties 6 | { 7 | public class CustomFormComponentProperties : FormComponentProperties33 | Note: This form attempts to subscribe to a newsletter with the "SampleNewsletter" code name. An error will occur if the newsletter does not exist in the connected Xperience database. 34 |
35 | 36 |37 | @Html.ActionLink("> Back to the home index", "Index", "Home") 38 |
-------------------------------------------------------------------------------- /LearningKit/Models/FormComponents/CustomPropertyComponent.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * This is a sample form component used to demonstrate manipulation with custom form component properties. 3 | * For more information, visit the Xperience documentation. 4 | */ 5 | 6 | using Kentico.Forms.Web.Mvc; 7 | 8 | using LearningKit.FormBuilder.FormComponents; 9 | using LearningKit.FormBuilder.FormComponentProperties; 10 | 11 | 12 | [assembly: RegisterFormComponent(CustomPropertyComponent.IDENTIFIER, typeof(CustomPropertyComponent), "Custom text input", Description = "Custom single-line text input", IconClass = "icon-l-text")] 13 | 14 | namespace LearningKit.FormBuilder.FormComponents 15 | { 16 | public class CustomPropertyComponent : FormComponent39 | @Html.ActionLink("> Back to the home index", "Index", "Home") 40 |
41 | 42 | @Html.Kentico().PageBuilderScripts() 43 | -------------------------------------------------------------------------------- /LearningKit/Views/PasswordReset/ResetPassword.cshtml: -------------------------------------------------------------------------------- 1 | @model ResetPasswordViewModel 2 | 3 | @{ 4 | ViewBag.Title = "Password reset"; 5 | Layout = "~/Views/Shared/_Layout.cshtml"; 6 | } 7 | 8 |43 | @Html.ActionLink("> Back to the home index", "Index", "Home") 44 |
-------------------------------------------------------------------------------- /LearningKit/FormBuilder/VisibilityConditions/CustomVisibilityCondition.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | using Kentico.Forms.Web.Mvc; 4 | 5 | using LearningKit.FormBuilder.CustomVisibilityConditions; 6 | 7 | 8 | //DocSection:VisibilityConditionRegistration 9 | [assembly: RegisterFormVisibilityCondition("CustomVisibilityCondition", typeof(CustomVisibilityCondition), "Custom visibility condition")] 10 | //EndDocSection:VisibilityConditionRegistration 11 | 12 | namespace LearningKit.FormBuilder.CustomVisibilityConditions 13 | { 14 | [Serializable] 15 | public class CustomVisibilityCondition : VisibilityCondition 16 | { 17 | //DocSection:Configuration 18 | // Defines a configuration interface for the condition 19 | // The 'EditingComponent' attribute specifies which form component is used as the property's value editor 20 | [EditingComponent(TextInputComponent.IDENTIFIER)] 21 | public string ConfigurableProperty { get; set; } 22 | //EndDocSection:Configuration 23 | 24 | 25 | //DocSection:Contract 26 | // Contains custom visibility logic evaluated by the server 27 | // True indicates the field is displayed, false indicates the field is hidden 28 | public override bool IsVisible() 29 | { 30 | return true; 31 | } 32 | //EndDocSection:Contract 33 | } 34 | } -------------------------------------------------------------------------------- /LearningKit/Controllers/AdminRedirectController.cs: -------------------------------------------------------------------------------- 1 | //DocSection:Using 2 | using System; 3 | using System.Web.Mvc; 4 | 5 | using CMS.Core; 6 | //EndDocSection:Using 7 | 8 | namespace LearningKit.Controllers 9 | { 10 | //DocSection:AdminRedirectController 11 | public class AdminRedirectController : Controller 12 | { 13 | private readonly IAppSettingsService appSettingsService; 14 | 15 | public AdminRedirectController(IAppSettingsService appSettingsService) 16 | { 17 | this.appSettingsService = appSettingsService; 18 | } 19 | 20 | // GET: Redirects to the administration interface URL of the connected Xperience application 21 | public ActionResult Index() 22 | { 23 | // Loads the administration interface URL from the 'CustomAdminUrl' appSettings key in the web.config 24 | string adminUrl = appSettingsService["CustomAdminUrl"]; 25 | 26 | if (!String.IsNullOrEmpty(adminUrl)) 27 | { 28 | // Redirects to the specified administration interface URL 29 | return RedirectPermanent(adminUrl); 30 | } 31 | 32 | // If the 'CustomAdminUrl' web.config key is not set, returns a 404 Not Found response 33 | return HttpNotFound(); 34 | } 35 | } 36 | //EndDocSection:AdminRedirectController 37 | } -------------------------------------------------------------------------------- /LearningKit/Views/Personalization/PersonalizedGreeting.cshtml: -------------------------------------------------------------------------------- 1 | @model LearningKit.Models.Personalization.CurrentContactViewModel 2 | 3 | @{ 4 | Layout = "~/Views/Shared/_Layout.cshtml"; 5 | ViewBag.Title = "Personalized Greeting"; 6 | } 7 | 8 |16 | Hiya 17 | (a personalized greeting for contacts who belong to the "YoungCustomers" persona) 18 |
19 | } 20 | else 21 | { 22 |23 | Hello 24 | (a generic greeting for contacts who do not belong to the "YoungCustomers" persona) 25 |
26 | } 27 | } 28 | else 29 | { 30 |31 | Contact tracking is currently disabled. 32 | To use personalized content, you need to enable the 'Settings -> On-line marketing -> Enable on-line marketing' setting in the connected Xperience administration instance. 33 |
34 | } 35 | } 36 |37 | @Html.ActionLink("> Back to the home index", "Index", "Home") 38 |
-------------------------------------------------------------------------------- /LearningKit/Models/Checkout/PaymentMethodViewModel.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel; 2 | using System.Web.Mvc; 3 | 4 | using CMS.Ecommerce; 5 | 6 | namespace LearningKit.Models.Checkout 7 | { 8 | //DocSection:PaymentViewModel 9 | public class PaymentMethodViewModel 10 | { 11 | [DisplayName("Payment method")] 12 | public int PaymentMethodID { get; set; } 13 | 14 | public SelectList PaymentMethods { get; set; } 15 | 16 | 17 | ///11 | Note: This search uses a locally stored index with the code name "MVCSite.Index". To use the search functionality, you need to create the index in the connected Xperience administration application. 12 |
13 | 14 | @*DocSection:SearchForm*@ 15 | @using (Html.BeginForm("SearchIndex", "Search", FormMethod.Get)) 16 | { 17 | 18 | 19 | } 20 | @*EndDocSection:SearchForm*@ 21 | 22 | @*DocSection:SearchResultItemList*@ 23 | @model SearchResultModel 24 | 25 | @using CMS.Search; 26 | 27 | @if (!Model.Items.Any()) 28 | { 29 | if (!String.IsNullOrWhiteSpace(Model.Query)) 30 | { 31 |50 | @Html.ActionLink("> Back to the home index", "Index", "Home") 51 |
-------------------------------------------------------------------------------- /LearningKit/Areas/CodeSnippets/Views/CodeSnippets.cshtml: -------------------------------------------------------------------------------- 1 | @* This is a dummy view file with code snippets used in the Xperience documentation. *@ 2 | @* These code snippets do NOT take any part in the runnable LearningKit project. *@ 3 | @{ 4 | var model = new 5 | { 6 | SKUID = 1, 7 | SKUName = "Name" 8 | }; 9 | } 10 | 11 | @* E-commerce *@ 12 | 13 | @*DocSection:ItemDetailActionLink*@ 14 | @Html.ActionLink(model.SKUName, "ItemDetail", new { skuId = model.SKUID }) 15 | @*EndDocSection:ItemDetailActionLink*@ 16 | 17 | @*DocSection:ItemDetailUrlLink*@ 18 | link text 19 | @*EndDocSection:ItemDetailUrlLink*@ 20 | 21 | @*DocSection:VariantDisplayImg*@ 22 |This page displays all consents accepted by the current visitor.
10 || Consent ID | 16 |Consent display name | 17 |Consent short text | 18 |Consent details | 19 |Revoke button | 20 |
|---|---|---|---|---|
| @item.Id | 25 |@item.DisplayName | 26 |@Html.Raw(item.GetConsentText("en-US").ShortText) | 27 |@Html.ActionLink("View details", "ConsentDetails", "PrivacyPage", new { consentId = item.Id }, null) | 28 |29 | @using (Html.BeginForm("Revoke", "PrivacyPage", new { consentId = item.Id }, FormMethod.Post)) 30 | { 31 | @Html.AntiForgeryToken() 32 | 33 | } 34 | | 35 |
You have not given an agreement for any consents.
42 | } 43 | 44 |45 | @Html.ActionLink("> Back to the home index", "Index", "Home") 46 |
-------------------------------------------------------------------------------- /LearningKit/Controllers/OnlineMarketing/PersonalizationController.cs: -------------------------------------------------------------------------------- 1 | using System.Web.Mvc; 2 | 3 | using CMS.ContactManagement; 4 | 5 | using LearningKit.Models.Personalization; 6 | 7 | 8 | namespace LearningKit.Controllers 9 | { 10 | public class PersonalizationController : Controller 11 | { 12 | ///| Id | 17 |Date | 18 |Status | 19 |Total | 20 |21 | |
|---|---|---|---|---|
| 28 | @order.OrderID 29 | | 30 |31 | @order.OrderDate 32 | | 33 |34 | @(order.OrderStatusDisplayName) 35 | | 36 |37 | @String.Format(order.CurrencyFormatString, order.OrderTotalPrice) 38 | | 39 |40 | @using (Html.BeginForm("Reorder", "Order", FormMethod.Post)) 41 | { 42 | @Html.Hidden("OrderId", order.OrderID) 43 | 44 | } 45 | | 46 |
53 | @Html.ActionLink("> Back to the home index", "Index", "Home") 54 |
-------------------------------------------------------------------------------- /LearningKit.sln: -------------------------------------------------------------------------------- 1 | 2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio Version 16 4 | VisualStudioVersion = 16.0.30621.155 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LearningKit", "LearningKit\LearningKit.csproj", "{3561E1B0-8BF6-4187-A581-1B0801168CDD}" 7 | EndProject 8 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LearningKitCustomizations", "LearningKitCustomizations\LearningKitCustomizations.csproj", "{E3918B5E-4DC3-4591-A885-61A315270E02}" 9 | EndProject 10 | Global 11 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 12 | Debug|Any CPU = Debug|Any CPU 13 | Release|Any CPU = Release|Any CPU 14 | EndGlobalSection 15 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 16 | {3561E1B0-8BF6-4187-A581-1B0801168CDD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 17 | {3561E1B0-8BF6-4187-A581-1B0801168CDD}.Debug|Any CPU.Build.0 = Debug|Any CPU 18 | {3561E1B0-8BF6-4187-A581-1B0801168CDD}.Release|Any CPU.ActiveCfg = Release|Any CPU 19 | {3561E1B0-8BF6-4187-A581-1B0801168CDD}.Release|Any CPU.Build.0 = Release|Any CPU 20 | {E3918B5E-4DC3-4591-A885-61A315270E02}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 21 | {E3918B5E-4DC3-4591-A885-61A315270E02}.Debug|Any CPU.Build.0 = Debug|Any CPU 22 | {E3918B5E-4DC3-4591-A885-61A315270E02}.Release|Any CPU.ActiveCfg = Release|Any CPU 23 | {E3918B5E-4DC3-4591-A885-61A315270E02}.Release|Any CPU.Build.0 = Release|Any CPU 24 | EndGlobalSection 25 | GlobalSection(SolutionProperties) = preSolution 26 | HideSolutionNode = FALSE 27 | EndGlobalSection 28 | GlobalSection(ExtensibilityGlobals) = postSolution 29 | SolutionGuid = {09B9ACA6-A295-4ED1-9E22-2594DCACB170} 30 | EndGlobalSection 31 | EndGlobal 32 | -------------------------------------------------------------------------------- /LearningKit/Kentico/Scripts/modal-dialog.js: -------------------------------------------------------------------------------- 1 | window.kentico = window.kentico || {}; 2 | 3 | /** 4 | * Modal dialog API type definition. 5 | * @typedef {Object} ModalDialog 6 | * @property {Function} open Opens a modal dialog. 7 | * @property {Function} save Saves currently opened modal dialog. 8 | * @property {Function} close Closes currently opened modal dialog. 9 | * @property {Function} getData Gets the data for currently opened modal dialog. 10 | */ 11 | (function (localKenticoNamespace, parentKenticoNamespace) { 12 | localKenticoNamespace.modalDialog = localKenticoNamespace.modalDialog || {}; 13 | 14 | registerModalDialogApi(localKenticoNamespace.modalDialog, parentKenticoNamespace.modalDialog); 15 | registerLocalizationApi(); 16 | 17 | /** 18 | * Registers the modal dialog API in current window. 19 | * @param {ModalDialog} modalDialog Modal dialog service object. 20 | * @param {ModalDialog} parentModalDialog Modal dialog service object in parent window. 21 | */ 22 | function registerModalDialogApi(modalDialog, parentModalDialog) { 23 | modalDialog.open = parentModalDialog.open; 24 | modalDialog.apply = parentModalDialog.apply.bind(null, window); 25 | modalDialog.cancel = parentModalDialog.cancel.bind(null, window); 26 | modalDialog.getData = parentModalDialog.getData; 27 | 28 | modalDialog.contentSelector = parentModalDialog.contentSelector; 29 | } 30 | 31 | /** 32 | * Registers the localization API in current window. 33 | */ 34 | function registerLocalizationApi() { 35 | localKenticoNamespace.localization = parentKenticoNamespace.localization; 36 | } 37 | }(window.kentico, window.parent.kentico)); 38 | -------------------------------------------------------------------------------- /LearningKit/Models/Checkout/OrderViewModel.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | using CMS.Ecommerce; 4 | 5 | 6 | namespace LearningKit.Models.Checkout 7 | { 8 | //DocSection:OrderViewModel 9 | public class OrderViewModel 10 | { 11 | public int OrderID { get; set; } 12 | 13 | public int OrderStatusID { get; set; } 14 | 15 | public string CurrencyFormatString { get; set; } 16 | 17 | public DateTime OrderDate { get; set; } 18 | 19 | public decimal OrderTotalPrice { get; set; } 20 | 21 | public bool OrderIsPaid { get; set; } 22 | 23 | public OrderPaymentResultViewModel OrderPaymentResult { get; set; } 24 | 25 | public string OrderStatusDisplayName { get; set; } 26 | 27 | public OrderViewModel(OrderInfo order, ICurrencyInfoProvider currencyInfoProvider) 28 | { 29 | OrderID = order.OrderID; 30 | OrderStatusID = order.OrderStatusID; 31 | CurrencyFormatString = currencyInfoProvider.Get(order.OrderCurrencyID).CurrencyFormatString; 32 | OrderDate = order.OrderDate; 33 | OrderTotalPrice = order.OrderTotalPrice; 34 | OrderIsPaid = order.OrderIsPaid; 35 | OrderStatusDisplayName = OrderStatusInfo.Provider.Get(order.OrderStatusID)?.StatusDisplayName; 36 | if (order.OrderPaymentResult != null) 37 | { 38 | OrderPaymentResult = new OrderPaymentResultViewModel() 39 | { 40 | PaymentMethodName = order.OrderPaymentResult.PaymentMethodName, 41 | PaymentIsCompleted = order.OrderPaymentResult.PaymentIsCompleted 42 | }; 43 | } 44 | } 45 | } 46 | //EndDocSection:OrderViewModel 47 | } -------------------------------------------------------------------------------- /LearningKit/Views/ProductFilter/FilterPageProperty.cshtml: -------------------------------------------------------------------------------- 1 | @model LearningKit.Models.ProductFilter.ProductFilterViewModel 2 | @using LearningKit.Models.Products 3 | 4 | @{ 5 | ViewBag.Title = "Product filter"; 6 | Layout = "~/Views/Shared/_Layout.cshtml"; 7 | } 8 | 9 |
12 | @Html.ActionLink("> Filter based on an SKU property (price)", "FilterSKUProperty")
13 | @Html.ActionLink("> Filter based on a foreign SKU property (manufacturers)", "FilterForeignProperty")
14 |
55 | @Html.ActionLink("> Back to the home index", "Index", "Home") 56 |
-------------------------------------------------------------------------------- /LearningKit/Views/ProductFilter/FilterSKUProperty.cshtml: -------------------------------------------------------------------------------- 1 | @model LearningKit.Models.ProductFilter.ProductFilterViewModel 2 | @using LearningKit.Models.Products 3 | 4 | @{ 5 | ViewBag.Title = "Product filter"; 6 | Layout = "~/Views/Shared/_Layout.cshtml"; 7 | } 8 | 9 |
12 | @Html.ActionLink("> Filter based on a page property (LPTWithFeature)", "FilterPageProperty")
13 | @Html.ActionLink("> Filter based on a foreign SKU property (manufacturers)", "FilterForeignProperty")
14 |
56 | @Html.ActionLink("> Back to the home index", "Index", "Home") 57 |
-------------------------------------------------------------------------------- /LearningKit/Views/PageBuilder/PageBuilder.cshtml: -------------------------------------------------------------------------------- 1 | @model LearningKit.Models.PageBuilder.PageBuilderModel 2 | 3 | @{ 4 | ViewBag.Title = "Page with the page builder"; 5 | } 6 | 7 | @*DocSection:Using*@ 8 | @using Kentico.PageBuilder.Web.Mvc 9 | @using Kentico.Web.Mvc 10 | @*EndDocSection:Using*@ 11 | 12 | @Html.Kentico().PageBuilderStyles() 13 | 14 |53 | @Html.ActionLink("> Back to the home index", "Index", "Home") 54 |
55 | 56 | @*DocSection:RegisterScripts*@ 57 | @Html.Kentico().PageBuilderScripts() 58 | @*EndDocSection:RegisterScripts*@ -------------------------------------------------------------------------------- /LearningKit/Models/Widgets/SelectorsWidget/SelectorsWidgetProperties.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Linq; 3 | 4 | using Kentico.Forms.Web.Mvc; 5 | using Kentico.PageBuilder.Web.Mvc; 6 | using Kentico.Components.Web.Mvc.FormComponents; 7 | 8 | 9 | namespace LearningKit.Models.Widgets.SelectorsWidget 10 | { 11 | public class SelectorsWidgetProperties : IWidgetProperties 12 | { 13 | // Assigns a selector component to the Images property 14 | [EditingComponent(MediaFilesSelector.IDENTIFIER)] 15 | // Limits the maximum number of files that can be selected at once. 16 | [EditingComponentProperty(nameof(MediaFilesSelectorProperties.MaxFilesLimit), 1)] 17 | // Returns a list of media files selector items (objects that contain the GUIDs of selected media files) 18 | public IEnumerable52 | @Html.ActionLink("> Back to the home index", "Index", "Home") 53 |
-------------------------------------------------------------------------------- /LearningKit/FormBuilder/ValidationRules/ValueOfDependeeLiesBetween.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | using Kentico.Forms.Web.Mvc; 4 | 5 | using LearningKit.FormBuilder.CustomValidationRules; 6 | 7 | 8 | // Registers the validation rule in the system 9 | [assembly: RegisterFormValidationRule("ValueOfDependeeLiesBetweenValidationRule", typeof(ValueOfDependeeLiesBetween), "Value of another field is between", Description = "Checks whether the value of the selected field lies on the specified interval given by the value of the selected field and the specified boundary.")] 10 | 11 | namespace LearningKit.FormBuilder.CustomValidationRules 12 | { 13 | [Serializable] 14 | public class ValueOfDependeeLiesBetween : CompareToFieldValidationRule11 | If you enter an order's ID to the text box and click the button, the order information will be displayed. 12 |
13 | 14 | @*DocSection:OrderDetailView*@ 15 | @* Renders a form field for entering order IDs. *@ 16 | @using (Html.BeginForm("OrderDetail", "Order")) 17 | { 18 | 19 | 20 | } 21 | 22 | 23 | @if (Model != null) 24 | { 25 |51 | @Html.ActionLink("> Back to the home index", "Index", "Home") 52 |
-------------------------------------------------------------------------------- /LearningKit/Areas/CodeSnippets/Views/web.config: -------------------------------------------------------------------------------- 1 | 2 | 3 |
12 | @Html.ActionLink("> Filter based on a page property (LPTWithFeature)", "FilterPageProperty")
13 | @Html.ActionLink("> Filter based on an SKU property (price)", "FilterSKUProperty")
14 |
61 | @Html.ActionLink("> Back to the home index", "Index", "Home") 62 |
-------------------------------------------------------------------------------- /LearningKit/CMSRegistrationSource.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | 5 | using Autofac.Core; 6 | using Autofac.Builder; 7 | 8 | namespace LearningKit 9 | { 10 | ///70 | @Html.ActionLink("> Back to the home index", "Index", "Home") 71 |
72 | -------------------------------------------------------------------------------- /LearningKit/Views/Register/Register.cshtml: -------------------------------------------------------------------------------- 1 | @model RegisterViewModel 2 | 3 | @{ 4 | Layout = "~/Views/Shared/_Layout.cshtml"; 5 | ViewBag.Title = "Register"; 6 | } 7 | 8 |72 | @Html.ActionLink("> Back to the home index", "Index", "Home") 73 |
-------------------------------------------------------------------------------- /LearningKit/Views/web.config: -------------------------------------------------------------------------------- 1 | 2 |56 | @foreach (AuthenticationDescription p in authServices) 57 | { 58 | 59 | } 60 |
61 | } 62 | } 63 | @*EndDocSection:ExternalAuthView*@ 64 |65 | @Html.ActionLink("> Back to the home index", "Index", "Home") 66 |
-------------------------------------------------------------------------------- /LearningKit/Views/Shared/FormComponents/_RgbInputComponent.cshtml: -------------------------------------------------------------------------------- 1 | @*DocSection:RgbViewModel*@ 2 | @using Kentico.Forms.Web.Mvc 3 | @using LearningKit.FormBuilder 4 | 5 | 6 | @model LearningKit.FormBuilder.FormComponents.RgbInputComponent 7 | 8 | @* Gets a collection of system HTML attributes necessary for the correct functionality of the component input fields *@ 9 | @{ 10 | IDictionary69 | Note: To send confirmation emails, the connected Xperience application must have a valid SMTP server configured. 70 |
71 |74 | @Html.ActionLink("> Back to the home index", "Index", "Home") 75 |
-------------------------------------------------------------------------------- /LearningKit/Views/AzureSearch/AzureSearch.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | ViewBag.Title = "Azure Search"; 3 | } 4 | @*DocSection:AzureSearchView*@ 5 | @model LearningKit.Models.Search.AzureSearch.AzureSearchViewModel 6 | 7 |Country
19 | 20 | for (int i = 0; i < Model.FilterCountry.Count; i++) 21 | { 22 | @Html.HiddenFor(m => m.FilterCountry[i].Name) 23 | @Html.HiddenFor(m => m.FilterCountry[i].Value) 24 | @Html.EditorFor(m => m.FilterCountry[i].Selected) 25 | @Html.LabelFor(m => m.FilterCountry[i].Selected, Model.FilterCountry[i].Name) 26 | } 27 | 28 |Farm
29 | 30 | for (int i = 0; i < Model.FilterFarm.Count; i++) 31 | { 32 | @Html.HiddenFor(m => m.FilterFarm[i].Name) 33 | @Html.HiddenFor(m => m.FilterFarm[i].Value) 34 | @Html.EditorFor(m => m.FilterFarm[i].Selected) 35 | @Html.LabelFor(m => m.FilterFarm[i].Selected, Model.FilterFarm[i].Name) 36 | } 37 | } 38 |69 | @Html.ActionLink("> Back to the home index", "Index", "Home") 70 |
-------------------------------------------------------------------------------- /LearningKit/Models/Checkout/ShoppingCartViewModel.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Linq; 3 | 4 | using CMS.Ecommerce; 5 | 6 | using Kentico.Content.Web.Mvc; 7 | 8 | namespace LearningKit.Models.Checkout 9 | { 10 | //DocSection:ShoppingCartViewModel 11 | public class ShoppingCartViewModel 12 | { 13 | public IEnumerableSelected shipping method: @Model.DeliveryDetails.ShippingOption.ShippingOptionDisplayName
47 |Total tax: @String.Format(Model.Cart.CurrencyFormatString, Model.Cart.TotalTax)
48 |Total shipping: @String.Format(Model.Cart.CurrencyFormatString, Model.Cart.TotalShipping)
49 |Total (incl. tax): @String.Format(Model.Cart.CurrencyFormatString, Model.Cart.GrandTotal)
50 |
65 | @Html.ActionLink("> Back to the customer details step", "DeliveryDetails")
66 | @Html.ActionLink("> Back to the customer details step with pre-filling addresses", "DeliveryDetailsAddressSelector")
67 | @Html.ActionLink("> Back to the home index", "Index", "Home")
68 |