Fixing widget layer editing and tidying up the widget management index template.

work item: 16837

--HG--
branch : dev
This commit is contained in:
Nathan Heskew
2010-11-24 23:31:49 -08:00
parent a7a6067497
commit 5e1a3cb3ac
6 changed files with 137 additions and 18 deletions

View File

@@ -52,21 +52,16 @@
<div class="widgets-layers">
<ul>
@foreach (var layer in Model.Layers) {
var layerClass = "widgets-editLayer";
if (layer.Id == Model.CurrentLayer.Id) {
<li class="widgets-currentLayer widgets-editLayer">
<a href="@Url.Action("EditLayer", new { @layer.Id })">
<img width="15" height="15" src="@Url.Content("~/modules/orchard.widgets/Content/Admin/images/edit.png")" />
</a>
@Html.ActionLink(@layer.Name, "Index", new { @layer.Id })
</li>
} else {
<li class="widgets-editLayer">
<a href="@Url.Action("EditLayer", new { @layer.Id })">
<img width="15" height="15" src="@Url.Content("~/modules/orchard.widgets/Content/Admin/images/edit.png")" />
</a>
@Html.ActionLink(@layer.Name, "Index", new { @layer.Id })
</li>
layerClass += " widgets-currentLayer";
}
<li class="@layerClass">
<a href="@Url.Action("EditLayer", new { @layer.Id })" title="@T("Edit {0} layer", layer.Name)">
<img width="15" height="15" src="@Url.Content("~/modules/orchard.widgets/Content/Admin/images/edit.png")" />
</a>
@Html.ActionLink(@layer.Name, "Index", new { @layer.Id })
</li>
}
</ul>
<div class="new-layer">