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())); }
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 languages de notre dev List <ITLang> langs = ITLang.ChargerToutesLesITLang() .Where(l => l.Developers.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("div"); ta.AddCssClass("Cloud"); TagBuilder tul = new TagBuilder("ul"); tul.AddCssClass("tags"); pos = new List <int>(); foreach (string item in nuage) { TagBuilder tli = new TagBuilder("li"); tli.AddCssClass("tag" + randomstyle()); tli.InnerHtml = item; tul.InnerHtml += tli.ToString(); } ta.InnerHtml = tul.ToString(); return(new MvcHtmlString(ta.ToString())); }
// // GET: /Dev/ public ActionResult Details(int id) { Session["CurrentController"] = this; BoiteLangCateg langCateg = new BoiteLangCateg(); langCateg.LstCateg = Categories.ChargerToutesLesCategories(); langCateg.LstLang = ITLang.ChargerLangues(); langCateg.LstDev = Developer.ChargerTous(); langCateg.SelectedDev = Developer.getInfo(id); return(View(langCateg)); }
// // GET: /Home/ public ActionResult Index() { Session["CurrentController"] = this; langCategDev HM = new langCategDev() { LstCateg = Categories.getInfosCategs(), LstLang = ITLang.getInfosItLangs(), LstDev = Developer.ChargerTousLesDev(), }; return(View(HM)); }
// // GET: /Home/ public ActionResult Index() { Session["CurrentController"] = this; BoiteLangCateg langCateg = new BoiteLangCateg(); langCateg.LstCateg = Categories.ChargerToutesLesCategories(); langCateg.LstLang = ITLang.ChargerLangues(); langCateg.LstDev = Developer.ChargerTous(); return(View(langCateg)); }
// // GET: /Home/ public ActionResult Index() { Session["CurrentController"] = this; HomeModel HM = new HomeModel() { lstCateg = Categories.ChargerToutesLesCategories(), lstLangs = ITLang.ChargerToutesLesITLang(), lstDev = Developer.ChargerTousLesDev() }; return(View("Index", HM)); }
// // GET: /Dev/ public ActionResult Details(int id) { Session["CurrentController"] = this; DetailsModel Current = new DetailsModel() { lstCateg = Categories.ChargerToutesLesCategories(), lstLangs = ITLang.ChargerToutesLesITLang(), lstDev = Developer.ChargerTousLesDev(), CurrentDev = Developer.ChargerUnDev(id) }; return(View(Current)); }