[Fixes #6279] Adding confirmation for deleting taxonomies

This commit is contained in:
Sebastien Ros
2016-01-14 17:52:07 -08:00
parent 40db1e2a84
commit f17f2c3a93
2 changed files with 2 additions and 1 deletions

View File

@@ -66,6 +66,7 @@ namespace Orchard.Taxonomies.Controllers {
return RedirectToAction("Index");
}
[HttpPost]
public ActionResult Delete(int id) {
if (!Services.Authorizer.Authorize(Permissions.CreateTaxonomy, T("Couldn't delete taxonomy")))
return new HttpUnauthorizedResult();

View File

@@ -52,7 +52,7 @@
@if (!taxonomyEntry.IsInternal || Authorizer.Authorize(Orchard.Security.StandardPermissions.SiteOwner)) {
@Html.ItemEditLink(T("Edit").Text, taxonomyEntry.ContentItem) <text>|</text>
@Html.ActionLink(T("Terms").Text, "Index", "TermAdmin", new { taxonomyId = taxonomyEntry.Id }, new object { }) <text>|</text>
@Html.ActionLink(T("Delete").Text, "Delete", new { id = taxonomyEntry.Id }, new object { }) <text>|</text>
@Html.ActionLink(T("Delete").Text, "Delete", new { id = taxonomyEntry.Id }, new { itemprop = "RemoveUrl UnsafeUrl" }) <text>|</text>
@Html.ActionLink(T("Import").Text, "Import", new { id = taxonomyEntry.Id }, new object { })
}
</td>