Updated Manage Widgets UI.

--HG--
branch : dev
This commit is contained in:
Jonathan Wall
2010-10-19 11:58:44 -07:00
parent 15f2238c99
commit 37b4735fa2
2 changed files with 46 additions and 28 deletions

View File

@@ -4,20 +4,23 @@
} }
.widgets-availableWidgets { .widgets-availableWidgets {
float: right;
float: left; float: left;
width: 30%; width: 30%;
margin: 0 0 0 2em;
} }
.widgets-availableLayers { .widgets-availableLayers {
float: left; float: left;
margin: 0 0 0 2em; margin: 0 0 0 2em;
width: 45%; width: 60%;
min-width: 40%;
} }
.widgets-layerZones { .widgets-layerZones {
font-size: 1.4em; font-size: 1.4em;
float: left; float: left;
width: 70%; width: 60%;
border: 1px solid #eaeaea; border: 1px solid #eaeaea;
background: #fff; background: #fff;
} }
@@ -65,4 +68,13 @@
.widgets-layerZones ul li ul { .widgets-layerZones ul li ul {
margin: 0; margin: 0;
padding: 0; padding: 0;
}
.new-layer {
padding: .6em;
}
.new-layer a {
text-decoration: none;
font-weight: 600;
} }

View File

@@ -5,7 +5,7 @@
Style.Require("WidgetsAdmin"); Style.Require("WidgetsAdmin");
} }
<h1>@Html.TitleForPage(T("Manage Widgets").ToString())</h1> <h1>@Html.TitleForPage(T("Manage Widgets").ToString())</h1>
<div class="manage">@Html.ActionLink(T("Add a layer").ToString(), "AddLayer", new { }, new { @class = "button primaryAction" })</div>
@using(Html.BeginFormAntiForgeryPost()) { @using(Html.BeginFormAntiForgeryPost()) {
Html.ValidationSummary(); Html.ValidationSummary();
@@ -13,31 +13,7 @@
<div id="widgets"> <div id="widgets">
<div class="widgets-availableWidgets">
<h2>Available Widgets</h2>
<fieldset>
<table class="items" summary="@T("This is a table of the widgets currently available for use in your application.")">
<colgroup>
<col id="Col1" />
<col id="Col2" />
</colgroup>
<thead>
<tr>
<th scope="col">@T("Name")</th>
<th scope="col"></th>
</tr>
</thead>
@foreach (string widget in Model.WidgetTypes) {
<tr>
<td>@widget</td>
<td>@Html.ActionLink(T("Add").ToString(), "AddWidget", new { layerId = Model.CurrentLayer.Id, widgetType = widget })</td>
</tr>
}
</table>
</fieldset>
</div>
<div class="widgets-availableLayers"> <div class="widgets-availableLayers">
<h2>Widget Zones</h2> <h2>Widget Zones</h2>
@@ -92,9 +68,39 @@
</li> </li>
} }
} }
<ul> </ul>
<div class="new-layer">
@Html.ActionLink(T("+ Add a layer").ToString(), "AddLayer", new { })
</div>
</div> </div>
</fieldset> </fieldset>
</div> </div>
<div class="widgets-availableWidgets">
<h2>Available Widgets</h2>
<fieldset>
<table class="items" summary="@T("This is a table of the widgets currently available for use in your application.")">
<colgroup>
<col id="Col1" />
<col id="Col2" />
</colgroup>
<thead>
<tr>
<th scope="col">@T("Name")</th>
<th scope="col"></th>
</tr>
</thead>
@foreach (string widget in Model.WidgetTypes) {
<tr>
<td>@widget</td>
<td>@Html.ActionLink(T("Add").ToString(), "AddWidget", new { layerId = Model.CurrentLayer.Id, widgetType = widget })</td>
</tr>
}
</table>
</fieldset>
</div>
</div> </div>
} }