private IList<string> GetBreadCrumbs(Dictionary<string, IWebItem> products, FeedMin f) { var result = new List<string>(); if (f.Product == "projects") { if (f.Id.StartsWith("taskComment")) { result.Add(f.AdditionalInfo2); } else if (f.Module == "projects") { result.Add(f.Title); } else { result.Add(f.AdditionalInfo); } } else if (f.Product == "community") { if (f.Module == "blogs" && products.ContainsKey("community-blogs")) { result.Add(products["community-blogs"].Name); } else if (f.Module == "forums" && products.ContainsKey("community-forum")) { result.Add(products["community-forum"].Name); } else if (f.Module == "bookmarks" && products.ContainsKey("community-bookmarking")) { result.Add(products["community-bookmarking"].Name); } else if (f.Module == "events" && products.ContainsKey("community-news")) { result.Add(products["community-news"].Name); } } if (result.Count == 0) { result.Add(string.Empty); } return result .Select(s => string.IsNullOrEmpty(s) ? " " : s) .ToList(); }
private string getWhatsNewActionText(FeedMin feed) { if (feed.Module == ASC.Feed.Constants.BookmarksModule) return WebstudioPatternResource.ActionCreateBookmark; else if (feed.Module == ASC.Feed.Constants.BlogsModule) return WebstudioPatternResource.ActionCreateBlog; else if (feed.Module == ASC.Feed.Constants.ForumsModule) { if (feed.Item == "forumTopic") return WebstudioPatternResource.ActionCreateForum; if (feed.Item == "forumPost") return WebstudioPatternResource.ActionCreateForumPost; if (feed.Item == "forumPoll") return WebstudioPatternResource.ActionCreateForumPoll; } else if (feed.Module == ASC.Feed.Constants.EventsModule) return WebstudioPatternResource.ActionCreateEvent; else if (feed.Module == ASC.Feed.Constants.ProjectsModule) return WebstudioPatternResource.ActionCreateProject; else if (feed.Module == ASC.Feed.Constants.MilestonesModule) return WebstudioPatternResource.ActionCreateMilestone; else if (feed.Module == ASC.Feed.Constants.DiscussionsModule) return WebstudioPatternResource.ActionCreateDiscussion; else if (feed.Module == ASC.Feed.Constants.TasksModule) return WebstudioPatternResource.ActionCreateTask; else if (feed.Module == ASC.Feed.Constants.CommentsModule) return WebstudioPatternResource.ActionCreateComment; else if (feed.Module == ASC.Feed.Constants.CrmTasksModule) return WebstudioPatternResource.ActionCreateTask; else if (feed.Module == ASC.Feed.Constants.ContactsModule) return WebstudioPatternResource.ActionCreateContact; else if (feed.Module == ASC.Feed.Constants.DealsModule) return WebstudioPatternResource.ActionCreateDeal; else if (feed.Module == ASC.Feed.Constants.CasesModule) return WebstudioPatternResource.ActionCreateCase; else if (feed.Module == ASC.Feed.Constants.FilesModule) return WebstudioPatternResource.ActionCreateFile; else if (feed.Module == ASC.Feed.Constants.FoldersModule) return WebstudioPatternResource.ActionCreateFolder; return ""; }