Correct reports not having all query parameters
Other small corrections
This commit is contained in:
@@ -92,7 +92,7 @@ $(function() {
|
||||
// Add active class to nav
|
||||
$(function() {
|
||||
var idNavActiveRegex = {
|
||||
'log-nav': /\/log/i,
|
||||
'log-nav': /\/log|\/City|\/Purpose/i,
|
||||
'vehicle-nav': /\/vehicle/i,
|
||||
'user-nav': /\/user/i
|
||||
};
|
||||
@@ -116,6 +116,7 @@ function addButtonIcons () {
|
||||
'Delete': 'trash',
|
||||
'Add': 'plus',
|
||||
'Export': 'download',
|
||||
'Import': 'upload',
|
||||
'Driver Mileage': 'user',
|
||||
'Vehicle Mileage': 'car'
|
||||
};
|
||||
|
||||
@@ -4,8 +4,10 @@
|
||||
ViewBag.Title = "Cities by County";
|
||||
}
|
||||
|
||||
@Html.Partial("_StatusMessage")
|
||||
@{ Html.RenderPartial("BackToLogs"); }
|
||||
|
||||
@Html.Partial("_StatusMessage")
|
||||
|
||||
<h2>@ViewBag.Title</h2>
|
||||
|
||||
<div>
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
@{
|
||||
ViewBag.Title = "Logs";
|
||||
var grid = new WebGrid(Model.Logs, rowsPerPage: 45);
|
||||
var parameters = new {Model.Year, Model.Month, Model.LogType, Model.MonthRange, Model.VehicleId, Model.EmployeeName};
|
||||
}
|
||||
@section Styles {
|
||||
<link href="@Url.Content("~/Content/VehicleColors.css")" rel="stylesheet" type="text/css" />
|
||||
@@ -34,7 +35,7 @@
|
||||
|
||||
<div class="btn-toolbar clearfix">
|
||||
@Html.ActionLink("Add New Log", "Create", null, new { @class = "btn" })
|
||||
@Html.ActionLink("Export", "Export", new { Model.Year, Model.Month, Model.LogType, Model.MonthRange, Model.VehicleId, Model.EmployeeName }, new { @class = "btn" })
|
||||
@Html.ActionLink("Export", "Export", parameters, new { @class = "btn" })
|
||||
@Html.ActionLink("Purposes", "Index", "Purpose", null, new { @class = "btn" })
|
||||
@Html.ActionLink("Cities", "Index", "City", null, new { @class = "btn" })
|
||||
@Html.ActionLink("Import", "ImportUpload", null, new { @class = "btn"})
|
||||
@@ -43,10 +44,10 @@
|
||||
<a class="btn dropdown-toggle" data-toggle="dropdown" href="#">Report <span class="caret"></span></a>
|
||||
<ul class="dropdown-menu">
|
||||
<li>
|
||||
@Html.ActionLink("Vehicle Mileage", "MonthlyVehicleMileage", new { Year = Model.Year, Month = Model.Month, LogType = Model.LogType })
|
||||
@Html.ActionLink("Vehicle Mileage", "MonthlyVehicleMileage", parameters)
|
||||
</li>
|
||||
<li>
|
||||
@Html.ActionLink("Driver Mileage", "MonthlyDriverMileage", new { Year = Model.Year, Month = Model.Month, LogType = Model.LogType })
|
||||
@Html.ActionLink("Driver Mileage", "MonthlyDriverMileage", parameters)
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -9,23 +9,7 @@
|
||||
|
||||
<h2>@ViewBag.Title</h2>
|
||||
|
||||
<div>
|
||||
<dl class="inline">
|
||||
<dt>@Html.DisplayNameFor(m => m.Query.Year)</dt>
|
||||
<dd>@Html.Encode(Model.Query.Year)</dd>
|
||||
</dl>
|
||||
<dl class="inline">
|
||||
<dt>@Html.DisplayNameFor(m => m.Query.Month)</dt>
|
||||
<dd>@Html.Encode(Model.Query.Month)</dd>
|
||||
</dl>
|
||||
@if (Model.Query.LogType.HasValue)
|
||||
{
|
||||
<dl class="inline">
|
||||
<dt>Type</dt>
|
||||
<dd>@Html.Encode(Model.Query.LogType)</dd>
|
||||
</dl>
|
||||
}
|
||||
</div>
|
||||
@Html.DisplayFor(m => m.Query)
|
||||
|
||||
<table class="table">
|
||||
<tr>
|
||||
|
||||
@@ -9,23 +9,7 @@
|
||||
|
||||
<h2>@ViewBag.Title</h2>
|
||||
|
||||
<div>
|
||||
<dl class="inline">
|
||||
<dt>@Html.DisplayNameFor(m => m.Query.Year)</dt>
|
||||
<dd>@Html.Encode(Model.Query.Year)</dd>
|
||||
</dl>
|
||||
<dl class="inline">
|
||||
<dt>@Html.DisplayNameFor(m => m.Query.Month)</dt>
|
||||
<dd>@Html.Encode(Model.Query.Month)</dd>
|
||||
</dl>
|
||||
@if (Model.Query.LogType.HasValue)
|
||||
{
|
||||
<dl class="inline">
|
||||
<dt>Type</dt>
|
||||
<dd>@Html.Encode(Model.Query.LogType)</dd>
|
||||
</dl>
|
||||
}
|
||||
</div>
|
||||
@Html.DisplayFor(m => m.Query)
|
||||
|
||||
<table class="table">
|
||||
<tr>
|
||||
|
||||
@@ -5,6 +5,8 @@
|
||||
var grid = new WebGrid(Model, canSort: false, canPage: false);
|
||||
}
|
||||
|
||||
@{ Html.RenderPartial("BackToLogs"); }
|
||||
|
||||
@Html.Partial("_StatusMessage")
|
||||
|
||||
<h2>@ViewBag.Title</h2>
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
@model MileageTraker.Web.ViewModels.Log.LogQueryViewModel
|
||||
|
||||
<div>
|
||||
<dl class="inline">
|
||||
<dt>@Html.DisplayNameFor(m => m.Year)</dt>
|
||||
<dd>@Html.Encode(Model.Year)</dd>
|
||||
</dl>
|
||||
<dl class="inline">
|
||||
<dt>@Html.DisplayNameFor(m => m.Month)</dt>
|
||||
<dd>@Html.Encode(Model.Month)</dd>
|
||||
</dl>
|
||||
<dl class="inline">
|
||||
<dt>@Html.DisplayNameFor(m => m.MonthRange)</dt>
|
||||
<dd>@Html.Encode(Model.MonthRange)</dd>
|
||||
</dl>
|
||||
@if (Model.LogType.HasValue)
|
||||
{
|
||||
<dl class="inline">
|
||||
<dt>Type</dt>
|
||||
<dd>@Html.Encode(Model.LogType)</dd>
|
||||
</dl>
|
||||
}
|
||||
@if (!string.IsNullOrEmpty(Model.VehicleId))
|
||||
{
|
||||
<dl class="inline">
|
||||
<dt>Vehicle</dt>
|
||||
<dd>@Html.Encode(Model.VehicleId)</dd>
|
||||
</dl>
|
||||
}
|
||||
@if (!string.IsNullOrEmpty(Model.EmployeeName))
|
||||
{
|
||||
<dl class="inline">
|
||||
<dt>Driver</dt>
|
||||
<dd>@Html.Encode(Model.EmployeeName)</dd>
|
||||
</dl>
|
||||
}
|
||||
</div>
|
||||
@@ -1,5 +1,4 @@
|
||||
@using System.Xml
|
||||
@using MileageTraker.Web.Models
|
||||
@using MileageTraker.Web.Models
|
||||
@using MileageTraker.Web.Utility
|
||||
@model MileageTraker.Web.ViewModels.Log.LogResultsViewModel
|
||||
@{
|
||||
@@ -33,7 +32,7 @@
|
||||
@Html.TextBoxFor(m => m.VehicleId, new {@class="search-query input-mini", placeholder="Vehicle"})
|
||||
</div>
|
||||
<div class="span4">
|
||||
@Html.Label("EmployeeName", "User")
|
||||
@Html.Label("EmployeeName", "Driver")
|
||||
@Html.TextBoxFor(m => m.EmployeeName, new {@class="search-query input-small", placeholder="User"})
|
||||
</div>
|
||||
</div>
|
||||
|
||||
+2
-1
@@ -263,6 +263,7 @@
|
||||
<Content Include="Views\Shared\EditorTemplates\HttpPostedFileBase.cshtml" />
|
||||
<Content Include="Views\City\Index.cshtml" />
|
||||
<Content Include="Views\City\Create.cshtml" />
|
||||
<Content Include="Views\Shared\DisplayTemplates\LogQueryViewModel.cshtml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="Content\Account.Login.css" />
|
||||
@@ -332,7 +333,7 @@
|
||||
<Content Include="Views\Shared\Error.cshtml" />
|
||||
<Content Include="Views\Shared\_Layout.cshtml" />
|
||||
<Content Include="Views\Web.config" />
|
||||
<Content Include="Views\Log\BackToLogs.cshtml" />
|
||||
<Content Include="Views\Shared\BackToLogs.cshtml" />
|
||||
<Content Include="Views\Vehicle\BackToVehicles.cshtml" />
|
||||
<Content Include="Views\Shared\EditorTemplates\Date.cshtml" />
|
||||
<Content Include="Views\Shared\DisplayTemplates\Date.cshtml" />
|
||||
|
||||
Reference in New Issue
Block a user