Ejemplo n.º 1
0
        public ActionResult Create()
        {
            //if (!Services.Authorizer.Authorize(Permissions.ManageNewsletterDefinitions, T("Not allowed to create newsletters")))
            //    return new HttpUnauthorizedResult();

            NewsletterDefinitionPart newsletterDefinition = Services.ContentManager.New <NewsletterDefinitionPart>("NewsletterDefinition");

            if (newsletterDefinition == null)
            {
                return(HttpNotFound());
            }

            dynamic model = Services.ContentManager.BuildEditor(newsletterDefinition);

            // Casting to avoid invalid (under medium trust) reflection over the protected View method and force a static invocation.
            return(View((object)model));
        }
Ejemplo n.º 2
0
 public static string NewsLetterSubscribers(this UrlHelper urlHelper, NewsletterDefinitionPart newsletterDefinitionPart)
 {
     return(urlHelper.Action("Index", "SubscribersAdmin", new { newsletterId = newsletterDefinitionPart.Id, area = "Laser.Orchard.NewsLetters" }));
 }
Ejemplo n.º 3
0
 public static string NewsLetterRemove(this UrlHelper urlHelper, NewsletterDefinitionPart newsletterDefinitionPart)
 {
     return(urlHelper.Action("Remove", "NewsLetterAdmin", new { newsletterId = newsletterDefinitionPart.Id, area = "Laser.Orchard.NewsLetters" }));
 }