public static MvcHtmlString TagCloud(this HtmlHelper origin, Developer dev) { List <string> nuage = new List <string>(); //Je mets tout dans une liste de string //je récupère les langages de notre dev List <ITLang> langs = ITLang.getInfosItLangs() .Where(l => l.Developer.Where(d => d.IdDev == dev.IdDev).Count() > 0).ToList(); foreach (ITLang item in langs) { nuage.Add(item.ITLabel); } //TODO : add css and struct to create tag cloud TagBuilder ta = new TagBuilder("p"); foreach (string item in nuage) { TagBuilder tli = new TagBuilder("p"); tli.InnerHtml = item; ta.InnerHtml += tli.ToString(); } return(new MvcHtmlString(ta.ToString())); }
// // GET: /Home/ public ActionResult Index() { Session["CurrentController"] = this; langCategDev HM = new langCategDev() { LstCateg = Categories.getInfosCategs(), LstLang = ITLang.getInfosItLangs(), LstDev = Developer.ChargerTousLesDev(), }; return(View(HM)); }