mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-14 10:54:50 +08:00
Merge pull request #6180 from wharri220/patch-2
Prevent terms creationg when taxonomy doesn't exist
This commit is contained in:
@@ -42,7 +42,9 @@
|
||||
}
|
||||
</ul>
|
||||
|
||||
@if (!Model.Terms.Any() && AuthorizedFor(Orchard.Taxonomies.Permissions.CreateTerm)) {
|
||||
@if (Model.TaxonomyId == 0) {
|
||||
<p>@T("Your haven't specified a taxonomy for {0}", Model.DisplayName)</p>
|
||||
}else if (!Model.Terms.Any() && AuthorizedFor(Orchard.Taxonomies.Permissions.CreateTerm)) {
|
||||
<div class="no-terms">
|
||||
@T("There are no terms defined for {0} yet.", Model.DisplayName)
|
||||
<a href="@Url.Action("Index", "TermAdmin", new { taxonomyId = Model.TaxonomyId, area = "Orchard.Taxonomies" })">@T("Create some terms")</a>
|
||||
|
Reference in New Issue
Block a user