public static string GetOpenWindowString(int siteId, string textBoxClientId)
 {
     return(LayerUtils.GetOpenScript2("上传图片", PageUtils.GetCmsUrl(siteId, nameof(ModalUploadImage), new NameValueCollection
     {
         { "textBoxClientID", textBoxClientId }
     }), 600, 560));
 }
 public static string GetOpenWindowString(int siteId, string attributeName)
 {
     return(LayerUtils.GetOpenScript2("插入视频", PageUtils.GetCmsUrl(siteId, nameof(ModalTextEditorInsertVideo), new NameValueCollection
     {
         { "AttributeName", attributeName }
     }), 600, 520));
 }
 public static string GetOpenWindowString(int siteId, string attributeName)
 {
     return(LayerUtils.GetOpenScript2("导入Word", PageUtils.GetCmsUrl(siteId, nameof(ModalTextEditorImportWord), new NameValueCollection
     {
         { "AttributeName", attributeName }
     }), 600, 400));
 }
 public static string GetOpenWindowStringWithTextBox(int siteId, string textBoxClientId)
 {
     return(LayerUtils.GetOpenScript2("裁切图片", PageUtils.GetCmsUrl(siteId, nameof(ModalCuttingImage), new NameValueCollection
     {
         { "textBoxClientID", textBoxClientId }
     })));
 }
 public static string GetOpenWindowStringToTextBox(int siteId, string textBoxClientId)
 {
     return(LayerUtils.GetOpenScript2("上传视频", PageUtils.GetCmsUrl(siteId, nameof(ModalUploadVideo), new NameValueCollection
     {
         { "TextBoxClientID", textBoxClientId }
     }), 520, 220));
 }
Esempio n. 6
0
 public static string GetOpenWindowStringToPreviewVideo(int siteId, string textBoxClientId)
 {
     return(LayerUtils.GetOpenScript2("预览视频", PageUtils.GetCmsUrl(siteId, nameof(ModalMessage), new NameValueCollection
     {
         { "type", TypePreviewVideo },
         { "textBoxClientID", textBoxClientId }
     }), 500, 500));
 }
Esempio n. 7
0
 public static string GetOpenWindowStringToTextBox(int siteId, EUploadType uploadType, string textBoxClientId)
 {
     return(LayerUtils.GetOpenScript2("上传附件", PageUtils.GetCmsUrl(siteId, nameof(ModalUploadFile), new NameValueCollection
     {
         { "uploadType", EUploadTypeUtils.GetValue(uploadType) },
         { "TextBoxClientID", textBoxClientId }
     }), 550, 250));
 }
 public static string GetOpenWindowString(SiteInfo siteInfo, string textBoxClientId)
 {
     return(LayerUtils.GetOpenScript2("选择图片",
                                      PageUtils.GetCmsUrl(siteInfo.Id, nameof(ModalSelectImage), new NameValueCollection
     {
         { "RootPath", "@" },
         { "CurrentRootPath", siteInfo.Additional.ImageUploadDirectoryName },
         { "TextBoxClientID", textBoxClientId }
     })));
 }
 public static string GetOpenWindowString(SiteInfo siteInfo, string textBoxClientId)
 {
     return(LayerUtils.GetOpenScript2("选择视频",
                                      PageUtils.GetCmsUrl(siteInfo.Id, nameof(ModalSelectVideo), new NameValueCollection
     {
         { "RootPath", "@" },
         { "CurrentRootPath", string.Empty },
         { "TextBoxClientID", textBoxClientId }
     })));
 }
Esempio n. 10
0
        public static string GetContentTitle(SiteInfo siteInfo, ContentInfo contentInfo, string pageUrl)
        {
            string url;
            var    title = ContentUtility.FormatTitle(contentInfo.GetString(ContentAttribute.GetFormatStringAttributeName(ContentAttribute.Title)), contentInfo.Title);

            var displayString = contentInfo.IsColor ? $"<span style='color:#ff0000;text-decoration:none' title='醒目'>{title}</span>" : title;

            if (contentInfo.IsChecked && contentInfo.ChannelId > 0)
            {
                url =
                    $"<a href='{PageRedirect.GetRedirectUrlToContent(siteInfo.Id, contentInfo.ChannelId, contentInfo.Id)}' target='blank'>{displayString}</a>";
            }
            else
            {
                var layerUrl =
                    $@"contentsLayerView.cshtml?siteId={siteInfo.Id}&channelId={-contentInfo.ChannelId}&contentId={contentInfo.Id}";
                //ModalContentView.GetOpenWindowString(siteInfo.Id, contentInfo.ChannelId, contentInfo.Id, pageUrl)
                url =
                    $@"<a href=""javascript:;"" onclick=""{LayerUtils.GetOpenScript2("查看内容", layerUrl)}"">{displayString}</a>";
            }

            var image = string.Empty;

            if (contentInfo.IsRecommend)
            {
                image += "&nbsp;<img src='../pic/icon/recommend.gif' title='推荐' align='absmiddle' border=0 />";
            }
            if (contentInfo.IsHot)
            {
                image += "&nbsp;<img src='../pic/icon/hot.gif' title='热点' align='absmiddle' border=0 />";
            }
            if (contentInfo.IsTop)
            {
                image += "&nbsp;<img src='../pic/icon/top.gif' title='置顶' align='absmiddle' border=0 />";
            }
            if (contentInfo.ReferenceId > 0)
            {
                if (contentInfo.GetString(ContentAttribute.TranslateContentType) == ETranslateContentType.ReferenceContent.ToString())
                {
                    image += "&nbsp;<img src='../pic/icon/reference.png' title='引用内容' align='absmiddle' border=0 />(引用内容)";
                }
                else if (contentInfo.GetString(ContentAttribute.TranslateContentType) != ETranslateContentType.ReferenceContent.ToString())
                {
                    image += "&nbsp;<img src='../pic/icon/reference.png' title='引用地址' align='absmiddle' border=0 />(引用地址)";
                }
            }
            if (!string.IsNullOrEmpty(contentInfo.GetString(ContentAttribute.LinkUrl)))
            {
                image += "&nbsp;<img src='../pic/icon/link.png' title='外部链接' align='absmiddle' border=0 />";
            }
            if (!string.IsNullOrEmpty(contentInfo.GetString(BackgroundContentAttribute.ImageUrl)))
            {
                var imageUrl         = PageUtility.ParseNavigationUrl(siteInfo, contentInfo.GetString(BackgroundContentAttribute.ImageUrl), true);
                var openWindowString = ModalMessage.GetOpenWindowString(siteInfo.Id, "预览图片", $"<img src='{imageUrl}' />", 500, 500);
                image +=
                    $@"&nbsp;<a href=""javascript:;"" onclick=""{openWindowString}""><img src='../assets/icons/img.gif' title='预览图片' align='absmiddle' border=0 /></a>";
            }
            if (!string.IsNullOrEmpty(contentInfo.GetString(BackgroundContentAttribute.VideoUrl)))
            {
                var openWindowString = ModalMessage.GetOpenWindowStringToPreviewVideoByUrl(siteInfo.Id, contentInfo.GetString(BackgroundContentAttribute.VideoUrl));
                image +=
                    $@"&nbsp;<a href=""javascript:;"" onclick=""{openWindowString}""><img src='../pic/icon/video.png' title='预览视频' align='absmiddle' border=0 /></a>";
            }
            if (!string.IsNullOrEmpty(contentInfo.GetString(BackgroundContentAttribute.FileUrl)))
            {
                image += "&nbsp;<img src='../pic/icon/attachment.gif' title='附件' align='absmiddle' border=0 />";
            }
            return(url + image);
        }