public ActionResult Preview(Project project, ProjectItem[] items, ProjectItemType type)
 {
     return View(new Model.View
     {
         Project = project,
         Item = items.FirstOrDefault(),
         Type = type,
         Role = this.ProjectProvider.GetRole(project.ID, MvcApplication.CurrentUser.ID)
     });
 }
        /// <summary>
        /// Ve el concepto en vista previa
        /// </summary>
        /// <param name="project">Proyecto</param>
        /// <param name="items">Elemento</param>
        /// <param name="type">Tipo de elemento</param>
        /// <returns></returns>
        public ActionResult Preview(Project project, ProjectItem[] items, ProjectItemType type)
        {
            if (this.GetRole(project.ID) != RoleType.Developer && !items.FirstOrDefault().IsPublic)
                return null;


            return View(new Model.View
            {
                Project = project,
                Item = items.FirstOrDefault(),
                Type = type,
                Role = this.ProjectProvider.GetRole(project.ID, MvcApplication.CurrentUser.ID)
            });
        }
        public ActionResult PreviewResume(Project project, ProjectItem[] items, ProjectItemType type)
        {
            var role = this.ProjectProvider.GetRole(project.ID, MvcApplication.CurrentUser.ID);
            if (role != RoleType.Developer)
            {
                items = (from i in items
                         where i.IsPublic
                         select i).ToArray();
            }

            return View(new Model.Preview
            {
                Project = project,
                Items = items,
                Type = type,
                
            });
        }