Adds a link "View" in "Admin/Index.cshtml" to see how it looks the Taxonomony on the front-end (#8323)

Fixes #8322
This commit is contained in:
Hermes Sbicego 2020-02-13 21:09:35 +01:00 committed by GitHub
parent 0469c3a2fd
commit 5015809444
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 2 deletions

View File

@ -53,6 +53,7 @@
</td>
<td>
@if (!taxonomyEntry.IsInternal) {
@Html.ItemDisplayLink(T("View").Text, taxonomyEntry.ContentItem) <text>|</text>
if (Authorizer.Authorize(Permissions.CreateTaxonomy)) {
@Html.ItemEditLink(T("Edit").Text, taxonomyEntry.ContentItem, new { ReturnUrl = Request.RawUrl }) <text>|</text>
}

View File

@ -41,11 +41,17 @@
<tr>
<td>
<input type="hidden" value="@Model.Terms[termIndex].Id" name="@Html.NameOf(m => m.Terms[ti].Id)" />
@* Tabs for levels *@ @for (var i = 1; i <= termEntry.GetLevels(); i++) { <span class="gap">&nbsp;</span> }
@* Tabs for levels *@ @for (var i = 1; i <= termEntry.GetLevels(); i++) {<span class="gap">&nbsp;</span>}
<input type="checkbox" value="true" name="@Html.NameOf(m => m.Terms[ti].IsChecked)" />
@Html.ItemDisplayLink(termEntry.Name, termEntry.ContentItem)
@if (Authorizer.Authorize(Permissions.EditTerm)) {
@Html.ItemEditLink(termEntry.Name, termEntry.ContentItem, new { returnUrl = Url.Action("Index", "TermAdmin", new { taxonomyId = Model.Taxonomy.Id }) })
}
else {
@Html.ItemDisplayText(termEntry.ContentItem)
}
</td>
<td>
@Html.ItemDisplayLink(T("View").Text, termEntry.ContentItem) <text>|</text>
@if (Authorizer.Authorize(Permissions.EditTerm)) {
@Html.ItemEditLink(T("Edit").Text, termEntry.ContentItem, new { returnUrl = Url.Action("Index", "TermAdmin", new { taxonomyId = Model.Taxonomy.Id }) }) <text>|</text>
@Html.ActionLink(T("Move").ToString(), "MoveTerm", new { taxonomyId = Model.Taxonomy.Id, termIds = termEntry.Id })