protected string FormatMessage(INewsEntry newsEntry, int tabId, int moduleId) { var resourceFile = Path.Combine(Const.LibraryInstallPath, "App_LocalResources", "SharedResources.resx"); var publishedOnDateText = Localization.GetString("PublishedOnDate.Text", resourceFile); var readMoreText = Localization.GetString("ReadMore.Text", resourceFile); return(HtmlUtils.StripTags(HttpUtility.HtmlDecode(newsEntry.Description), true) + $" / {publishedOnDateText}: {newsEntry.PublishedOnDate ().ToShortDateString ()}" + $" / {readMoreText}: {newsEntry.GetFullUrl (tabId, moduleId)}"); }
protected string FormatMessage(INewsEntry newsEntry, int tabId, int moduleId) { var resourceFile = Path.Combine(Const.LibraryInstallPath, "App_LocalResources", "SharedResources.resx"); var publishedOnDateText = Localization.GetString("PublishedOnDate.Text", resourceFile); var readMoreText = Localization.GetString("ReadMore.Text", resourceFile); return(newsEntry.Description + HttpUtility.HtmlEncode($"<p>{publishedOnDateText}: {newsEntry.PublishedOnDate ().ToShortDateString ()}</p>") + HttpUtility.HtmlEncode($"<p><a href=\"{newsEntry.GetUrl (tabId, moduleId)}\" target=\"_blank\">{readMoreText}...</a></p>")); }
protected MenuNode CreateMenuNode(INewsEntry newsEntry, MenuNode parentNode, ModuleInfo streamModule) { var node = new MenuNode(); node.Enabled = true; node.Parent = parentNode; node.Text = newsEntry.Title; node.Title = newsEntry.Title; node.Description = HtmlUtils.StripTags(HttpUtility.HtmlDecode(newsEntry.Description), false); node.Url = newsEntry.GetUrl(streamModule.TabID, streamModule.ModuleID); node.CommandName = "X-Date"; node.CommandArgument = newsEntry.PublishedOnDate().ToString(); if (newsEntry.AgentModule != null) { node.TabId = newsEntry.AgentModule.TabID; } return(node); }