Esempio n. 1
0
        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.ChargerLangues()
                                  .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("p");

            foreach (string item in nuage)
            {
                TagBuilder tli = new TagBuilder("p");
                tli.InnerHtml = item;
                ta.InnerHtml += tli.ToString();
            }
            return(new MvcHtmlString(ta.ToString()));
        }
Esempio n. 2
0
        //
        // 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));
        }
Esempio n. 3
0
        //
        // 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));
        }