Exemplo n.º 1
0
        public ActionResult _Index(string tabId, int parentId, GridCommand command)
        {
            var serviceResult = ArticleVersionService.List(parentId, command.GetListCommand());
            var result        = Mapper.Map <List <ArticleVersion>, List <ArticleVersionListItem> >(serviceResult);

            return(new TelerikResult(result, result.Count));
        }
Exemplo n.º 2
0
        public ActionResult _MultipleSelect(string tabId, int parentId, string IDs, GridCommand command)
        {
            var selectedSiteIDs = Converter.ToInt32Collection(IDs, ',');
            var serviceResult   = SiteService.List(command.GetListCommand(), selectedSiteIDs);

            return(new TelerikResult(serviceResult.Data, serviceResult.TotalRecords));
        }
Exemplo n.º 3
0
        public ActionResult _SelectPages(string tabId, int id, GridCommand command, int parentId)
        {
            var template      = _pageService.ReadPageTemplateProperties(parentId);
            var serviceResult = _pageService.ListPagesForSite(command.GetListCommand(), template.SiteId, id);

            return(new TelerikResult(serviceResult.Data, serviceResult.TotalRecords));
        }
Exemplo n.º 4
0
        public ActionResult _Index(string tabId, int parentId, GridCommand command, [Bind(Prefix = "searchQuery")][ModelBinder(typeof(JsonStringModelBinder <ContentListFilter>))] ContentListFilter filter)
        {
            filter        = filter ?? ContentListFilter.Empty;
            filter.SiteId = parentId > 0 ? (int?)parentId : null;
            var serviceResult = ContentService.List(filter, command.GetListCommand());

            return(new TelerikResult(serviceResult.Data, serviceResult.TotalRecords));
        }
Exemplo n.º 5
0
        public ActionResult _VirtualIndex(string tabId, int parentId, GridCommand command)
        {
            var normFilter = ContentListFilter.Empty;

            normFilter.SiteId = parentId;
            var serviceResult = VirtualContentService.List(normFilter, command.GetListCommand());

            return(new TelerikResult(serviceResult.Data, serviceResult.TotalRecords));
        }
Exemplo n.º 6
0
        public ActionResult _Index(
            string tabId,
            int parentId,
            GridCommand command,
            [Bind(Prefix = "searchQuery")][ModelBinder(typeof(JsonStringModelBinder <UserListFilter>))] UserListFilter filter)
        {
            var serviceResult = _service.List(command.GetListCommand(), filter);

            return(new TelerikResult(serviceResult.Data, serviceResult.TotalRecords));
        }
Exemplo n.º 7
0
        public ActionResult _MultipleSelect(
            string tabId,
            string IDs,
            GridCommand command,
            [Bind(Prefix = "searchQuery")][ModelBinder(typeof(JsonStringModelBinder <UserListFilter>))] UserListFilter filter)
        {
            var selectedIDs   = Converter.ToInt32Collection(IDs, ',');
            var serviceResult = _service.List(command.GetListCommand(), filter, selectedIDs);

            return(new TelerikResult(serviceResult.Data, serviceResult.TotalRecords));
        }
Exemplo n.º 8
0
        public ActionResult _ButtonTrace(GridCommand command)
        {
            var list = _buttonTraceService.GetPage(command.GetListCommand());
            var data = list.Data.Select(r =>
            {
                r.ButtonName = Translator.Translate(r.ButtonName);
                r.TabName    = Translator.Translate(r.TabName);
                return(r);
            });

            return(new TelerikResult(data, list.TotalRecords));
        }
Exemplo n.º 9
0
        public ActionResult _SelectForField(
            string tabId,
            int parentId,
            int id,
            GridCommand command,
            [Bind(Prefix = "searchQuery")][ModelBinder(typeof(JsonStringModelBinder <ContentListFilter>))] ContentListFilter filter)
        {
            filter        = filter ?? new ContentListFilter();
            filter.SiteId = parentId;
            var serviceResult = ContentService.ListForField(filter, command.GetListCommand(), id);

            return(new TelerikResult(serviceResult.Data, serviceResult.TotalRecords));
        }
Exemplo n.º 10
0
        public ActionResult _Actions(GridCommand command, [Bind(Prefix = "searchQuery")][ModelBinder(typeof(JsonStringModelBinder <BackendActionLogFilter>))] BackendActionLogFilter filter)
        {
            var list = _actionLogService.GetLogPage(command.GetListCommand(), filter);
            var data = list.Data.Select(r =>
            {
                r.ActionTypeName = Translator.Translate(r.ActionTypeName);
                r.ActionName     = Translator.Translate(r.ActionName);
                r.EntityTypeName = Translator.Translate(r.EntityTypeName);
                return(r);
            });

            return(new TelerikResult(data, list.TotalRecords));
        }
Exemplo n.º 11
0
        public ActionResult _MultipleSelectForUnion(
            string tabId,
            int parentId,
            string IDs,
            GridCommand command,
            [Bind(Prefix = "searchQuery")][ModelBinder(typeof(JsonStringModelBinder <ContentListFilter>))] ContentListFilter filter)
        {
            filter        = filter ?? new ContentListFilter();
            filter.SiteId = parentId;
            var serviceResult = ContentService.ListForUnion(filter, command.GetListCommand(), Converter.ToInt32Collection(IDs, ','));

            return(new TelerikResult(serviceResult.Data, serviceResult.TotalRecords));
        }
Exemplo n.º 12
0
        public ActionResult _ArchiveIndex(
            string tabId,
            int parentId,
            GridCommand command,
            [ModelBinder(typeof(JsonStringModelBinder <IList <ArticleSearchQueryParam> >))] IList <ArticleSearchQueryParam> searchQuery,
            [ModelBinder(typeof(JsonStringModelBinder <IList <ArticleContextQueryParam> >))] IList <ArticleContextQueryParam> contextQuery,
            string customFilter,
            bool?onlyIds,
            int[] filterIds)
        {
            var ftsParser     = DependencyResolver.Current.GetService <ArticleFullTextSearchQueryParser>();
            var serviceResult = ArticleService.List(parentId, new int[0], command.GetListCommand(), searchQuery, contextQuery, customFilter, ftsParser, onlyIds, filterIds);

            return(new TelerikResult(serviceResult.Data, serviceResult.TotalRecords));
        }
Exemplo n.º 13
0
        public ActionResult _Files(GridCommand command, int gridParentId, [ModelBinder(typeof(JsonStringModelBinder <LibraryFileFilter>))] LibraryFileFilter searchQuery)
        {
            var serviceResult = ContentService.GetFileList(command.GetListCommand(), gridParentId, searchQuery);

            return(new TelerikResult(serviceResult.Data, serviceResult.TotalRecords));
        }
Exemplo n.º 14
0
        public ActionResult _Index(string tabId, int parentId, GridCommand command)
        {
            var serviceResult = _workflowService.GetWorkflowsBySiteId(command.GetListCommand(), parentId);

            return(new TelerikResult(serviceResult.Data, serviceResult.TotalRecords));
        }
Exemplo n.º 15
0
        public ActionResult _IndexPageObjects(string tabId, int parentId, GridCommand command)
        {
            var serviceResult = _objectService.GetPageObjectsByPageId(command.GetListCommand(), parentId);

            return(new TelerikResult(serviceResult.Data, serviceResult.TotalRecords));
        }
Exemplo n.º 16
0
        public ActionResult _SearchInArticles(string tabId, int parentId, int id, GridCommand command, string searchQuery)
        {
            var searchResult = _searchInArticlesService.SearchInArticles(id, QPContext.CurrentUserId, searchQuery, command.GetListCommand(), out var totalRecord);

            return(new TelerikResult(searchResult, totalRecord));
        }
Exemplo n.º 17
0
        public ActionResult _IndexTemplates(string tabId, int parentId, GridCommand command)
        {
            var serviceResult = _pageTemplateService.GetPageTemplatesBySiteId(command.GetListCommand(), parentId);

            return(new TelerikResult(serviceResult.Data, serviceResult.TotalRecords));
        }
Exemplo n.º 18
0
        public ActionResult _Index(string tabId, int parentId, GridCommand command)
        {
            var serviceResult = SiteService.List(command.GetListCommand());

            return(new TelerikResult(serviceResult.Data, serviceResult.TotalRecords));
        }
Exemplo n.º 19
0
        public ActionResult _IndexTemplateObjectFormats(string tabId, int parentId, GridCommand command)
        {
            var serviceResult = _formatService.GetTemplateObjectFormatsByObjectId(command.GetListCommand(), parentId);

            return(new TelerikResult(serviceResult.Data, serviceResult.TotalRecords));
        }
Exemplo n.º 20
0
        public ActionResult _MultipleSelect(
            string tabId,
            int parentId,
            string IDs,
            GridCommand command,
            [ModelBinder(typeof(JsonStringModelBinder <IList <ArticleSearchQueryParam> >))] IList <ArticleSearchQueryParam> searchQuery,
            string customFilter,
            bool?onlyIds)
        {
            var ftsParser          = DependencyResolver.Current.GetService <ArticleFullTextSearchQueryParser>();
            var selectedArticleIDs = Converter.ToInt32Collection(IDs, ',');
            var serviceResult      = ArticleService.List(parentId, selectedArticleIDs, command.GetListCommand(), searchQuery, null, customFilter, ftsParser, onlyIds);

            return(new TelerikResult(serviceResult.Data, serviceResult.TotalRecords));
        }
Exemplo n.º 21
0
        public ActionResult _MultipleSelectForWorkflow(string tabId, string IDs, GridCommand command, int parentId)
        {
            var serviceResult = _statusTypeService.ListForWorkflow(command.GetListCommand(), Converter.ToInt32Collection(IDs, ','), parentId);

            return(new TelerikResult(serviceResult.Data, serviceResult.TotalRecords));
        }
Exemplo n.º 22
0
        public ActionResult _FailedSessions(GridCommand command)
        {
            var list = _sessionLogService.GetFailedSessionPage(command.GetListCommand());

            return(new TelerikResult(list.Data, list.TotalRecords));
        }
Exemplo n.º 23
0
        public ActionResult _RemovedEntities(GridCommand command)
        {
            var list = _removedEntitiesService.GetPage(command.GetListCommand());

            return(new TelerikResult(list.Data, list.TotalRecords));
        }
Exemplo n.º 24
0
        public ActionResult _MultipleSelectForExportExpanded(string tabId, int parentId, string IDs, GridCommand command)
        {
            var serviceResult = FieldService.ListForExportExpanded(command.GetListCommand(), parentId, Converter.ToInt32Collection(IDs, ','));

            return(new TelerikResult(serviceResult.Data, serviceResult.TotalRecords));
        }
Exemplo n.º 25
0
        public ActionResult _Parameters(string tabId, int parentId, int id, int?templateId, int?pageId, string filterVal, GridCommand command)
        {
            var serviceResult = _pageTemplateService.ObjectSearch(command.GetListCommand(), id, templateId, pageId, filterVal);

            return(new TelerikResult(serviceResult.Data, serviceResult.TotalRecords));
        }
Exemplo n.º 26
0
        public ActionResult _Select(string tabId, int id, GridCommand command)
        {
            var serviceResult = _service.List(command.GetListCommand(), new[] { id });

            return(new TelerikResult(serviceResult.Data, serviceResult.TotalRecords));
        }
Exemplo n.º 27
0
        public ActionResult _ArticlesForApproval(string tabId, int parentId, int id, GridCommand command)
        {
            var serviceResult = ArticleService.ArticlesForApproval(command.GetListCommand());

            return(new TelerikResult(serviceResult.Data, serviceResult.TotalRecords));
        }
        public virtual ActionResult _ChildIndex(string tabId, int parentId, int?userId, int?groupId, GridCommand command)
        {
            var serviceResult = ChildContentService.List(parentId, groupId, userId, command.GetListCommand());

            return(new TelerikResult(serviceResult.Data, serviceResult.TotalRecords));
        }
Exemplo n.º 29
0
        public ActionResult _Index(string tabId, int parentId, GridCommand command)
        {
            var serviceResult = _visualEditorService.GetVisualEditorPlugins(command.GetListCommand(), parentId);

            return(new TelerikResult(serviceResult.Data, serviceResult.TotalRecords));
        }
Exemplo n.º 30
0
        public ActionResult _StatusHistoryList(string tabId, int parentId, int id, GridCommand command)
        {
            var result = ArticleService.ArticleStatusHistory(command.GetListCommand(), parentId);

            return(new TelerikResult(result.Data, result.TotalRecords));
        }