mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2026-02-09 09:16:41 +08:00
Adding tabs to Alias admin UI for Managed/Unmanaged aliases.
This commit is contained in:
@@ -3,6 +3,7 @@ using Orchard.Localization;
|
|||||||
using Orchard.Security;
|
using Orchard.Security;
|
||||||
using Orchard.UI.Navigation;
|
using Orchard.UI.Navigation;
|
||||||
|
|
||||||
|
|
||||||
namespace Orchard.Alias {
|
namespace Orchard.Alias {
|
||||||
[OrchardFeature("Orchard.Alias.UI")]
|
[OrchardFeature("Orchard.Alias.UI")]
|
||||||
public class AdminMenu : INavigationProvider {
|
public class AdminMenu : INavigationProvider {
|
||||||
@@ -11,8 +12,13 @@ namespace Orchard.Alias {
|
|||||||
public string MenuName { get { return "admin"; } }
|
public string MenuName { get { return "admin"; } }
|
||||||
|
|
||||||
public void GetNavigation(NavigationBuilder builder) {
|
public void GetNavigation(NavigationBuilder builder) {
|
||||||
builder
|
builder.AddImageSet("aliases");
|
||||||
.Add(T("Aliases"), "4", item => item.Action("Index", "Admin", new { area = "Orchard.Alias" }).Permission(StandardPermissions.SiteOwner));
|
builder.Add(T("Aliases"), "1.4.1", menu => {
|
||||||
|
menu.LinkToFirstChild(true);
|
||||||
|
|
||||||
|
menu.Add(T("Unmanaged"), "1", item => item.Action("IndexUnmanaged", "Admin", new { area = "Orchard.Alias" }).Permission(StandardPermissions.SiteOwner).LocalNav());
|
||||||
|
menu.Add(T("Managed"), "2", item => item.Action("IndexManaged", "Admin", new { area = "Orchard.Alias" }).Permission(StandardPermissions.SiteOwner).LocalNav());
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -35,7 +35,7 @@ namespace Orchard.Alias.Controllers {
|
|||||||
public Localizer T { get; set; }
|
public Localizer T { get; set; }
|
||||||
public ILogger Logger { get; set; }
|
public ILogger Logger { get; set; }
|
||||||
|
|
||||||
public ActionResult Index(AdminIndexOptions options, PagerParameters pagerParameters) {
|
public ActionResult IndexUnmanaged(AdminIndexOptions options, PagerParameters pagerParameters) {
|
||||||
if (!Services.Authorizer.Authorize(StandardPermissions.SiteOwner, T("Not authorized to manage aliases")))
|
if (!Services.Authorizer.Authorize(StandardPermissions.SiteOwner, T("Not authorized to manage aliases")))
|
||||||
return new HttpUnauthorizedResult();
|
return new HttpUnauthorizedResult();
|
||||||
|
|
||||||
@@ -46,7 +46,7 @@ namespace Orchard.Alias.Controllers {
|
|||||||
options = new AdminIndexOptions();
|
options = new AdminIndexOptions();
|
||||||
|
|
||||||
|
|
||||||
var aliases = _aliasHolder.GetMaps().SelectMany(x => x.GetAliases());
|
var aliases = _aliasHolder.GetMaps().SelectMany(x => x.GetAliases()).Where(x => !x.IsManaged);
|
||||||
|
|
||||||
if (!String.IsNullOrWhiteSpace(options.Search)) {
|
if (!String.IsNullOrWhiteSpace(options.Search)) {
|
||||||
var invariantSearch = options.Search.ToLowerInvariant();
|
var invariantSearch = options.Search.ToLowerInvariant();
|
||||||
@@ -54,19 +54,6 @@ namespace Orchard.Alias.Controllers {
|
|||||||
}
|
}
|
||||||
|
|
||||||
aliases = aliases.ToList();
|
aliases = aliases.ToList();
|
||||||
|
|
||||||
switch (options.Filter) {
|
|
||||||
case AliasFilter.Managed:
|
|
||||||
aliases = aliases.Where(x => x.IsManaged);
|
|
||||||
break;
|
|
||||||
case AliasFilter.Unmanaged:
|
|
||||||
aliases = aliases.Where(x => !x.IsManaged);
|
|
||||||
break;
|
|
||||||
case AliasFilter.All:
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
throw new ArgumentOutOfRangeException();
|
|
||||||
}
|
|
||||||
var pagerShape = Services.New.Pager(pager).TotalItemCount(aliases.Count());
|
var pagerShape = Services.New.Pager(pager).TotalItemCount(aliases.Count());
|
||||||
|
|
||||||
switch (options.Order) {
|
switch (options.Order) {
|
||||||
@@ -82,7 +69,7 @@ namespace Orchard.Alias.Controllers {
|
|||||||
var model = new AdminIndexViewModel {
|
var model = new AdminIndexViewModel {
|
||||||
Options = options,
|
Options = options,
|
||||||
Pager = pagerShape,
|
Pager = pagerShape,
|
||||||
AliasEntries = aliases.Select(x => new AliasEntry() { Alias = x, IsChecked = false }).OrderBy(x => x.Alias.IsManaged).ToList()
|
AliasEntries = aliases.Select(x => new AliasEntry() { Alias = x, IsChecked = false }).ToList()
|
||||||
};
|
};
|
||||||
|
|
||||||
return View(model);
|
return View(model);
|
||||||
@@ -90,7 +77,7 @@ namespace Orchard.Alias.Controllers {
|
|||||||
|
|
||||||
[HttpPost]
|
[HttpPost]
|
||||||
[FormValueRequired("submit.BulkEdit")]
|
[FormValueRequired("submit.BulkEdit")]
|
||||||
public ActionResult Index(FormCollection input) {
|
public ActionResult IndexUnmanaged(FormCollection input) {
|
||||||
if (!Services.Authorizer.Authorize(StandardPermissions.SiteOwner, T("Not authorized to manage aliases")))
|
if (!Services.Authorizer.Authorize(StandardPermissions.SiteOwner, T("Not authorized to manage aliases")))
|
||||||
return new HttpUnauthorizedResult();
|
return new HttpUnauthorizedResult();
|
||||||
|
|
||||||
@@ -111,7 +98,48 @@ namespace Orchard.Alias.Controllers {
|
|||||||
default:
|
default:
|
||||||
throw new ArgumentOutOfRangeException();
|
throw new ArgumentOutOfRangeException();
|
||||||
}
|
}
|
||||||
return RedirectToAction("Index");
|
return RedirectToAction("IndexUnmanaged");
|
||||||
|
}
|
||||||
|
|
||||||
|
public ActionResult IndexManaged(AdminIndexOptions options, PagerParameters pagerParameters) {
|
||||||
|
if (!Services.Authorizer.Authorize(StandardPermissions.SiteOwner, T("Not authorized to manage aliases")))
|
||||||
|
return new HttpUnauthorizedResult();
|
||||||
|
|
||||||
|
var pager = new Pager(Services.WorkContext.CurrentSite, pagerParameters);
|
||||||
|
|
||||||
|
// default options
|
||||||
|
if (options == null)
|
||||||
|
options = new AdminIndexOptions();
|
||||||
|
|
||||||
|
|
||||||
|
var aliases = _aliasHolder.GetMaps().SelectMany(x => x.GetAliases()).Where(x => x.IsManaged);
|
||||||
|
|
||||||
|
if (!String.IsNullOrWhiteSpace(options.Search)) {
|
||||||
|
var invariantSearch = options.Search.ToLowerInvariant();
|
||||||
|
aliases = aliases.Where(x => x.Path.ToLowerInvariant().Contains(invariantSearch));
|
||||||
|
}
|
||||||
|
|
||||||
|
aliases = aliases.ToList();
|
||||||
|
|
||||||
|
var pagerShape = Services.New.Pager(pager).TotalItemCount(aliases.Count());
|
||||||
|
|
||||||
|
switch (options.Order) {
|
||||||
|
case AliasOrder.Path:
|
||||||
|
aliases = aliases.OrderBy(x => x.Path);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (pager.PageSize != 0) {
|
||||||
|
aliases = aliases.Skip(pager.GetStartIndex()).Take(pager.PageSize);
|
||||||
|
}
|
||||||
|
|
||||||
|
var model = new AdminIndexViewModel {
|
||||||
|
Options = options,
|
||||||
|
Pager = pagerShape,
|
||||||
|
AliasEntries = aliases.Select(x => new AliasEntry() { Alias = x, IsChecked = false }).ToList()
|
||||||
|
};
|
||||||
|
|
||||||
|
return View(model);
|
||||||
}
|
}
|
||||||
|
|
||||||
public ActionResult Add() {
|
public ActionResult Add() {
|
||||||
@@ -160,7 +188,7 @@ namespace Orchard.Alias.Controllers {
|
|||||||
|
|
||||||
Services.Notifier.Information(T("Alias {0} created", aliasPath));
|
Services.Notifier.Information(T("Alias {0} created", aliasPath));
|
||||||
|
|
||||||
return RedirectToAction("Index");
|
return RedirectToAction("IndexUnmanaged");
|
||||||
}
|
}
|
||||||
|
|
||||||
public ActionResult Edit(string path) {
|
public ActionResult Edit(string path) {
|
||||||
@@ -230,7 +258,7 @@ namespace Orchard.Alias.Controllers {
|
|||||||
|
|
||||||
Services.Notifier.Information(T("Alias {0} updated", path));
|
Services.Notifier.Information(T("Alias {0} updated", path));
|
||||||
|
|
||||||
return RedirectToAction("Index");
|
return RedirectToAction("IndexUnmanaged");
|
||||||
}
|
}
|
||||||
|
|
||||||
[HttpPost]
|
[HttpPost]
|
||||||
@@ -246,7 +274,7 @@ namespace Orchard.Alias.Controllers {
|
|||||||
|
|
||||||
Services.Notifier.Information(T("Alias {0} deleted", path));
|
Services.Notifier.Information(T("Alias {0} deleted", path));
|
||||||
|
|
||||||
return this.RedirectLocal(returnUrl, Url.Action("Index"));
|
return this.RedirectLocal(returnUrl, Url.Action("IndexUnmanaged"));
|
||||||
}
|
}
|
||||||
|
|
||||||
private string GetExistingPathForAlias(string aliasPath) {
|
private string GetExistingPathForAlias(string aliasPath) {
|
||||||
|
|||||||
@@ -75,7 +75,7 @@
|
|||||||
<Content Include="Views\Admin\Add.cshtml" />
|
<Content Include="Views\Admin\Add.cshtml" />
|
||||||
<Content Include="Views\Admin\Delete.cshtml" />
|
<Content Include="Views\Admin\Delete.cshtml" />
|
||||||
<Content Include="Views\Admin\Edit.cshtml" />
|
<Content Include="Views\Admin\Edit.cshtml" />
|
||||||
<Content Include="Views\Admin\Index.cshtml" />
|
<Content Include="Views\Admin\IndexUnmanaged.cshtml" />
|
||||||
<Content Include="Web.config" />
|
<Content Include="Web.config" />
|
||||||
<Compile Include="Implementation\Updater\AliasHolderUpdater.cs" />
|
<Compile Include="Implementation\Updater\AliasHolderUpdater.cs" />
|
||||||
<Compile Include="Implementation\Updater\AliasUpdateCursor.cs" />
|
<Compile Include="Implementation\Updater\AliasUpdateCursor.cs" />
|
||||||
@@ -117,7 +117,9 @@
|
|||||||
<Compile Include="Routes.cs" />
|
<Compile Include="Routes.cs" />
|
||||||
<Compile Include="ViewModels\AdminIndexViewModel.cs" />
|
<Compile Include="ViewModels\AdminIndexViewModel.cs" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup />
|
<ItemGroup>
|
||||||
|
<Content Include="Views\Admin\IndexManaged.cshtml" />
|
||||||
|
</ItemGroup>
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
|
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
|
||||||
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
|
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
|
||||||
|
|||||||
@@ -0,0 +1,74 @@
|
|||||||
|
@model AdminIndexViewModel
|
||||||
|
|
||||||
|
@using Orchard.Alias
|
||||||
|
@using Orchard.Alias.ViewModels
|
||||||
|
@using Orchard.Environment.Configuration
|
||||||
|
@using Orchard.Utility.Extensions
|
||||||
|
|
||||||
|
@{
|
||||||
|
var urlPrefix = WorkContext.Resolve<ShellSettings>().RequestUrlPrefix;
|
||||||
|
|
||||||
|
Layout.Title = T("Manage Aliases").Text;
|
||||||
|
var aliasService = WorkContext.Resolve<IAliasService>();
|
||||||
|
AdminIndexOptions options = Model.Options;
|
||||||
|
int index = -1;
|
||||||
|
|
||||||
|
var pageSizes = new List<int?>() { 10, 50, 100 };
|
||||||
|
var defaultPageSize = WorkContext.CurrentSite.PageSize;
|
||||||
|
if (!pageSizes.Contains(defaultPageSize)) {
|
||||||
|
pageSizes.Add(defaultPageSize);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@using (Html.BeginFormAntiForgeryPost()) {
|
||||||
|
@Html.ValidationSummary()
|
||||||
|
|
||||||
|
<fieldset class="bulk-actions">
|
||||||
|
<label for="filterResults">@T("Sort by:")</label>
|
||||||
|
<select id="filterResults" name="@Html.NameOf(m => m.Options.Order)">
|
||||||
|
@Html.SelectOption(options.Order, AliasOrder.Path, T("Path").ToString())
|
||||||
|
</select>
|
||||||
|
<input type="hidden" name="Page" value="1" />
|
||||||
|
<label for="pageSize">@T("Show:")</label>
|
||||||
|
<select id="pageSize" name="PageSize">
|
||||||
|
@Html.SelectOption((int)Model.Pager.PageSize, 0, T("All").ToString())
|
||||||
|
@foreach (int size in pageSizes.OrderBy(p => p)) {
|
||||||
|
@Html.SelectOption((int)Model.Pager.PageSize, size, size.ToString())
|
||||||
|
}
|
||||||
|
</select>
|
||||||
|
<button type="submit" name="submit.Filter" value="@T("Filter")">@T("Filter")</button>
|
||||||
|
</fieldset>
|
||||||
|
<fieldset>
|
||||||
|
<table class="items">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th scope="col">@T("Alias")</th>
|
||||||
|
<th scope="col">@T("Route")</th>
|
||||||
|
<th scope="col"> </th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
@foreach (var aliasEntry in Model.AliasEntries) {
|
||||||
|
var alias = aliasEntry.Alias;
|
||||||
|
index++;
|
||||||
|
var virtualPathData = aliasService.LookupVirtualPaths(alias.RouteValues.ToRouteValueDictionary(), ViewContext.HttpContext).FirstOrDefault();
|
||||||
|
|
||||||
|
if (virtualPathData == null) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
var url = virtualPathData.VirtualPath;
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<input type="hidden" value="@alias.Path" name="@Html.FieldNameFor(m => Model.AliasEntries[index].Alias.Path)" />
|
||||||
|
@Html.Link(alias.Path == String.Empty ? "/" : alias.Path, Href("~/" + urlPrefix + alias.Path))
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
@Html.Link(url, Href("~/" + urlPrefix + "/" + url))
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
}
|
||||||
|
</table>
|
||||||
|
|
||||||
|
@Display(Model.Pager)
|
||||||
|
</fieldset>
|
||||||
|
}
|
||||||
@@ -1,106 +1,91 @@
|
|||||||
@model AdminIndexViewModel
|
@model AdminIndexViewModel
|
||||||
|
|
||||||
@using Orchard.Alias
|
@using Orchard.Alias
|
||||||
@using Orchard.Alias.ViewModels
|
@using Orchard.Alias.ViewModels
|
||||||
@using Orchard.Environment.Configuration
|
@using Orchard.Environment.Configuration
|
||||||
@using Orchard.Utility.Extensions
|
@using Orchard.Utility.Extensions
|
||||||
|
|
||||||
@{
|
@{
|
||||||
var urlPrefix = WorkContext.Resolve<ShellSettings>().RequestUrlPrefix;
|
var urlPrefix = WorkContext.Resolve<ShellSettings>().RequestUrlPrefix;
|
||||||
|
|
||||||
Layout.Title = T("Manage Aliases").Text;
|
Layout.Title = T("Manage Aliases").Text;
|
||||||
var aliasService = WorkContext.Resolve<IAliasService>();
|
var aliasService = WorkContext.Resolve<IAliasService>();
|
||||||
AdminIndexOptions options = Model.Options;
|
AdminIndexOptions options = Model.Options;
|
||||||
int index = -1;
|
int index = -1;
|
||||||
|
|
||||||
var pageSizes = new List<int?>() { 10, 50, 100 };
|
var pageSizes = new List<int?>() { 10, 50, 100 };
|
||||||
var defaultPageSize = WorkContext.CurrentSite.PageSize;
|
var defaultPageSize = WorkContext.CurrentSite.PageSize;
|
||||||
if (!pageSizes.Contains(defaultPageSize)) {
|
if (!pageSizes.Contains(defaultPageSize)) {
|
||||||
pageSizes.Add(defaultPageSize);
|
pageSizes.Add(defaultPageSize);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@using (Html.BeginFormAntiForgeryPost()) {
|
@using (Html.BeginFormAntiForgeryPost()) {
|
||||||
@Html.ValidationSummary()
|
@Html.ValidationSummary()
|
||||||
<div class="manage">@Html.ActionLink(T("Add new Alias").Text, "Add", new { returnurl = HttpContext.Current.Request.RawUrl }, new { @class = "button primaryAction" })</div>
|
<div class="manage">@Html.ActionLink(T("Add new Alias").Text, "Add", new { returnurl = HttpContext.Current.Request.RawUrl }, new { @class = "button primaryAction" })</div>
|
||||||
|
|
||||||
<fieldset class="bulk-actions">
|
<fieldset class="bulk-actions">
|
||||||
<label for="publishActions">@T("Actions:")</label>
|
<label for="publishActions">@T("Actions:")</label>
|
||||||
<select id="publishActions" name="@Html.NameOf(m => m.Options.BulkAction)">
|
<select id="publishActions" name="@Html.NameOf(m => m.Options.BulkAction)">
|
||||||
@Html.SelectOption(options.BulkAction, AliasBulkAction.None, T("Choose action...").ToString())
|
@Html.SelectOption(options.BulkAction, AliasBulkAction.None, T("Choose action...").ToString())
|
||||||
@Html.SelectOption(options.BulkAction, AliasBulkAction.Delete, T("Delete").ToString())
|
@Html.SelectOption(options.BulkAction, AliasBulkAction.Delete, T("Delete").ToString())
|
||||||
</select>
|
</select>
|
||||||
<button type="submit" name="submit.BulkEdit" value="@T("Apply")">@T("Apply")</button>
|
<button type="submit" name="submit.BulkEdit" value="@T("Apply")">@T("Apply")</button>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
<fieldset class="bulk-actions">
|
<fieldset class="bulk-actions">
|
||||||
<label for="filterResults">@T("Sort by:")</label>
|
<label for="filterResults">@T("Sort by:")</label>
|
||||||
<select id="filterResults" name="@Html.NameOf(m => m.Options.Order)">
|
<select id="filterResults" name="@Html.NameOf(m => m.Options.Order)">
|
||||||
@Html.SelectOption(options.Order, AliasOrder.Path, T("Path").ToString())
|
@Html.SelectOption(options.Order, AliasOrder.Path, T("Path").ToString())
|
||||||
</select>
|
</select>
|
||||||
<label for="filterResults">@T("Filter:")</label>
|
<input type="hidden" name="Page" value="1" />
|
||||||
<select id="filterResults" name="@Html.NameOf(m => m.Options.Filter)">
|
<label for="pageSize">@T("Show:")</label>
|
||||||
@Html.SelectOption(Model.Options.Filter, AliasFilter.All, T("All").ToString())
|
<select id="pageSize" name="PageSize">
|
||||||
@Html.SelectOption(Model.Options.Filter, AliasFilter.Managed, T("Managed").ToString())
|
@Html.SelectOption((int)Model.Pager.PageSize, 0, T("All").ToString())
|
||||||
@Html.SelectOption(Model.Options.Filter, AliasFilter.Unmanaged, T("Unmanaged").ToString())
|
@foreach (int size in pageSizes.OrderBy(p => p)) {
|
||||||
</select>
|
@Html.SelectOption((int)Model.Pager.PageSize, size, size.ToString())
|
||||||
<input type="hidden" name="Page" value="1" />
|
}
|
||||||
<label for="pageSize">@T("Show:")</label>
|
</select>
|
||||||
<select id="pageSize" name="PageSize">
|
<button type="submit" name="submit.Filter" value="@T("Filter")">@T("Filter")</button>
|
||||||
@Html.SelectOption((int)Model.Pager.PageSize, 0, T("All").ToString())
|
</fieldset>
|
||||||
@foreach (int size in pageSizes.OrderBy(p => p)) {
|
<fieldset>
|
||||||
@Html.SelectOption((int)Model.Pager.PageSize, size, size.ToString())
|
<table class="items">
|
||||||
}
|
<thead>
|
||||||
</select>
|
<tr>
|
||||||
<button type="submit" name="submit.Filter" value="@T("Filter")">@T("Filter")</button>
|
<th scope="col" class="checkbox"><input type="checkbox" class="check-all" /></th>
|
||||||
</fieldset>
|
<th scope="col">@T("Alias")</th>
|
||||||
<fieldset>
|
<th scope="col">@T("Route")</th>
|
||||||
<table class="items">
|
<th scope="col"> </th>
|
||||||
<thead>
|
</tr>
|
||||||
<tr>
|
</thead>
|
||||||
<th scope="col" class="checkbox"><input type="checkbox" class="check-all" /></th>
|
@foreach (var aliasEntry in Model.AliasEntries) {
|
||||||
<th scope="col">@T("Alias")</th>
|
var alias = aliasEntry.Alias;
|
||||||
<th scope="col">@T("Route")</th>
|
index++;
|
||||||
<th scope="col">@T("Managed")</th>
|
var virtualPathData = aliasService.LookupVirtualPaths(alias.RouteValues.ToRouteValueDictionary(), ViewContext.HttpContext).FirstOrDefault();
|
||||||
<th scope="col"> </th>
|
|
||||||
</tr>
|
if (virtualPathData == null) {
|
||||||
</thead>
|
continue;
|
||||||
@foreach (var aliasEntry in Model.AliasEntries) {
|
}
|
||||||
var alias = aliasEntry.Alias;
|
|
||||||
index++;
|
var url = virtualPathData.VirtualPath;
|
||||||
var virtualPathData = aliasService.LookupVirtualPaths(alias.RouteValues.ToRouteValueDictionary(), ViewContext.HttpContext).FirstOrDefault();
|
<tr>
|
||||||
|
<td>
|
||||||
if (virtualPathData == null) {
|
<input type="hidden" value="@alias.Path" name="@Html.FieldNameFor(m => Model.AliasEntries[index].Alias.Path)" />
|
||||||
continue;
|
<input type="checkbox" value="true" name="@Html.FieldNameFor(m => Model.AliasEntries[index].IsChecked)" />
|
||||||
}
|
</td>
|
||||||
|
<td>
|
||||||
var url = virtualPathData.VirtualPath;
|
@Html.Link(alias.Path == String.Empty ? "/" : alias.Path, Href("~/" + urlPrefix + alias.Path))
|
||||||
<tr>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<input type="hidden" value="@alias.Path" name="@Html.FieldNameFor(m => Model.AliasEntries[index].Alias.Path)" />
|
@Html.Link(url, Href("~/" + urlPrefix + "/" + url))
|
||||||
@if (!alias.IsManaged) {
|
</td>
|
||||||
<input type="checkbox" value="true" name="@Html.FieldNameFor(m => Model.AliasEntries[index].IsChecked)" />
|
<td>
|
||||||
}
|
@Html.ActionLink(T("Edit").Text, "Edit", new { path = alias.Path == String.Empty ? "/" : alias.Path })
|
||||||
</td>
|
@Html.ActionLink(T("Delete").Text, "Delete", new { path = alias.Path }, new { itemprop = "UnsafeUrl RemoveUrl" })
|
||||||
<td>
|
</td>
|
||||||
@Html.Link(alias.Path == String.Empty ? "/" : alias.Path, Href("~/" + urlPrefix + alias.Path))
|
</tr>
|
||||||
</td>
|
}
|
||||||
<td>
|
</table>
|
||||||
@Html.Link(url, Href("~/" + urlPrefix + "/" + url))
|
|
||||||
</td>
|
@Display(Model.Pager)
|
||||||
<td>
|
</fieldset>
|
||||||
<input type="checkbox" checked="@alias.IsManaged" value="true" name="@Html.FieldNameFor(m => Model.AliasEntries[index].Alias.IsManaged)" disabled="disabled" />
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
@if (!alias.IsManaged) {
|
|
||||||
@Html.ActionLink(T("Edit").Text, "Edit", new { path = alias.Path == String.Empty ? "/" : alias.Path })
|
|
||||||
<text>|</text>
|
|
||||||
@Html.ActionLink(T("Delete").Text, "Delete", new { path = alias.Path }, new { itemprop = "UnsafeUrl RemoveUrl" })
|
|
||||||
}
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
}
|
|
||||||
</table>
|
|
||||||
|
|
||||||
@Display(Model.Pager)
|
|
||||||
</fieldset>
|
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user