コード例 #1
0
        public JsonResult ParTextByDocParId(int docLangId, int langIdFromDoc, int docParId, string searchText, bool?isArticle)
        {
            string content;

            if (isArticle.HasValue && isArticle.Value)
            {
                content = Doc.GetDocArtTextByDocParId(docLangId, docParId, this.Language.Id,
                                                      langIdFromDoc,
                                                      searchText);
            }
            else
            {
                content = Doc.GetDocParByParId(docLangId, docParId, this.Language.Id,
                                               langIdFromDoc,
                                               searchText,
                                               WebAppHelper.AppRootFolder);
            }


            var linkRewriter = new DocLinksRewriter(this.Language.Id, WebAppHelper.AppRootFolder, this.UserData.OpenDocumentsInNewTab, this.NationalLegislationMapPath);

            content = linkRewriter.RewriteDocInLinks(content, "inline_link", true);

            return(this.Json(new { articleContent = content }));
        }
コード例 #2
0
        public JsonResult ArticlesCorrelation(int docParId, int langId)
        {
            var    articlesCorrelation = Doc.GetArticlesCorrelation(this.UserData.UserId, this.Language.Id, docParId, langId).ToList();
            var    linkRewriter        = new DocLinksRewriter(this.Language.Id, WebAppHelper.AppRootFolder, this.UserData.OpenDocumentsInNewTab, this.NationalLegislationMapPath);
            string content             = this.GetViewString("_ArticlesCorrelation", articlesCorrelation, false);

            content = linkRewriter.RewriteDocInLinks(content, "inline_link", true);
            return(this.Json(new { articlesCorrelation = content }));
        }
コード例 #3
0
        private string RewriteHtmlOldRefDocs(IEnumerable <RefDocsPair> refDocsArticle)
        {
            string linksHtml    = this.GetViewString("_RefDocsPartialList", refDocsArticle, false);
            var    linkRewriter = new DocLinksRewriter(this.Language.Id, WebAppHelper.AppRootFolder, this.UserData.OpenDocumentsInNewTab, this.NationalLegislationMapPath);

            linksHtml = linkRewriter.RewriteDocInLinks(linksHtml, "inline_link", true);

            return(linksHtml);
        }
コード例 #4
0
        public ActionResult GetNewRefDocsListArticle(int docLangId, int[] docParIds, int langId)
        {
            var refDocsArticle = Doc.GetNewArticleRefDocs(this.UserData.UserId, docLangId, this.Language.Id, docParIds, langId);

            this.ViewBag.DocLangId = docLangId;
            string linksHtml    = this.GetViewString("_RefDocsListArticle", refDocsArticle, false);
            var    linkRewriter = new DocLinksRewriter(this.Language.Id, WebAppHelper.AppRootFolder, this.UserData.OpenDocumentsInNewTab, this.NationalLegislationMapPath);

            linksHtml = linkRewriter.RewriteDocInLinks(linksHtml, "inline_link", true);

            return(this.Content(linksHtml));
        }