Add purpose editing
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
@model MileageTraker.Web.Models.PurposeType
|
||||
|
||||
@{
|
||||
ViewBag.Title = "Create Purpose";
|
||||
}
|
||||
|
||||
<h2 class="center-content">@ViewBag.Title</h2>
|
||||
|
||||
@using (Html.BeginForm("Create", "Purpose", FormMethod.Post, new { @class = "form-horizontal well center-content" }))
|
||||
{
|
||||
@Html.Partial("_ValidationSummary")
|
||||
<fieldset>
|
||||
<legend></legend>
|
||||
@Html.EditorForModel()
|
||||
<div class="form-actions">
|
||||
<input type="submit" value="Create" class="btn btn-primary" />
|
||||
</div>
|
||||
</fieldset>
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
@model MileageTraker.Web.Models.PurposeType
|
||||
|
||||
@{
|
||||
ViewBag.Title = "Purpose Details";
|
||||
}
|
||||
|
||||
@Html.Partial("_StatusMessage")
|
||||
|
||||
<h2 class="center-content">@ViewBag.Title</h2>
|
||||
<div class="center-content well">
|
||||
@Html.DisplayForModel()
|
||||
</div>
|
||||
|
||||
<div class="center-content btn-toolbar">
|
||||
@Html.ActionLink("Edit", "Edit", new { id = Model.PurposeTypeId }, new { @class = "btn" })
|
||||
</div>
|
||||
@@ -0,0 +1,28 @@
|
||||
@model MileageTraker.Web.Models.PurposeType
|
||||
|
||||
@{
|
||||
ViewBag.Title = "Purpose Edit";
|
||||
}
|
||||
|
||||
@Html.Partial("_StatusMessage")
|
||||
|
||||
<h2 class="center-content">@ViewBag.Title</h2>
|
||||
|
||||
@using (Html.BeginForm("Edit", "Purpose", FormMethod.Post, new { @class = "form-horizontal well center-content" }))
|
||||
{
|
||||
@Html.Partial("_ValidationSummary")
|
||||
|
||||
<fieldset>
|
||||
<legend></legend>
|
||||
|
||||
@Html.EditorForModel()
|
||||
|
||||
<div class="form-actions">
|
||||
<input type="submit" value="Save" class="btn btn-primary" />
|
||||
</div>
|
||||
</fieldset>
|
||||
}
|
||||
|
||||
<div class="btn-toolbar center-content">
|
||||
@Html.ActionLink("Details", "Details", new { id = Model.PurposeTypeId }, new { @class = "btn" })
|
||||
</div>
|
||||
@@ -0,0 +1,27 @@
|
||||
@model IEnumerable<MileageTraker.Web.Models.PurposeType>
|
||||
|
||||
@{
|
||||
ViewBag.Title = "Purposes";
|
||||
var grid = new WebGrid(Model, canSort: false, canPage: false);
|
||||
}
|
||||
|
||||
@Html.Partial("_StatusMessage")
|
||||
|
||||
<h2>@ViewBag.Title</h2>
|
||||
|
||||
<div class="btn-toolbar pull-left">
|
||||
@Html.ActionLink("Add new Purpose", "Create", null, new{@class="btn"})
|
||||
</div>
|
||||
|
||||
@grid.GetHtml(columns:
|
||||
grid.Columns(
|
||||
grid.Column("Purpose"),
|
||||
grid.Column("SortOrder", "Sort Order"),
|
||||
grid.Column(format:
|
||||
@<div class='btn-group'>
|
||||
@Html.ActionLink("Edit", "Edit", new { id = item.PurposeTypeId }, new { @class = "btn btn-mini" })
|
||||
@Html.ActionLink("Details", "Details", new { id = item.PurposeTypeId }, new { @class = "btn btn-mini" })
|
||||
</div>)
|
||||
),
|
||||
htmlAttributes: new { @class = "table table-striped table-bordered table-hover table-condensed" }
|
||||
)
|
||||
Reference in New Issue
Block a user