Re-do company descriptions.

This commit is contained in:
2019-05-18 17:12:54 +01:00
parent 379bc4ec5a
commit fb9a86f7e4
16 changed files with 5918 additions and 118 deletions

View File

@@ -1,4 +1,4 @@
@{
@{
/******************************************************************************
// Canary Islands Computer Museum Website
// ----------------------------------------------------------------------------
@@ -35,7 +35,7 @@
ViewData["Title"] = "Create";
}
<h2>Create</h2>
<h1>Create</h1>
<h4>Company description</h4>
<hr />
@@ -49,11 +49,10 @@
<label asp-for="CompanyId"
class="control-label">
</label>
<input asp-for="CompanyId"
class="form-control" />
<span asp-validation-for="CompanyId"
class="text-danger">
</span>
<select asp-for="CompanyId"
class="form-control"
asp-items="ViewBag.CompanyId">
</select>
</div>
<div class="form-group">
<label asp-for="Text"

View File

@@ -1,4 +1,4 @@
@{
@{
/******************************************************************************
// Canary Islands Computer Museum Website
// ----------------------------------------------------------------------------
@@ -8,7 +8,7 @@
//
// --[ Description ] ----------------------------------------------------------
//
// Admin view delete
// Admin view create
//
// --[ License ] --------------------------------------------------------------
//
@@ -35,36 +35,36 @@
ViewData["Title"] = "Delete";
}
<h2>Delete</h2>
<h1>Delete</h1>
<h3>Are you sure you want to delete this?</h3>
<div>
<h4>Company description</h4>
<hr />
<dl class="dl-horizontal">
<dt>
@Html.DisplayNameFor(model => model.CompanyId)
</dt>
<dd>
@Html.DisplayFor(model => model.CompanyId)
</dd>
<dt>
<dl class="row">
<dt class="col-sm-2">
@Html.DisplayNameFor(model => model.Text)
</dt>
<dd>
<dd class="col-sm-10">
@Html.DisplayFor(model => model.Text)
</dd>
<dt>
<dt class="col-sm-2">
@Html.DisplayNameFor(model => model.Company)
</dt>
<dd>
<dd class="col-sm-10">
@Html.DisplayFor(model => model.Company.Name)
</dd>
</dl>
<form asp-action="Delete">
<input type="hidden" asp-for="Id" />
<input type="submit" value="Delete" class="btn btn-default" /> |
<a asp-action="Index">Back to List</a>
<input type="hidden"
asp-for="Id" />
<input class="btn btn-danger"
type="submit"
value="Delete" />
<a asp-action="Index"
class="btn btn-secondary">
Back to List
</a>
</form>
</div>
</div>

View File

@@ -1,4 +1,4 @@
@{
@{
/******************************************************************************
// Canary Islands Computer Museum Website
// ----------------------------------------------------------------------------
@@ -8,7 +8,7 @@
//
// --[ Description ] ----------------------------------------------------------
//
// Admin view details
// Admin view create
//
// --[ License ] --------------------------------------------------------------
//
@@ -35,33 +35,34 @@
ViewData["Title"] = "Details";
}
<h2>Details</h2>
<h1>Details</h1>
<div>
<h4>Company description</h4>
<hr />
<dl class="dl-horizontal">
<dt>
@Html.DisplayNameFor(model => model.CompanyId)
</dt>
<dd>
@Html.DisplayFor(model => model.CompanyId)
</dd>
<dt>
<dl class="row">
<dt class="col-sm-2">
@Html.DisplayNameFor(model => model.Text)
</dt>
<dd>
<dd class="col-sm-10">
@Html.DisplayFor(model => model.Text)
</dd>
<dt>
<dt class="col-sm-2">
@Html.DisplayNameFor(model => model.Company)
</dt>
<dd>
<dd class="col-sm-10">
@Html.DisplayFor(model => model.Company.Name)
</dd>
</dl>
</div>
<div>
<a asp-action="Edit" asp-route-id="@Model.Id">Edit</a> |
<a asp-action="Index">Back to List</a>
</div>
<a asp-action="Edit"
asp-route-id="@Model.Id"
class="btn btn-primary">
Edit
</a>
<a asp-action="Index"
class="btn btn-secondary">
Back to List
</a>
</div>

View File

@@ -1,4 +1,4 @@
@{
@{
/******************************************************************************
// Canary Islands Computer Museum Website
// ----------------------------------------------------------------------------
@@ -8,7 +8,7 @@
//
// --[ Description ] ----------------------------------------------------------
//
// Admin view edit
// Admin view create
//
// --[ License ] --------------------------------------------------------------
//
@@ -35,9 +35,9 @@
ViewData["Title"] = "Edit";
}
<h2>Edit</h2>
<h1>Edit</h1>
<h4>Company description</h4>
<h4>CompanyDescription</h4>
<hr />
<div class="row">
<div class="col-md-4">
@@ -51,8 +51,10 @@
<label asp-for="CompanyId"
class="control-label">
</label>
<input asp-for="CompanyId"
class="form-control" />
<select asp-for="CompanyId"
class="form-control"
asp-items="ViewBag.CompanyId">
</select>
<span asp-validation-for="CompanyId"
class="text-danger">
</span>

View File

@@ -1,4 +1,4 @@
@{
@{
/******************************************************************************
// Canary Islands Computer Museum Website
// ----------------------------------------------------------------------------
@@ -8,7 +8,7 @@
//
// --[ Description ] ----------------------------------------------------------
//
// Admin view index
// Admin view create
//
// --[ License ] --------------------------------------------------------------
//
@@ -36,7 +36,7 @@
ViewData["Title"] = "Company descriptions (Admin)";
}
<h2>Company descriptions</h2>
<h1>Company description</h1>
<p>
<a asp-action="Create"
@@ -47,9 +47,6 @@
<table class="table">
<thead>
<tr>
<th>
@Html.DisplayNameFor(model => model.CompanyId)
</th>
<th>
@Html.DisplayNameFor(model => model.Text)
</th>
@@ -63,9 +60,6 @@
@foreach(CompanyDescription item in Model)
{
<tr>
<td>
@Html.DisplayFor(modelItem => item.CompanyId)
</td>
<td>
@Html.DisplayFor(modelItem => item.Text)
</td>