fixes edition of membership

This commit is contained in:
Paul Schneider 2017-12-19 10:58:44 +01:00
commit 87a3f56da6
5 changed files with 49 additions and 45 deletions

View file

@ -6,17 +6,27 @@
<h2>Delete</h2>
<h3>Are you sure you want to delete this?</h3>
<h3>Supprimer cette appartenance au cercle?</h3>
<div>
<h4>CircleMember</h4>
<hr />
<dl class="dl-horizontal">
<dl>
<dt>
Cercle
</dt>
<dd>
@Html.DisplayFor(m=>m.Circle)
</dd>
<dt>
Membre
</dt>
<dd>
@Html.DisplayFor(m=>m.Member)
</dd>
</dl>
<form asp-action="Delete">
<div class="form-actions no-color">
<input type="submit" value="Delete" class="btn btn-default" /> |
<a asp-action="Index">Back to List</a>
</div>
</form>
</div>
<form asp-action="Delete">
<div class="form-actions no-color">
<input type="submit" value="Delete" class="btn btn-default" /> |
<a asp-action="Index">Back to List</a>
</div>
</form>

View file

@ -1,18 +1,17 @@
@model CircleMember
@{
ViewData["Title"] = "Details";
ViewData["Title"] = $"{Model.Member.UserName}, du cercle {Model.Circle.Name}" ;
}
<h2>Details</h2>
<h2></h2>
<div>
<h4>CircleMember</h4>
<h4>Un membre du cercle @Model.Circle.Name</h4>
<hr />
<dl class="dl-horizontal">
</dl>
@Html.DisplayFor(m=>Model.Member)
</div>
<p>
@Html.ActionLink("Edit", "Edit", new { /* id = Model.PrimaryKey */ }) |
<a asp-action="Index">Back to List</a>
@Html.ActionLink(SR["Delete"], "Delete", new { id = Model.CircleId }) |
<a asp-action="Index">@SR["Back to List"]</a>
</p>

View file

@ -8,7 +8,7 @@
<form asp-action="Edit">
<div class="form-horizontal">
<h4>CircleMember</h4>
<h4>Circle Member</h4>
<hr />
<div asp-validation-summary="ValidationSummary.ModelOnly" class="text-danger"></div>
<input type="hidden" asp-for="MemberId" />
@ -22,6 +22,6 @@
</form>
<div>
<a asp-action="Index">Back to List</a>
<a asp-action="Index">@SR["Back to List"]</a>
</div>

View file

@ -17,6 +17,10 @@
</tr>
@foreach (var item in Model) {
var itemKey = new { Id = item.CircleId } ;
<tr>
<td>
@Html.DisplayFor(m=>item.Circle)
@ -26,9 +30,7 @@
</td>
<td>
@Html.ActionLink("Edit", "Edit", new { /* id=item.PrimaryKey */ }) |
@Html.ActionLink("Details", "Details", new { /* id=item.PrimaryKey */ }) |
@Html.ActionLink("Delete", "Delete", new { /* id=item.PrimaryKey */ })
@Html.ActionLink("Delete", "Delete", itemKey)
</td>
</tr>
}