a templates controller
This commit is contained in:
59
Yavsc/Views/MailingTemplate/Create.cshtml
Normal file
59
Yavsc/Views/MailingTemplate/Create.cshtml
Normal file
@ -0,0 +1,59 @@
|
||||
@model Yavsc.Server.Models.EMailing.MailingTemplate
|
||||
|
||||
@{
|
||||
ViewData["Title"] = SR["Create"];
|
||||
}
|
||||
|
||||
<h2>@SR["Create"]</h2>
|
||||
|
||||
<form asp-action="Create">
|
||||
<div class="form-horizontal">
|
||||
<h4>MailingTemplate</h4>
|
||||
<hr />
|
||||
<div asp-validation-summary="ValidationSummary.ModelOnly" class="text-danger"></div>
|
||||
<div class="form-group">
|
||||
<label asp-for="Body" class="col-md-2 control-label"></label>
|
||||
<div class="col-md-10">
|
||||
<input asp-for="Body" class="form-control" />
|
||||
<span asp-validation-for="Body" class="text-danger" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="ManagerId" class="col-md-2 control-label"></label>
|
||||
<div class="col-md-10">
|
||||
<select asp-for="ManagerId" class ="form-control" asp-items="@ViewBag.ManagerId" ></select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="ReplyToAddress" class="col-md-2 control-label"></label>
|
||||
<div class="col-md-10">
|
||||
<input asp-for="ReplyToAddress" class="form-control" />
|
||||
<span asp-validation-for="ReplyToAddress" class="text-danger" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="ShortName" class="col-md-2 control-label"></label>
|
||||
<div class="col-md-10">
|
||||
<input asp-for="ShortName" class="form-control" />
|
||||
<span asp-validation-for="ShortName" class="text-danger" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="ToSend" class="col-md-2 control-label"></label>
|
||||
<div class="col-md-10">
|
||||
<select asp-for="ToSend" asp-items="@ViewBag.ToSend" class="form-control"></select>
|
||||
<span asp-validation-for="ToSend" class="text-danger" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-md-offset-2 col-md-10">
|
||||
<input type="submit" value="Create" class="btn btn-default" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<div>
|
||||
<a asp-action="Index">Back to List</a>
|
||||
</div>
|
||||
|
70
Yavsc/Views/MailingTemplate/Delete.cshtml
Normal file
70
Yavsc/Views/MailingTemplate/Delete.cshtml
Normal file
@ -0,0 +1,70 @@
|
||||
@model Yavsc.Server.Models.EMailing.MailingTemplate
|
||||
|
||||
@{
|
||||
ViewData["Title"] = "Delete";
|
||||
}
|
||||
|
||||
<h2>Delete</h2>
|
||||
|
||||
<h3>Are you sure you want to delete this?</h3>
|
||||
<div>
|
||||
<h4>MailingTemplate</h4>
|
||||
<hr />
|
||||
<dl class="dl-horizontal">
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.Body)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.Body)
|
||||
</dd>
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.DateCreated)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.DateCreated)
|
||||
</dd>
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.DateModified)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.DateModified)
|
||||
</dd>
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.ReplyToAddress)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.ReplyToAddress)
|
||||
</dd>
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.ShortName)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.ShortName)
|
||||
</dd>
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.ToSend)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.ToSend)
|
||||
</dd>
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.UserCreated)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.UserCreated)
|
||||
</dd>
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.UserModified)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.UserModified)
|
||||
</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>
|
66
Yavsc/Views/MailingTemplate/Details.cshtml
Normal file
66
Yavsc/Views/MailingTemplate/Details.cshtml
Normal file
@ -0,0 +1,66 @@
|
||||
@model Yavsc.Server.Models.EMailing.MailingTemplate
|
||||
|
||||
@{
|
||||
ViewData["Title"] = "Details";
|
||||
}
|
||||
|
||||
<h2>Details</h2>
|
||||
|
||||
<div>
|
||||
<h4>MailingTemplate</h4>
|
||||
<hr />
|
||||
<dl class="dl-horizontal">
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.Body)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.Body)
|
||||
</dd>
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.DateCreated)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.DateCreated)
|
||||
</dd>
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.DateModified)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.DateModified)
|
||||
</dd>
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.ReplyToAddress)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.ReplyToAddress)
|
||||
</dd>
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.ShortName)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.ShortName)
|
||||
</dd>
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.ToSend)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.ToSend)
|
||||
</dd>
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.UserCreated)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.UserCreated)
|
||||
</dd>
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.UserModified)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.UserModified)
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<p>
|
||||
<a asp-action="Edit" asp-route-id="@Model.Id">Edit</a> |
|
||||
<a asp-action="Index">Back to List</a>
|
||||
</p>
|
62
Yavsc/Views/MailingTemplate/Edit.cshtml
Normal file
62
Yavsc/Views/MailingTemplate/Edit.cshtml
Normal file
@ -0,0 +1,62 @@
|
||||
@model Yavsc.Server.Models.EMailing.MailingTemplate
|
||||
|
||||
@{
|
||||
ViewData["Title"] = "Edit";
|
||||
}
|
||||
|
||||
<h2>@SR["Edit"]</h2>
|
||||
|
||||
<form asp-action="Edit">
|
||||
<div class="form-horizontal">
|
||||
<h4>MailingTemplate</h4>
|
||||
<hr />
|
||||
<div asp-validation-summary="ValidationSummary.ModelOnly" class="text-danger"></div>
|
||||
<input type="hidden" asp-for="Id" />
|
||||
<div class="form-group">
|
||||
<label asp-for="Body" class="col-md-2 control-label"></label>
|
||||
<div class="col-md-10">
|
||||
<input asp-for="Body" class="form-control" />
|
||||
<span asp-validation-for="Body" class="text-danger" ></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="ManagerId" class="control-label col-md-2">@SR["Manager"]</label>
|
||||
<div class="col-md-10">
|
||||
<select asp-for="ManagerId" asp-items="@ViewBag.ManagerId" class="form-control" >
|
||||
</select>
|
||||
<span asp-validation-for="ManagerId" class="text-danger" ></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="ReplyToAddress" class="col-md-2 control-label"></label>
|
||||
<div class="col-md-10">
|
||||
<input asp-for="ReplyToAddress" class="form-control" />
|
||||
<span asp-validation-for="ReplyToAddress" class="text-danger" ></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="ShortName" class="col-md-2 control-label"></label>
|
||||
<div class="col-md-10">
|
||||
<input asp-for="ShortName" class="form-control" />
|
||||
<span asp-validation-for="ShortName" class="text-danger" ></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="ToSend" class="col-md-2 control-label"></label>
|
||||
<div class="col-md-10">
|
||||
<select asp-for="ToSend" asp-items="@ViewBag.ToSend" class="form-control"></select>
|
||||
<span asp-validation-for="ToSend" class="text-danger" ></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-md-offset-2 col-md-10">
|
||||
<input type="submit" value="Save" class="btn btn-default" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<div>
|
||||
<a asp-action="Index">Back to List</a>
|
||||
</div>
|
||||
|
74
Yavsc/Views/MailingTemplate/Index.cshtml
Normal file
74
Yavsc/Views/MailingTemplate/Index.cshtml
Normal file
@ -0,0 +1,74 @@
|
||||
@model IEnumerable<Yavsc.Server.Models.EMailing.MailingTemplate>
|
||||
|
||||
@{
|
||||
ViewData["Title"] = "Index";
|
||||
}
|
||||
|
||||
<h2>Index</h2>
|
||||
|
||||
<p>
|
||||
<a asp-action="Create">Create New</a>
|
||||
</p>
|
||||
<table class="table">
|
||||
<tr>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.ShortName)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.ReplyToAddress)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.Body)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.ToSend)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.DateCreated)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.UserCreated)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.DateModified)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.UserModified)
|
||||
</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
|
||||
@foreach (var item in Model) {
|
||||
<tr>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.ShortName)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.ReplyToAddress)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.Body)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.ToSend)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.DateCreated)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.UserCreated)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.DateModified)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.UserModified)
|
||||
</td>
|
||||
<td>
|
||||
<a asp-action="Edit" asp-route-id="@item.Id">Edit</a> |
|
||||
<a asp-action="Details" asp-route-id="@item.Id">Details</a> |
|
||||
<a asp-action="Delete" asp-route-id="@item.Id">Delete</a>
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
</table>
|
@ -133,7 +133,7 @@
|
||||
data-colorscheme="dark">
|
||||
</div>
|
||||
</environment>
|
||||
<p class="small">Yavsc - Copyright © 2015 - 2017 Paul Schneider</p>
|
||||
<p class="small">Yavsc - Copyright © 2015 - 2018 Paul Schneider</p>
|
||||
</footer>
|
||||
@RenderSection("scripts", required: false)
|
||||
</body>
|
||||
|
Reference in New Issue
Block a user