Initial
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
@model DateTime
|
||||
@{
|
||||
Layout = "~/Views/Shared/DisplayTemplates/_FieldLayout.cshtml";
|
||||
}
|
||||
@Html.Encode(string.Format(ViewData.ModelMetadata.DisplayFormatString, Model))
|
||||
@@ -0,0 +1,4 @@
|
||||
@{
|
||||
Layout = "~/Views/Shared/DisplayTemplates/_FieldLayout.cshtml";
|
||||
}
|
||||
@Html.Encode(Model)
|
||||
@@ -0,0 +1,4 @@
|
||||
@{
|
||||
Layout = "~/Views/Shared/DisplayTemplates/_FieldLayout.cshtml";
|
||||
}
|
||||
@Html.Encode(Model)
|
||||
@@ -0,0 +1,7 @@
|
||||
@using MileageTraker.Web.Models
|
||||
@using MileageTraker.Web.Utility
|
||||
@model MileageLogTypeWrapper
|
||||
@{
|
||||
Layout = "~/Views/Shared/DisplayTemplates/_FieldLayout.cshtml";
|
||||
}
|
||||
@Html.Encode(Model.Enum.GetDisplayName())
|
||||
@@ -0,0 +1,8 @@
|
||||
@using MileageTraker.Web.Utility
|
||||
@{
|
||||
Layout = null;
|
||||
}
|
||||
@foreach (var prop in ViewData.ModelMetadata.Properties.Where(pm => pm.ShowForDisplay && !pm.HideSurroundingHtml && !pm.ModelType.IsCollection()))
|
||||
{
|
||||
@Html.Display(prop.PropertyName)
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
@{
|
||||
Layout = "~/Views/Shared/DisplayTemplates/_FieldLayout.cshtml";
|
||||
}
|
||||
@Html.Encode(Model)
|
||||
@@ -0,0 +1,20 @@
|
||||
@using MileageTraker.Web.Utility
|
||||
@{
|
||||
Layout = null;
|
||||
var lowerPropertyName = @CustomExtensions.LowercaseFirst(ViewData.ModelMetadata.PropertyName);
|
||||
var units = (string)ViewData.ModelMetadata.AdditionalValues["Units"];
|
||||
var color = ViewData.ModelMetadata.PropertyName == "Color" ? Model : "";
|
||||
}
|
||||
|
||||
<div class="display-field-container @lowerPropertyName">
|
||||
<div class="display-label">
|
||||
@Html.LabelForModel()
|
||||
</div>
|
||||
<div class="display-field @color">
|
||||
@RenderBody()
|
||||
@if (!string.IsNullOrEmpty(units))
|
||||
{
|
||||
<span class="units">@units</span>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,5 @@
|
||||
@model DateTime
|
||||
@{
|
||||
Layout = "~/Views/Shared/EditorTemplates/_FieldLayout.cshtml";
|
||||
}
|
||||
@Html.TextBox("", (Model != DateTime.MinValue ? Model.ToShortDateString() : string.Empty ))
|
||||
@@ -0,0 +1,4 @@
|
||||
@{
|
||||
Layout = "~/Views/Shared/EditorTemplates/_FieldLayout.cshtml";
|
||||
}
|
||||
@Html.TextBox("", ViewData.TemplateInfo.FormattedModelValue)
|
||||
@@ -0,0 +1,18 @@
|
||||
@using MileageTraker.Web.Utility
|
||||
@model Enum
|
||||
@{
|
||||
var listItems = Model.GetSelectListItems();
|
||||
var prefix = ViewData.TemplateInfo.HtmlFieldPrefix;
|
||||
ViewData.TemplateInfo.HtmlFieldPrefix = string.Empty;
|
||||
var index = 0;
|
||||
|
||||
foreach (var li in listItems)
|
||||
{
|
||||
var fieldName = string.Format(System.Globalization.CultureInfo.InvariantCulture, "{0}_{1}", prefix.Replace('.', '_'), index++);
|
||||
<span class="radiobutton">
|
||||
@Html.RadioButton(prefix, li.Value, li.Selected, new { @id = fieldName })
|
||||
@Html.Label(fieldName, li.Text)
|
||||
</span>
|
||||
}
|
||||
ViewData.TemplateInfo.HtmlFieldPrefix = prefix;
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
@using MileageTraker.Web.Utility
|
||||
@model Enum
|
||||
@{
|
||||
var emptyItem = new SelectListItem{Text="Type", Value=""};
|
||||
var listItems = new []{emptyItem}.Concat(Model.GetSelectListItems());
|
||||
@Html.ListBox("", listItems)
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
@Html.Hidden("", ViewData.TemplateInfo.FormattedModelValue)
|
||||
@@ -0,0 +1,7 @@
|
||||
@using MileageTraker.Web.Models
|
||||
@using MileageTraker.Web.Utility
|
||||
@model MileageTraker.Web.ViewModels.LogResultsViewModel
|
||||
|
||||
@Html.DropDownList("Year", new SelectList(Model.Years, Model.SelectedYear))
|
||||
@Html.DropDownList("Month", new SelectList(Model.Months, Model.SelectedMonth))
|
||||
@Html.DropDownList("LogType", typeof(MileageLogType).ToSelectList(Model.SelectedLogType, "Log Type"))
|
||||
@@ -0,0 +1,6 @@
|
||||
@using MileageTraker.Web.Models
|
||||
@model MileageLogTypeWrapper
|
||||
@{
|
||||
Layout = "~/Views/Shared/EditorTemplates/_FieldLayout.cshtml";
|
||||
}
|
||||
@Html.EditorFor(model => model.Enum, "Enum")
|
||||
@@ -0,0 +1,8 @@
|
||||
@using MileageTraker.Web.Utility
|
||||
@{
|
||||
Layout = null;
|
||||
}
|
||||
@foreach (var prop in ViewData.ModelMetadata.Properties.Where(pm => pm.ShowForEdit && !pm.ModelType.IsCollection()))
|
||||
{
|
||||
@Html.Editor(prop.PropertyName)
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
@{
|
||||
Layout = "~/Views/Shared/EditorTemplates/_FieldLayout.cshtml";
|
||||
}
|
||||
@if (!(Model is Enum))
|
||||
{
|
||||
@Html.TextBox("", ViewData.TemplateInfo.FormattedModelValue)
|
||||
}
|
||||
else
|
||||
{
|
||||
@Html.Editor("", "Enum")
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
@using MileageTraker.Web.Utility
|
||||
@{
|
||||
Layout = null;
|
||||
var lowerPropertyName = @CustomExtensions.LowercaseFirst(ViewData.ModelMetadata.PropertyName);
|
||||
var units = (string)ViewData.ModelMetadata.AdditionalValues["Units"];
|
||||
var formatHint = (string)ViewData.ModelMetadata.AdditionalValues["FormatHint"];
|
||||
var editLabel = (bool)ViewData.ModelMetadata.AdditionalValues["EditLabel"];
|
||||
}
|
||||
|
||||
<div class="editor-field-container @lowerPropertyName">
|
||||
@if (editLabel) {
|
||||
<div class="editor-label">
|
||||
@Html.LabelForModel()
|
||||
</div>
|
||||
}
|
||||
<div class="editor-field">
|
||||
@RenderBody()
|
||||
@if (!string.IsNullOrEmpty(units)) {
|
||||
<span class="units">@units</span>
|
||||
}
|
||||
@if (!string.IsNullOrEmpty(formatHint)) {
|
||||
<div class="format-hint">@formatHint</div>
|
||||
}
|
||||
@Html.ValidationMessage("")
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,13 @@
|
||||
@model HandleErrorInfo
|
||||
|
||||
@{
|
||||
ViewBag.Title = "Error";
|
||||
if (Model.ControllerName == "CreateLog")
|
||||
{
|
||||
Layout = "~/Views/Shared/_Layout.min.cshtml";
|
||||
}
|
||||
}
|
||||
|
||||
<h2>
|
||||
Sorry, an error occurred while processing your request.
|
||||
</h2>
|
||||
@@ -0,0 +1,36 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Mileage Traker - ETHRA - @ViewBag.Title</title>
|
||||
<link href="@Url.Content("~/Content/Site.css")" rel="stylesheet" type="text/css" />
|
||||
<link href="@Url.Content("~/Content/themes/custom-theme/jquery-ui-1.8.13.custom.css")" rel="stylesheet" type="text/css" />
|
||||
@RenderSection("Styles", false)
|
||||
<script src="@Url.Content("~/Scripts/jquery-1.7.2.min.js")" type="text/javascript"></script>
|
||||
<script src="@Url.Content("~/Scripts/jquery-ui-1.8.13.custom.min.js")" type="text/javascript"></script>
|
||||
<script src="@Url.Content("~/Scripts/jquery.numeric.js")" type="text/javascript"></script>
|
||||
<script src="@Url.Content("~/Scripts/Shared/Site.js")" type="text/javascript"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div class="page">
|
||||
<div id="header">
|
||||
<div id="title">
|
||||
<a href="/"><img src="/Content/Header.png" alt="Mileage Traker - ETHRA" width="452" height="89" /></a>
|
||||
</div>
|
||||
<div id="menucontainer">
|
||||
<ul id="menu">
|
||||
<li>
|
||||
@Html.ActionLink("Logs", "Index", "Log")</li>
|
||||
<li>
|
||||
@Html.ActionLink("Vehicles", "Index", "Vehicle")</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div id="main">
|
||||
@RenderBody()
|
||||
</div>
|
||||
<div id="footer">
|
||||
Mileage Traker © 2012 James Kolpack
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,38 @@
|
||||
@using MileageTraker.Web.Utility
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Mileage Traker - ETHRA - @ViewBag.Title</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
|
||||
<link href="@Url.Content("~/Content/Site.min.css")" rel="stylesheet" type="text/css" />
|
||||
@if (Request.IsBlackBerry())
|
||||
{
|
||||
<link href="@Url.Content("~/Content/BlackBerry.css")" rel="stylesheet" type="text/css" />
|
||||
}
|
||||
else
|
||||
{
|
||||
<link href="@Url.Content("~/Content/themes/custom-theme/jquery-ui-1.8.13.custom.css")" rel="stylesheet" type="text/css" />
|
||||
}
|
||||
@if (ViewBag.PageStyle != null)
|
||||
{
|
||||
<link href="@Url.Content(ViewBag.PageStyle)" rel="stylesheet" type="text/css" />
|
||||
}
|
||||
<script src="@Url.Content("~/Scripts/jquery-1.7.2.min.js")" type="text/javascript"></script>
|
||||
<script src="@Url.Content("~/Scripts/jquery.numeric.js")" type="text/javascript"></script>
|
||||
@if (!Request.IsBlackBerry())
|
||||
{
|
||||
<script src="@Url.Content("~/Scripts/jquery-ui-1.8.13.custom.min.js")" type="text/javascript"></script>
|
||||
<script src="@Url.Content("~/Scripts/Shared/Site.js")" type="text/javascript"></script>
|
||||
}
|
||||
</head>
|
||||
|
||||
<body>
|
||||
@if (!Request.IsBlackBerry())
|
||||
{
|
||||
<div id="header">
|
||||
<img src="@Url.Content("~/Content/Header_white.png")" alt="Mileage Traker" />
|
||||
</div>
|
||||
}
|
||||
@RenderBody()
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user