protected override Task BuildViews(List <IModule> activeModules, int pageIndex, int pageSize, FolderModel folder, PathIdentifier identifier, string userTimeZone)
        {
            // We need to take a list of manager path models, and convert them to a list of item query response object
            var managerPathModels = this.eDiscovery.BuildDatedPackagesDynamicFolder(folder);

            // Now we need to convert these manager path models into something that's a list of
            var dynamicPaths = new List <IItemQueryResponse>();

            dynamicPaths.AddRange(managerPathModels);

            this.page.Views = new List <IViewModel>();
            if (identifier.PathKey == EDiscoveryUtility.E_DISCOVERY_PATH_KEY)
            {
                this.page.Views.Add(GridViewBuilder.BuildGridView(pageIndex, pageSize, dynamicPaths, new List <AllowedOperation>(), new List <GridColumnSpecification>()
                {
                    GridColumnSpecification.GetNameColumn(), GridColumnSpecification.GetCustomNameColumn()
                }, GridViewModel.GRID_TITLES_EDISOVERY_PACKAGES));
            }

            if (identifier.PathKey != null &&
                (identifier.PathKey.StartsWith(EDiscoveryUtility.E_DISCOVERY_DATED_PACKAGE_PATH_KEY) ||
                 identifier.PathKey.StartsWith(EDiscoveryUtility.E_DISCOVERY_ALL_PACKAGE_PATH_KEY)))
            {
                this.page.Views.Add(GridViewBuilder.BuildGridView(pageIndex, pageSize, filteredFiles, allRows, GridColumnSpecification.GetStandarSetOfColumns(), GridViewModel.GRID_TITLE_FILES));
            }

            return(Task.FromResult(0));
        }
        protected virtual Task BuildViews(List <IModule> activeModules, int pageIndex, int pageSize, FolderModel folder, PathIdentifier identifier, string userTimeZone)
        {
            var views = new List <IViewModel>();

            if ((identifier.LeafName == null || identifier.LeafName == string.Empty) && BuildDataView)
            {
                var schema = DataViewBuilder.BuildDataViewModel(state.Folder);
                if (schema != null)
                {
                    views.Add(schema);
                }
            }

            var gridTitle = identifier.PathKey;

            if (String.IsNullOrEmpty(gridTitle))
            {
                gridTitle = "Case Files";
            }

            foreach (var module in activeModules)
            {
                module.AlterGridTitle(gridTitle, identifier);
            }


            // In this case we're going to have files/folders.  so we build up the columns accordingly.
            views.Add(GridViewBuilder.BuildGridView(pageIndex, pageSize, filteredFiles, allRows, GridColumnSpecification.GetStandarSetOfColumns(), gridTitle));

            page.Views = views;

            return(Task.FromResult(0));
        }
Example #3
0
        protected async override Task BuildViews(List <IModule> activeModules, int pageIndex, int pageSize, FolderModel folder, PathIdentifier identifier, string userTimeZone)
        {
            this.page.Views = new List <Models.Responses.IViewModel>();

            // This will show the instructions on how to work with EDiscovery
            var instructions = new DataViewModel
            {
                DataModel  = null,
                DataSchema = new ManagerFieldObject()
                {
                    IsCollapsed = false,
                    Properties  = new Dictionary <string, ManagerFieldBaseSchema>()
                    {
                        { "Instructions", new ManagerFieldNull()
                          {
                              Description = @"<p>
                                                  Files/folders that you have marked for sharing will appear in the ""Not Yet Shared"" folder and will remain there until you click <b>""Turn Over.""</b>
                                                </p>
                                                <p>
                                                  Clicking <b>""Turn Over""</b> will move the files from ""Not Yet Shared"" into a Discovery Package of files.
                                                </p>
                                                <p>
                                                  Once turned over, files cannot be edited or deleted.  Files turned over will still be in their original file folders, but the color will change to green.
                                                </p>
                                                <p>
                                                  Below are other users that you have authorized to view Discovery Packages.  To add someone new, click ""Add Recipient"" and fill out the form.  Click the action button next to a user to regenerate their access link/password or to remove them from the case.
                                                </p>",
                              IsReadOnly  = true,
                              Order       = 0,
                              Title       = "eDiscovery Instructions"
                          } },
                    }
                },
                AllowedOperations = null
            };

            this.page.Views.Add(instructions);

            this.page.Views.Add(RecipientViewBuilder.BuildPagedGridView(
                                    pageIndex,
                                    pageSize,
                                    folder.MetaEDiscoveryRecipientListRead(),
                                    folder.Identifier,
                                    userTimeZone,
                                    GridViewModel.GRID_TITLES_EDISOVERY_RECIPIENTS,
                                    new List <AllowedOperation>()
            {
                AllowedOperation.GetAllowedOperationAddRecipient(folder.Identifier, folder)
            },
                                    GetAllowedOperationsForRecipient
                                    ));

            // We need to take a list of manager path models, and convert them to a list of item query response object
            var managerPathModels = this.eDiscovery.BuildDatedPackagesDynamicFolder(folder);

            managerPathModels.Add(this.eDiscovery.GetNotSharedYetPath(folder));

            // Now we need to convert these manager path models into something that's a list of
            var dynamicPaths = new List <IItemQueryResponse>();

            dynamicPaths.AddRange(managerPathModels);

            this.page.Views.Add(
                GridViewBuilder.BuildGridView(
                    pageIndex,
                    pageSize,
                    dynamicPaths,
                    new List <GridColumnSpecification>()
            {
                GridColumnSpecification.GetNameColumn(), GridColumnSpecification.GetCustomNameColumn(), GridColumnSpecification.GetActionsColumn()
            },
                    GridViewModel.GRID_TITLES_EDISOVERY_PACKAGES)
                );

            // Now we build up the list of audit log entries.
            var auditLogEntries = this.auditLogStore.TranslateEntriesForDisplay(
                await this.auditLogStore.GetEntries(folder.Identifier, ModuleType.eDiscovery), userTimeZone
                );

            this.page.Views.Add(AuditLogViewBuilder.BuildPagedGridView(pageIndex, pageSize, auditLogEntries, folder.Identifier));
        }