Add and delete service reminders

This commit is contained in:
2015-10-17 23:24:10 -04:00
parent a6fb9d54c6
commit e42fcd16fa
17 changed files with 275 additions and 5 deletions
+19
View File
@@ -0,0 +1,19 @@
@model MileageTraker.Web.ViewModels.ServiceReminder.ServiceReminderViewModel
@{
ViewBag.Title = "Create Vehicle Service Reminder";
}
<h2 class="center-content"><i class="fa fa-clock-o"></i> @ViewBag.Title</h2>
@using (Html.BeginForm("Create", "ServiceReminder", 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>
}
+16
View File
@@ -0,0 +1,16 @@
@model MileageTraker.Web.ViewModels.ServiceReminder.ServiceReminderViewModel
@{
ViewBag.Title = "Vehicle Service Reminder Details" ;
}
@Html.Partial("_StatusMessage")
<h2 class="center-content"><i class="fa fa-clock-o"></i> @ViewBag.Title</h2>
<div class="center-content well">
@Html.DisplayForModel()
</div>
<div class="center-content btn-toolbar">
@Html.ActionLink("Edit", "Edit", new { id = Model.ServiceReminderId }, new { @class = "btn" })
</div>
+21
View File
@@ -0,0 +1,21 @@
@model MileageTraker.Web.ViewModels.ServiceReminder.ServiceReminderViewModel
@{
ViewBag.Title = "Edit Vehicle Service Reminder";
}
@Html.Partial("_StatusMessage")
<h2 class="center-content"><i class="fa fa-clock-o"></i> @ViewBag.Title</h2>
@using (Html.BeginForm("Edit", "ServiceREminder", 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>
}
+21
View File
@@ -0,0 +1,21 @@
@model MileageTraker.Web.ViewModels.ServiceReminder.ServiceReminderResultsViewModel
@{
ViewBag.Title = "Vehicle Service Reminders for Vehicle Id " + Model.VehicleId;
}
@Html.Partial("_StatusMessage")
<h2 id="vehicle-title"><i class="fa fa-clock-o"></i> @ViewBag.Title</h2>
<div class="center-content">
@foreach (var item in Model.ServiceReminderItems)
{
Html.RenderPartial("ServiceReminderViewModel", item);
}
</div>
<div class="btn-toolbar center-content well">
@Html.ActionLink("Add Service Reminder", "Create", new { vehicleId = Model.VehicleId }, new{@class="btn"})
@Html.ActionLink("Vehicle Details", "Details", "Vehicle", new { id = Model.VehicleId }, new{@class="btn"})
</div>
@@ -0,0 +1,10 @@
@model MileageTraker.Web.ViewModels.ServiceReminder.ServiceReminderViewModel
<div class="well">
<h3>Service Reminder</h3>
@Html.DisplayForModel()
<div class='btn-toolbar'>
@Html.ActionLink("Edit", "Edit", new { id = Model.ServiceReminderId }, new { @class = "btn" })
@Html.ActionLink("Delete", "Delete", new { id = Model.ServiceReminderId }, new { @class = "btn" })
</div>
</div>
+1 -1
View File
@@ -62,7 +62,7 @@
grid.Column(format:
@<div class='btn-group'>
@*Html.ActionLink("Edit", "Edit", new { id = item.UserId }, new { @class = "btn btn-mini" })*@
@Html.ActionLink("Details / Edit", "Details", new { id = item.UserId }, new { @class = "btn btn-mini" })
@Html.ActionLink("Details", "Details", new { id = item.UserId }, new { @class = "btn btn-mini" })
</div>)
),
htmlAttributes: new { @class = "table table-striped table-bordered table-hover table-condensed"},
+13 -1
View File
@@ -28,6 +28,18 @@
{
@Html.ActionLink("Reactivate", "SetActive", new {id = Model.VehicleId}, new {@class = "btn"})
}
@Html.ActionLink("Add Completed Service", "Create", "VehicleService", new { VehicleId = Model.VehicleId }, new { @class = "btn" })
<div class="btn-group">
<a class="btn dropdown-toggle" data-toggle="dropdown" href="#">
Services <span class="caret"></span>
</a>
<ul class="dropdown-menu">
<li>
@Html.ActionLink("View Service Reminders", "Index", "ServiceReminder", new { VehicleId = Model.VehicleId }, null)
</li>
<li>
@Html.ActionLink("Add Completed Service", "Create", "VehicleService", new { VehicleId = Model.VehicleId }, null)
</li>
</ul>
</div>
@Html.ActionLink("Logs", "Index", "Log", new { Model.VehicleId}, new { @class = "btn" })
</div>
+1 -1
View File
@@ -90,8 +90,8 @@
</td>
<td>
<div class='btn-group'>
@Html.ActionLink("Edit", "Edit", new { id = item.VehicleId }, new { @class = "btn btn-mini" })
@Html.ActionLink("Details", "Details", new { id = item.VehicleId }, new { @class = "btn btn-mini" })
@Html.ActionLink("Svc Reminder", "Index", "ServiceReminder", new { vehicleId = item.VehicleId }, new { @class = "btn btn-mini" })
</div>
</td>
</tr>
+1
View File
@@ -13,4 +13,5 @@
<div class="center-content btn-toolbar">
@Html.ActionLink("Edit", "Edit", new { id = Model.VehicleServiceId }, new { @class = "btn" })
@Html.ActionLink("Vehicle Details", "Details", "Vehicle", new { id = Model.VehicleId }, new{@class="btn"})
</div>
+1 -1
View File
@@ -42,7 +42,7 @@
grid.Column("Description", "Description"),
grid.Column(format:
@<div class='btn-group'>
@Html.ActionLink("Details / Edit", "Details", new { id = item.VehicleServiceId }, new { @class = "btn btn-mini" })
@Html.ActionLink("Details", "Details", new { id = item.VehicleServiceId }, new { @class = "btn btn-mini" })
</div>)
),
htmlAttributes: new { @class = "table table-striped table-bordered table-hover table-condensed"},