style & Rate edition

This commit is contained in:
Paul Schneider 2017-03-10 11:57:25 +01:00
commit acf4649fa6
4 changed files with 49 additions and 25 deletions

View file

@ -33,8 +33,8 @@
<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>
<input type="submit" value="Delete" class="btn btn-danger" />
<a asp-action="Index" class="btn btn-link">Back to List</a>
</div>
</form>
</div>

View file

@ -48,9 +48,7 @@
</div>
</div>
<div class="form-group">
<label asp-for="SettingsClassName" class="col-md-2 control-label">
@SR["SettingsClass"]
</label>
<label asp-for="SettingsClassName" class="col-md-2 control-label"></label>
<div class="col-md-10">
<select asp-for="SettingsClassName" class="form-control" asp-items="@ViewBag.SettingsClassName">
</select>
@ -58,14 +56,19 @@
</div>
</div>
<div class="form-group">
<label asp-for="Hidden" class="col-md-2 control-label">
@SR["Hidden"]
</label>
<label asp-for="Hidden" class="col-md-2 control-label"></label>
<div class="col-md-10">
<input asp-for="Hidden" class="form-control" />
<span asp-validation-for="Hidden" class="text-danger" />
</div>
</div>
<div class="form-group">
<label asp-for="Rate" class="col-md-2 control-label"></label>
<div class="col-md-10">
<input asp-for="Rate" class="form-control" />
<span asp-validation-for="Rate" class="text-danger" />
</div>
</div>
<div class="form-group">
<div class="col-md-offset-2 col-md-10">
<input type="submit" value="Save" class="btn btn-default" />

View file

@ -12,10 +12,10 @@
<table class="table">
<tr>
<th>
@Html.DisplayNameFor(model => model.Code)
@Html.DisplayNameFor(model => model.Name)
</th>
<th>
@SR["Name"]
@Html.DisplayNameFor(model => model.Code)
</th>
<th>
@ -25,20 +25,26 @@
@Html.DisplayNameFor(model => model.Photo)
</th>
<th>
@Html.DisplayNameFor(model => model.Parent)
@Html.DisplayNameFor(model => model.Parent)
</th>
<th>
@SR["SettingsClass"]
@Html.DisplayNameFor(model => model.SettingsClassName)
</th>
<th>
@Html.DisplayNameFor(model => model.Children)
</th>
<th>
@Html.DisplayNameFor(model => model.Rate)
</th>
</tr>
@foreach (var item in Model) {
<tr>
<td>
@Html.DisplayFor(modelItem => item.Code)
<a name="@item.Code" class="btn btn-link"></a> @Html.DisplayFor(modelItem => item.Name)
</td>
<td>
@Html.DisplayFor(modelItem => item.Name)
@Html.DisplayFor(modelItem => item.Code)
</td>
<td>
@Html.DisplayFor(modelItem => item.Description)
@ -50,7 +56,7 @@
<td>
@if (item.Parent!=null) {
<text>
@Html.DisplayFor(modelItem => item.Parent)
<a href="#@item.ParentCode">@Html.DisplayFor(modelItem => item.Parent)</a>
</text>
}
</td>
@ -65,9 +71,12 @@
@Html.DisplayFor(modelItem => item.Children)
</td>
<td>
<a asp-action="Edit" asp-route-id="@item.Code">Edit</a> |
<a asp-action="Details" asp-route-id="@item.Code">Details</a> |
<a asp-action="Delete" asp-route-id="@item.Code">Delete</a>
@Html.DisplayFor(modelItem => item.Rate)
</td>
<td>
<a asp-action="Edit" asp-route-id="@item.Code" class="btn btn-default">Edit</a>
<a asp-action="Details" asp-route-id="@item.Code" class="btn btn-success">Details</a>
<a asp-action="Delete" asp-route-id="@item.Code" class="btn btn-danger">Delete</a>
</td>
</tr>
}