public ActionResult Configure(bool isSubmit = false)
        {
            var storeScope = this.GetActiveStoreScopeConfiguration(_storeService, _workContext);

            var settings = _settingService.LoadSetting <mobSocialSettings>(storeScope);
            var model    = new ConfigurationModel();

            Mapper.Initialize(cfg => cfg.CreateMap <mobSocialSettings, ConfigurationModel>());
            Mapper.Map(settings, model);

            model.ActiveStoreScopeConfiguration = storeScope;
            if (storeScope > 0)
            {
                model.ArtistPageMainImageSize_OverrideForStore              = _settingService.SettingExists(settings, x => x.ArtistPageMainImageSize, storeScope);
                model.ArtistPageThumbnailSize_OverrideForStore              = _settingService.SettingExists(settings, x => x.ArtistPageMainImageSize, storeScope);
                model.BattleHostSponsorshipPercentage_OverrideForStore      = _settingService.SettingExists(settings, x => x.ArtistPageMainImageSize, storeScope);
                model.BattleVoteReminderEmailThresholdDays_OverrideForStore = _settingService.SettingExists(settings, x => x.ArtistPageMainImageSize, storeScope);
                model.CustomerAlbumPictureThumbnailWidth_OverrideForStore   = _settingService.SettingExists(settings, x => x.ArtistPageMainImageSize, storeScope);
                model.CustomerProfileUpdateViewCountAfterNumberOfSeconds_OverrideForStore = _settingService.SettingExists(settings, x => x.ArtistPageMainImageSize, storeScope);
                model.DefaultVotingChargeForPaidVoting_OverrideForStore = _settingService.SettingExists(settings, x => x.ArtistPageMainImageSize, storeScope);
                model.EnableAutomaticMigrations_OverrideForStore        = _settingService.SettingExists(settings, x => x.ArtistPageMainImageSize, storeScope);
                model.EchonestAPIKey_OverrideForStore = _settingService.SettingExists(settings, x => x.ArtistPageMainImageSize, storeScope);
                model.EventPageSearchAutoCompleteNumberOfResults_OverrideForStore = _settingService.SettingExists(settings, x => x.ArtistPageMainImageSize, storeScope);
                model.EventPageSearchTermMinimumLength_OverrideForStore           = _settingService.SettingExists(settings, x => x.ArtistPageMainImageSize, storeScope);
                model.EventPageAttendanceThumbnailSize_OverrideForStore           = _settingService.SettingExists(settings, x => x.ArtistPageMainImageSize, storeScope);
                model.FacebookWebsiteAppId_OverrideForStore  = _settingService.SettingExists(settings, x => x.ArtistPageMainImageSize, storeScope);
                model.SevenDigitalPartnerId_OverrideForStore = _settingService.SettingExists(settings, x => x.ArtistPageMainImageSize, storeScope);
                model.ShowProfileImagesInSearchAutoComplete_OverrideForStore    = _settingService.SettingExists(settings, x => x.ArtistPageMainImageSize, storeScope);
                model.SongFileMaximumUploadSize_OverrideForStore                = _settingService.SettingExists(settings, x => x.ArtistPageMainImageSize, storeScope);
                model.SiteOwnerSponsorshipPercentage_OverrideForStore           = _settingService.SettingExists(settings, x => x.ArtistPageMainImageSize, storeScope);
                model.SongFileSampleMaximumUploadSize_OverrideForStore          = _settingService.SettingExists(settings, x => x.ArtistPageMainImageSize, storeScope);
                model.MacroPaymentsFixedPaymentProcessingFee_OverrideForStore   = _settingService.SettingExists(settings, x => x.ArtistPageMainImageSize, storeScope);
                model.MicroPaymentsFixedPaymentProcessingFee_OverrideForStore   = _settingService.SettingExists(settings, x => x.ArtistPageMainImageSize, storeScope);
                model.MacroPaymentsPaymentProcessingPercentage_OverrideForStore = _settingService.SettingExists(settings, x => x.ArtistPageMainImageSize, storeScope);
                model.MicroPaymentsPaymentProcessingPercentage_OverrideForStore = _settingService.SettingExists(settings, x => x.ArtistPageMainImageSize, storeScope);
                model.SiteOwnerSponsorshipPercentage_OverrideForStore           = _settingService.SettingExists(settings, x => x.ArtistPageMainImageSize, storeScope);
                model.EnableFacebookInvite_OverrideForStore = _settingService.SettingExists(settings, x => x.ArtistPageMainImageSize, storeScope);
                model.VideoUploadReminderEmailThresholdDays_OverrideForStore = _settingService.SettingExists(settings, x => x.ArtistPageMainImageSize, storeScope);
                model.PeopleSearchAutoCompleteEnabled_OverrideForStore       = _settingService.SettingExists(settings, x => x.ArtistPageMainImageSize, storeScope);
                model.PurchasedSongFeePercentage_OverrideForStore            = _settingService.SettingExists(settings, x => x.ArtistPageMainImageSize, storeScope);
                model.ProfilePictureSize_OverrideForStore              = _settingService.SettingExists(settings, x => x.ArtistPageMainImageSize, storeScope);
                model.TimelineSmallImageWidth_OverrideForStore         = _settingService.SettingExists(settings, x => x.ArtistPageMainImageSize, storeScope);
                model.UninvitedFriendsNumberOfResults_OverrideForStore = _settingService.SettingExists(settings, x => x.ArtistPageMainImageSize, storeScope);
            }


            if (isSubmit)
            {
                model.MessageText = "Settings Saved Successfully.";
            }


            return(View(ViewHelpers.GetCorrectViewPath("Views/Configuration/Configuration.cshtml"), model));
        }
        public ActionResult CustomerTabEditor(int Id = 0)
        {
            if (Id == 0)
            {
                return(null);
            }
            var visibleAttribute = _genericAttributeService.GetAttributesForEntity(Id, "Customer").FirstOrDefault(x => x.Key == "hideProfile");
            var model            = new MobSocialCustomerModel
            {
                CustomerId  = Id,
                HideProfile = visibleAttribute != null && visibleAttribute.Value == "True"
            };

            return(View(ViewHelpers.GetCorrectViewPath("Views/Customer/CustomerTabContents.cshtml"), model));
        }
Beispiel #3
0
        public void HandleEvent(AdminTabStripCreated eventMessage)
        {
            if (eventMessage.TabStripName != "customer-edit")
            {
                return;
            }

            //get the currently being edited customer id
            var evc        = EngineContext.Current.Resolve <CustomerController>();
            var context    = evc.ControllerContext ?? new ControllerContext(System.Web.HttpContext.Current.Request.RequestContext, evc);
            var customerId = Convert.ToInt32(context.RequestContext.RouteData.Values["id"]);
            var viewName   = ViewHelpers.GetCorrectViewPath("Views/Customer/CustomerTab.cshtml");

            var content = ViewRenderer.RenderPartialView(viewName, customerId);

            eventMessage.BlocksToRender.Add(MvcHtmlString.Create(content));
        }
 public ActionResult ConfigureSkills(int page = 1, int count = 15)
 {
     return(View(ViewHelpers.GetCorrectViewPath("Views/Configuration/SkillConfiguration.cshtml")));
 }