Improved Contact links management layout
This commit is contained in:
@@ -14,7 +14,7 @@
|
||||
<div asp-validation-summary="ModelOnly" class="text-danger"></div>
|
||||
<div>
|
||||
<label asp-for="Name"></label>
|
||||
<input asp-for="Name" type="text"/>
|
||||
<input asp-for="Name" type="text" />
|
||||
<span asp-validation-for="Name" class="text-danger"></span>
|
||||
</div>
|
||||
<div>
|
||||
@@ -37,12 +37,11 @@
|
||||
<input asp-for="Url" type="text" />
|
||||
<span asp-validation-for="Url" class="text-danger"></span>
|
||||
</div>
|
||||
<label>
|
||||
<input type="checkbox" class="checkbox" asp-for="CanContactMe" /> @Html.DisplayNameFor(model => model.CanContactMe)
|
||||
</label>
|
||||
<label>
|
||||
<input type="checkbox" class="checkbox" asp-for="DisplayInFooter" /> @Html.DisplayNameFor(model => model.DisplayInFooter)
|
||||
</label>
|
||||
|
||||
<label asp-for="CanContactMe"></label>
|
||||
<input type="checkbox" class="checkbox" asp-for="CanContactMe" /> <br />
|
||||
<label asp-for="DisplayInFooter"></label>
|
||||
<input type="checkbox" class="checkbox" asp-for="DisplayInFooter" />
|
||||
|
||||
<input type="submit" value="Create" class="btn" />
|
||||
</form>
|
||||
|
||||
@@ -12,11 +12,11 @@
|
||||
|
||||
<article>
|
||||
<p class="form-group">
|
||||
<b>@Html.DisplayNameFor(model => model.Name):</b> @Html.DisplayFor(model => model.Name)<br />
|
||||
<b>@Html.DisplayNameFor(model => model.Order):</b> @Html.DisplayFor(model => model.Order)<br />
|
||||
<b>@Html.DisplayNameFor(model => model.Title):</b> @Html.DisplayFor(model => model.Title)<br />
|
||||
<b>@Html.DisplayNameFor(model => model.Username):</b> @Html.DisplayFor(model => model.Username)<br />
|
||||
<b>@Html.DisplayNameFor(model => model.Url):</b> @Html.DisplayFor(model => model.Url)<br />
|
||||
<b>@Html.DisplayNameFor(model => model.Name):</b> @Model.Name<br />
|
||||
<b>@Html.DisplayNameFor(model => model.Order):</b> @Model.Order<br />
|
||||
<b>@Html.DisplayNameFor(model => model.Title):</b> @Model.Title<br />
|
||||
<b>@Html.DisplayNameFor(model => model.Username):</b> @Model.Username<br />
|
||||
<b>@Html.DisplayNameFor(model => model.Url):</b> @Model.Url<br />
|
||||
<b>@Html.DisplayNameFor(model => model.CanContactMe):</b> @Html.DisplayFor(model => model.CanContactMe)<br />
|
||||
<b>@Html.DisplayNameFor(model => model.DisplayInFooter):</b> @Html.DisplayFor(model => model.DisplayInFooter)
|
||||
</p>
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
@model MyWebsite.Models.Link
|
||||
|
||||
@{
|
||||
ViewData["Title"] = "Edit link";
|
||||
}
|
||||
@@ -37,12 +36,11 @@
|
||||
<input asp-for="Url" type="text" />
|
||||
<span asp-validation-for="Url" class="text-danger"></span>
|
||||
</div>
|
||||
<label>
|
||||
<input type="checkbox" class="checkbox" asp-for="CanContactMe" /> @Html.DisplayNameFor(model => model.CanContactMe)
|
||||
</label>
|
||||
<label>
|
||||
<input type="checkbox" class="checkbox" asp-for="DisplayInFooter" /> @Html.DisplayNameFor(model => model.DisplayInFooter)
|
||||
</label>
|
||||
|
||||
<label asp-for="CanContactMe"></label>
|
||||
<input type="checkbox" class="checkbox" asp-for="CanContactMe" /> <br />
|
||||
<label asp-for="DisplayInFooter"></label>
|
||||
<input type="checkbox" class="checkbox" asp-for="DisplayInFooter" />
|
||||
|
||||
<input type="submit" value="Save" class="btn" />
|
||||
</form>
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
@model IEnumerable<MyWebsite.Models.Link>
|
||||
|
||||
@{
|
||||
ViewData["Title"] = "Links list";
|
||||
}
|
||||
@@ -44,21 +43,11 @@
|
||||
@foreach (var item in Model.OrderBy(i => i.Order))
|
||||
{
|
||||
<tr>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.Order)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.Name)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.Title)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.Username)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.Url)
|
||||
</td>
|
||||
<td>@item.Order</td>
|
||||
<td>@item.Name</td>
|
||||
<td>@item.Title</td>
|
||||
<td>@item.Username</td>
|
||||
<td>@item.Url</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.CanContactMe)
|
||||
</td>
|
||||
@@ -66,8 +55,8 @@
|
||||
@Html.DisplayFor(modelItem => item.DisplayInFooter)
|
||||
</td>
|
||||
<td>
|
||||
@Html.ActionLink("Edit", "Edit", new { id=item.Name }) |
|
||||
@Html.ActionLink("Delete", "Delete", new { id=item.Name })
|
||||
<a asp-action="Edit" asp-route-id="@item.Name">Edit</a> |
|
||||
<a asp-action="Delete" asp-route-id="@item.Name">Delete</a>
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user