public ActionResult Create() { if (!Services.Authorizer.Authorize(Permissions.ManageAdvertise, T("Not allowed to create advertises"))) { return(new HttpUnauthorizedResult()); } AdvertisePart advertise = Services.ContentManager.New <AdvertisePart>("Advertise"); if (advertise == null) { return(HttpNotFound()); } var model = Services.ContentManager.BuildEditor(advertise); return(View(model)); }
public static string AdvertiseRemove(this UrlHelper urlHelper, AdvertisePart advertisePart) { return(urlHelper.Action("Remove", "AdvertiseAdmin", new { advertiseId = advertisePart.Id, area = "Orchard.Advertise" })); }