Files
MileageTraker/Web/Views/City/Index.cshtml
T
2014-05-27 20:48:30 -04:00

35 lines
775 B
Plaintext

@model Dictionary<string,List<string>>
@{
ViewBag.Title = "Cities by County";
}
@{ Html.RenderPartial("BackToLogs"); }
@Html.Partial("_StatusMessage")
<h2>@ViewBag.Title</h2>
<div>
@foreach (var countyCities in Model)
{
<div>
<h3>@countyCities.Key</h3>
<p>
@foreach (var city in countyCities.Value)
{
<span class="label">
@city
</span>
}
@Html.ActionLink("Add City", "Create", new {County=countyCities.Key}, new { @class = "btn btn-small" })
</p>
</div>
}
<h4 style="margin-top: 30px">Add County</h4>
@using (Html.BeginForm("Create", "City", FormMethod.Get)){
@Html.TextBox("County", "", new { @class = "input-medium", style="margin-bottom:0px;"})
<input type="submit" value="Add" class="btn btn-small" />
}
</div>