public ActionResult Index()
        {
            InitData initData = (InitData)Session["initData"];

            if (initData.HasLicenseFile)
            {
                using (System.IO.FileStream license = System.IO.File.OpenRead(initData.LicenseFilePath))
                {
                    License lic = new License();
                    lic.SetLicense(license);
                }
            }
            if (initData.HasSampleFolder)
            {
                List <SampleDocumentInfo> sampleDocs = Repository.PrepareSampleDocuments(initData.SampleDocumentsFolderPath);
                BrowseModel bm = new BrowseModel()
                {
                    Documents        = sampleDocs,
                    BrowseableFolder = initData.SampleDocumentsFolderPath
                };
                return(View("Browse", bm));
            }
            else
            {
                return(View("Error", (object)"Cannot find a folder with sample documents. Please add it to the 'config.xml'"));
            }
        }
Exemplo n.º 2
0
        public ActionResult UpcomingEvents(int max = 10)
        {
            var browseModel = new BrowseModel();

            browseModel.Events = DataRepository.GetUpcomingEventsByUser(loggedUserGuid, max).OrderBy(e => e.Date);
            return(View(browseModel));
        }
        public async Task <IActionResult> Index(BrowseModel model)
        {
            model.InitialVirtualPath = await _fileManagerService.GetRootVirtualPath().ConfigureAwait(false);

            model.FileTreeServiceUrl     = Url.Action("GetFileTreeJson", "FileManager", new { fileType = model.Type });
            model.UploadServiceUrl       = Url.Action("Upload", "FileManager");
            model.FileDownloadServiceUrl = Url.Action("DownloadFile", "FileManager");
            model.CreateFolderServiceUrl = Url.Action("CreateFolder", "FileManager");
            model.DeleteFolderServiceUrl = Url.Action("DeleteFolder", "FileManager");
            model.RenameFolderServiceUrl = Url.Action("RenameFolder", "FileManager");
            model.DeleteFileServiceUrl   = Url.Action("DeleteFile", "FileManager");
            model.RenameFileServiceUrl   = Url.Action("RenameFile", "FileManager");
            var authResult = await _authorizationService.AuthorizeAsync(User, "FileManagerDeletePolicy");

            model.CanDelete = authResult.Succeeded;

            //model.AllowedFileExtensionsRegex = @"/(\.|\/)(gif|GIF|jpg|JPG|jpeg|JPEG|png|PNG|flv|FLV|swf|SWF|wmv|WMV|mp3|MP3|mp4|MP4|m4a|M4A|m4v|M4V|oga|OGA|ogv|OGV|webma|WEBMA|webmv|WEBMV|webm|WEBM|wav|WAV|fla|FLA|tif|TIF|asf|ASF|asx|ASX|avi|AVI|mov|MOV|mpeg|MPEG|mpg|MPG|zip|ZIP|pdf|PDF|doc|DOC|docx|DOCX|xls|XLS|xlsx|XLSX|ppt|PPT|pptx|PPTX|pps|PPS|csv|CSV|txt|TXT|htm|HTM|html|HTML|css|CSS)$/i";
            if (model.Type == "image")
            {
                model.AllowedFileExtensionsRegex = _allowedFilesRegexBuilder.BuildRegex(_autoUploadOptions.ImageFileExtensions);
            }
            else
            {
                model.AllowedFileExtensionsRegex = _allowedFilesRegexBuilder.BuildRegex(_autoUploadOptions.AllowedFileExtensions);
            }

            if (HttpContext.Request.IsAjaxRequest())
            {
                return(PartialView(model));
            }

            return(View(model));
        }
Exemplo n.º 4
0
        public ActionResult Year(int Year)
        {
            BrowseModel model = new BrowseModel();

            model.grid.movies = db.Movies.Where(m => m.ReleaseYear == Year).Select(m => m).ToList();
            return(View(model));
        }
Exemplo n.º 5
0
 public BrowseViewModel()
 {
     model           = new BrowseModel();
     model.alert    += Alert;
     searchCommand   = new RelayCommand(searchExecuteMethod);
     downloadCommand = new RelayCommand(downloadExecuteMethod);
 }
        public ActionResult DisposableTrackerBrowse()
        {
            BrowseModel model = new BrowseModel {
                GridDef = GetGridModel()
            };

            return(View(model));
        }
Exemplo n.º 7
0
        public ActionResult Newest()
        {
            var model = new BrowseModel();

            model.Bands = DataRepository.GetNewestBands();

            return(View(model));
        }
Exemplo n.º 8
0
        public ActionResult FeedbackBrowse()
        {
            BrowseModel model = new BrowseModel {
                GridDef = GetGridModel()
            };

            return(View(model));
        }
Exemplo n.º 9
0
        public ActionResult EntriesBrowse(int blogCategory = 0)
        {
            BrowseModel model = new BrowseModel {
                GridDef = GetGridModel(blogCategory)
            };

            return(View(model));
        }
Exemplo n.º 10
0
        public ActionResult CategoriesBrowse()
        {
            BrowseModel model = new BrowseModel {
                GridDef = GetGridModel()
            };

            return(View(model));
        }
Exemplo n.º 11
0
        public ActionResult TemplateGridAjax()
        {
            BrowseModel model = new BrowseModel {
                GridDef = GetGridModel()
            };

            return(View(model));
        }
Exemplo n.º 12
0
        public ActionResult BrowseDataProviders()
        {
            BrowseModel model = new BrowseModel {
                GridDef = GetGridModel()
            };

            return(View(model));
        }
Exemplo n.º 13
0
        public ActionResult AuthorizationBrowse()
        {
            BrowseModel model = new BrowseModel {
                GridDef = GetGridModel()
            };

            return(View(model));
        }
Exemplo n.º 14
0
        public ActionResult BrowseHolidays()
        {
            BrowseModel model = new BrowseModel {
                GridDef = GetGridModel()
            };

            return(View(model));
        }
Exemplo n.º 15
0
        public ActionResult UnifiedSetsBrowse()
        {
            BrowseModel model = new BrowseModel {
                GridDef = GetGridModel()
            };

            return(View(model));
        }
Exemplo n.º 16
0
        // GET: BrowseProfiles
        public ActionResult Browse()
        {
            BrowseModel browseData = new BrowseModel();

            browseData.profiles  = _usersRepository.fetchProfiles();
            browseData.countries = reader.getCountries();
            return(View(browseData));
        }
Exemplo n.º 17
0
        public ActionResult BrowseBlockedNumbers()
        {
            BrowseModel model = new BrowseModel {
                GridDef = GetGridModel()
            };

            return(View(model));
        }
Exemplo n.º 18
0
        public ActionResult Browse(string searchtext)
        {
            BrowseModel browseData = new BrowseModel();

            browseData.profiles  = _usersRepository.findProfilesByName(searchtext);
            browseData.countries = reader.getCountries();
            return(View(browseData));
        }
Exemplo n.º 19
0
        public ActionResult StaticPagesBrowse()
        {
            BrowseModel model = new BrowseModel {
                GridDef = GetGridModel()
            };

            return(View(model));
        }
Exemplo n.º 20
0
        public ActionResult BrowseVoiceMails()
        {
            Manager.NeedUser();
            BrowseModel model = new BrowseModel {
                GridDef = GetGridModel()
            };

            return(View(model));
        }
Exemplo n.º 21
0
        public ActionResult Letter(string letter)
        {
            var model   = new BrowseModel();
            var myBands = DataRepository.GetBandRelationsByUser(loggedUserGuid, 2).Select(b => b.Band);

            model.Bands = DataRepository.GetBandsByLetter(letter).Except(myBands);

            return(View(model));
        }
        public ActionResult LocalizeBrowsePackage(string packageName)
        {
            Package     package = Package.GetPackageFromPackageName(packageName);
            BrowseModel model   = new BrowseModel {
                GridDef = GetGridModel(package)
            };

            Module.Title = this.__ResStr("modTitle", "Localization Resources - Package {0}", package.Name);
            return(View(model));
        }
Exemplo n.º 23
0
        public ActionResult HttpModulesBrowse()
        {
            BrowseModel model = new BrowseModel {
            };

#if MVC6
#else
            model.GridDef = GetGridModel();
#endif
            return(View(model));
        }
Exemplo n.º 24
0
        public ActionResult Genre(string filter)
        {
            var model = new BrowseModel();

            model.Bands  = DataRepository.GetBandsByGenre(filter);
            model.Genres = DataRepository.GetGenres();

            ViewData["genre-name"] = DataRepository.GetGenre(filter).Name;

            return(View(model));
        }
Exemplo n.º 25
0
        // GET: Browse
        public ActionResult Index(int?Year)
        {
            BrowseModel model = new BrowseModel();

            model.Populate();
            if (Year != null)
            {
                model.grid.movies = db.Movies.Where(m => m.ReleaseYear == Year).Select(m => m).ToList();
            }
            return(View(model));
        }
Exemplo n.º 26
0
 public async Task <ActionResult> AuditRecords()
 {
     using (AuditInfoDataProvider dataProvider = new AuditInfoDataProvider()) {
         BrowseModel model = new BrowseModel {
             RestartPending = YetaWF.Core.Support.Startup.RestartPending || (YetaWF.Core.Audit.Auditing.Active ? await YetaWF.Core.Audit.Auditing.AuditProvider.HasPendingRestartAsync() : false),
             LastRestart    = YetaWF.Core.Support.Startup.MultiInstanceStartTime,
             GridDef        = GetGridModel()
         };
         return(View(model));
     }
 }
Exemplo n.º 27
0
        public ActionResult AddonsBrowse()
        {
            BrowseModel model = new BrowseModel {
                AddOnsUrl          = VersionManager.AddOnsUrl,
                AddOnsCustomUrl    = VersionManager.AddOnsCustomUrl,
                NodeModulesUrl     = Globals.NodeModulesUrl,
                BowerComponentsUrl = Globals.BowerComponentsUrl,
                GridDef            = GetGridModel()
            };

            return(View(model));
        }
Exemplo n.º 28
0
        public ActionResult SearchBrowse()
        {
            if (!SearchDataProvider.IsUsable)
            {
                return(View("SearchUnavailable_Browse"));
            }
            BrowseModel model = new BrowseModel {
                GridDef = GetGridModel()
            };

            return(View(model));
        }
Exemplo n.º 29
0
        public IActionResult Index([FromQuery] string[] s = null)
        {
            var calculators = this.calculatorService.Filter(s, CalculatorFilterTarget.All, false, false, MultipleFilterMatch.And);

            var vm = new BrowseModel
            {
                CalculatorIds = calculators.Select(i => i.Id).ToList(),
                Filters       = s
            };

            return(View(vm));
        }
Exemplo n.º 30
0
        public ActionResult Visitors()
        {
            using (VisitorEntryDataProvider visitorDP = new VisitorEntryDataProvider()) {
                if (!visitorDP.Usable)
                {
                    throw new Error(this.__ResStr("noInfo", "Visitor information is not available - See https://yetawf.com/Documentation/YetaWF/Visitors"));
                }
            }
            BrowseModel model = new BrowseModel {
                GridDef = GetGridModel()
            };

            return(View(model));
        }