a Startup

This commit is contained in:
Paul Schneider
2023-03-20 21:48:32 +00:00
parent c4b7a5c48d
commit ff2a72f112
19 changed files with 90 additions and 107 deletions

View File

@ -9,20 +9,20 @@
else if (Model.IsLayoutPageSelected)
{
@:@@{
@:ViewData["Title"] = @@SR["@Model.ViewName"];
@:ViewData["Title"] = @@Model.ViewName"];
if (!string.IsNullOrEmpty(Model.LayoutPageFile))
{
@:Layout = "@Model.LayoutPageFile";
}
@:}
@:
@:<h2>@@SR["@Model.ViewName"]</h2>
@:<h2>@@Model.ViewName"]</h2>
@:
}
else
{
@:@@{
@:Layout = null;
@:Layout = "null";
@:}
@:
@:<!DOCTYPE html>
@ -38,9 +38,9 @@
}
@:<form asp-action="@Model.ViewName">
@:<div class="form-horizontal">
@:<h4>@@SR["@Model.ViewDataTypeShortName"]</h4>
@:<h4>@@Model.ViewDataTypeShortName"]</h4>
@:<hr />
@:<div asp-validation-summary="ValidationSummary.ModelOnly" class="text-danger"></div>
@:<div asp-validation-summary="ModelOnly" class="text-danger"></div>
foreach (var property in Model.ModelMetadata.Properties)
{
if (property.Scaffold && !property.IsAutoGenerated && !property.IsReadOnly)
@ -107,7 +107,7 @@
</form>
<div>
<a asp-action="Index">@@SR["Back to List"]</a>
<a asp-action="Index">@Back to List</a>
</div>
@{
@ -142,4 +142,4 @@
{
return string.Equals("System.Guid", property.TypeName, StringComparison.OrdinalIgnoreCase);
}
}
}

View File

@ -9,20 +9,20 @@
else if (Model.IsLayoutPageSelected)
{
@:@@{
@:ViewData["Title"] = @@SR["@Model.ViewName"];
@:ViewData["Title"] = @@Model.ViewName"];
if (!string.IsNullOrEmpty(Model.LayoutPageFile))
{
@:Layout = "@Model.LayoutPageFile";
}
@:}
@:
@:<h2>@@SR["@Model.ViewName"]</h2>
@:<h2>@@Model.ViewName"]</h2>
@:
}
else
{
@:@@{
@:Layout = null;
@:Layout = "null";
@:}
@:
@:<!DOCTYPE html>
@ -30,16 +30,16 @@
@:<html>
@:<head>
@:<meta name="viewport" content="width=device-width" />
@:<title>@@SR[@Model.ViewName]</title>
@:<title>@@@Model.ViewName</title>
@:</head>
@:<body>
@:
// PushIndent(" ");
}
}
<h3>@@SR["AreYourSureYouWantToDeleteThis"]</h3>
<h3>@AreYourSureYouWantToDeleteThis</h3>
<div>
<h4>@@SR[@Model.ViewDataTypeShortName]</h4>
<h4>@@@Model.ViewDataTypeShortName</h4>
<hr />
<dl class="dl-horizontal">
@{
@ -59,8 +59,8 @@
@:
@:<form asp-action="@Model.ViewName">
@:<div class="form-actions no-color">
@:<input type="submit" value="@@SR["Delete"]" class="btn btn-default" /> |
@:<a asp-action="Index">@@SR["Back to List"]</a>
@:<input type="submit" value="@Delete" class="btn btn-default" /> |
@:<a asp-action="Index">Back to List</a>
@:</div>
@:</form>
@:</div>
@ -78,4 +78,4 @@
//Todo: Get the association for the property and use that.
return property.PropertyName;
}
}
}

View File

@ -9,20 +9,20 @@
else if (Model.IsLayoutPageSelected)
{
@:@@{
@:ViewData["Title"] = @@SR["@Model.ViewName"];
@:ViewData["Title"] = @@Model.ViewName"];
if (!string.IsNullOrEmpty(Model.LayoutPageFile))
{
@:Layout = "@Model.LayoutPageFile";
}
@:}
@:
@:<h2>@@SR["@Model.ViewName"]</h2>
@:<h2>@@Model.ViewName"]</h2>
@:
}
else
{
@:@@{
@:Layout = null;
@:Layout = "null";
@:}
@:
@:<!DOCTYPE html>
@ -61,13 +61,13 @@
string pkName = GetPrimaryKeyName();
if (pkName != null)
{
@:<a asp-action="Edit" asp-route-id="@@Model.@pkName">@@SR["Edit"]</a> |
@:<a asp-action="Index">@@SR["Back to List"]</a>
@:<a asp-action="Edit" asp-route-id="@@Model.@pkName">@Edit</a> |
@:<a asp-action="Index">Back to List</a>
}
else
{
@:@@Html.ActionLink(@@SR["Edit"], "Edit", new { /* id = Model.PrimaryKey */ }) |
@:<a asp-action="Index">@@SR["Back to List"]</a>
@:@@Html.ActionLink(@Edit, "Edit", new { /* id = Model.PrimaryKey */ }) |
@:<a asp-action="Index">Back to List</a>
}
}</p>
@{
@ -92,4 +92,4 @@
//Todo: Get the association for the property and use that.
return property.PropertyName;
}
}
}

View File

@ -9,20 +9,20 @@
else if (Model.IsLayoutPageSelected)
{
@:@@{
@:ViewData["Title"] = @@SR["@Model.ViewName"];
@:ViewData["Title"] = @@Model.ViewName"];
if (!string.IsNullOrEmpty(Model.LayoutPageFile))
{
@:Layout = "@Model.LayoutPageFile";
}
@:}
@:
@:<h2>@@SR["@Model.ViewName"]</h2>
@:<h2>@@Model.ViewName"]</h2>
@:
}
else
{
@:@@{
@:Layout = null;
@:Layout = "null";
@:}
@:
@:<!DOCTYPE html>
@ -30,7 +30,7 @@
@:<html>
@:<head>
@:<meta name="viewport" content="width=device-width" />
@:<title>@@SR["@Model.ViewName"]</title>
@:<title>@@Model.ViewName"]</title>
@:</head>
@:<body>
@:
@ -40,7 +40,7 @@
@:<div class="form-horizontal">
@:<h4>@Model.ViewDataTypeShortName</h4>
@:<hr />
@:<div asp-validation-summary="ValidationSummary.ModelOnly" class="text-danger"></div>
@:<div asp-validation-summary="ModelOnly" class="text-danger"></div>
foreach (PropertyMetadata property in Model.ModelMetadata.Properties)
{
if (property.Scaffold)
@ -111,7 +111,7 @@
</form>
<div>
<a asp-action="Index">@@SR["Back to List"]</a>
<a asp-action="Index">Back to List</a>
</div>
@{

View File

@ -9,20 +9,20 @@
else if (Model.IsLayoutPageSelected)
{
@:@@{
@:ViewData["Title"] = @@SR["@Model.ViewName"];
@:ViewData["Title"] = @@Model.ViewName"];
if (!string.IsNullOrEmpty(Model.LayoutPageFile))
{
@:Layout = "@Model.LayoutPageFile";
}
@:}
@:
@:<h2>@@SR["@Model.ViewName"]</h2>
@:<h2>@@Model.ViewName"]</h2>
@:
}
else
{
@:@@{
@:Layout = null;
@:Layout = "null";
@:}
@:
@:<!DOCTYPE html>
@ -30,13 +30,13 @@
@:<html>
@:<head>
@:<meta name="viewport" content="width=device-width" />
@:<title>@@SR["@Model.ViewName"]</title>
@:<title>@@Model.ViewName"]</title>
@:</head>
@:<body>
// PushIndent(" ");
}
@:<p>
@:<a asp-action="Create">@@SR["Create New"]</a>
@:<a asp-action="Create">Create New</a>
@:</p>
@:<table class="table">
@:<tr>
@ -69,17 +69,17 @@
if (pkName != null)
{
@:<td>
@:<a asp-action="Edit" asp-route-id="@@item.@pkName">@@SR["Edit"]</a> |
@:<a asp-action="Details" asp-route-id="@@item.@pkName">@@SR["Details"]</a> |
@:<a asp-action="Delete" asp-route-id="@@item.@pkName">@@SR["Delete"]</a>
@:<a asp-action="Edit" asp-route-id="@@item.@pkName">@Edit</a> |
@:<a asp-action="Details" asp-route-id="@@item.@pkName">@Details</a> |
@:<a asp-action="Delete" asp-route-id="@@item.@pkName">@Delete</a>
@:</td>
}
else
{
<td>
@@Html.ActionLink(SR["Edit"], "Edit",new { /* id=item.PrimaryKey */ }) |
@@Html.ActionLink(SR["Details"], "Details", new { /* id=item.PrimaryKey */ }) |
@@Html.ActionLink(SR["Delete"], "Delete", new { /* id=item.PrimaryKey */ })
@@Html.ActionLink("Edit", "Edit",new { /* id=item.PrimaryKey */ }) |
@@Html.ActionLink("Details", "Details", new { /* id=item.PrimaryKey */ }) |
@@Html.ActionLink("Delete", "Delete", new { /* id=item.PrimaryKey */ })
</td>
}
@:</tr>
@ -112,4 +112,4 @@
{
return "IEnumerable<" + typeName + ">";
}
}
}