public async Task <ModuleAction> GetAction_RssDetailAsync(string url, Guid moduleGuid, string AnchorId = null) { TextModule mod = (TextModule)await ModuleDefinition.LoadAsync(moduleGuid, AllowNone : true); if (mod == null) { return(null); } if (string.IsNullOrWhiteSpace(url)) { url = Manager.CurrentSite.MakeUrl(GetModuleUrl(moduleGuid)); } return(new ModuleAction(this) { Url = url, QueryArgs = new { ModuleGuid = moduleGuid, }, QueryArgsHR = new { Title = mod.Title.ToString().Truncate(80) }, AnchorId = AnchorId, Image = await CustomIconAsync("RssFeed.png"), Style = ModuleAction.ActionStyleEnum.NewWindow, LinkText = this.__ResStr("rssDetailLink", "RSS Feed Entry"), MenuText = this.__ResStr("rssDetailMenu", "RSS Feed Entry"), Tooltip = this.__ResStr("rssDetailTT", "Display the RSS feed entry"), Legend = this.__ResStr("rssDetailLegend", "Displays the RSS feed entry"), Category = ModuleAction.ActionCategoryEnum.Read, Mode = ModuleAction.ActionModeEnum.Any, Location = ModuleAction.ActionLocationEnum.NoAuto, }); }
public async Task <ModuleAction> GetAction_RssFeedAwait(Guid moduleGuid) { TextModule mod = (TextModule)await ModuleDefinition.LoadAsync(moduleGuid, AllowNone : true); if (mod == null) { return(null); } return(new ModuleAction(this) { Url = Utility.UrlFor(typeof(RssController), "RssFeed"), QueryArgs = new { ModuleGuid = moduleGuid, }, QueryArgsHR = new { Title = mod.Title.ToString() }, Image = await CustomIconAsync("RssFeed.png"), Style = ModuleAction.ActionStyleEnum.NewWindow, LinkText = this.__ResStr("rssLink", "RSS Feed"), MenuText = this.__ResStr("rssMenu", "RSS Feed"), Tooltip = this.__ResStr("rssTT", "Display the RSS Feed"), Legend = this.__ResStr("rssLegend", "Displays the RSS Feed"), Category = ModuleAction.ActionCategoryEnum.Read, Mode = ModuleAction.ActionModeEnum.Any, Location = ModuleAction.ActionLocationEnum.ModuleLinks, }); }