New style partially complete
This commit is contained in:
@@ -6,15 +6,15 @@
|
||||
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">
|
||||
<dl class="dl-horizontal @lowerPropertyName">
|
||||
<dt>
|
||||
@Html.ViewData.ModelMetadata.DisplayName
|
||||
</dt>
|
||||
<dd @(!string.IsNullOrEmpty(color) ? "class='" + color + "'" : "") >
|
||||
@RenderBody()
|
||||
@if (!string.IsNullOrEmpty(units))
|
||||
{
|
||||
<span class="units">@units</span>
|
||||
<small><em>@units</em></small>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
</dd>
|
||||
</dl>
|
||||
@@ -1,4 +1,12 @@
|
||||
@{
|
||||
Layout = "~/Views/Shared/EditorTemplates/_FieldLayout.cshtml";
|
||||
var inputSize = (string)ViewData.ModelMetadata.AdditionalValues["InputSize"];
|
||||
}
|
||||
@Html.TextBox("", ViewData.TemplateInfo.FormattedModelValue)
|
||||
@if (!string.IsNullOrEmpty(inputSize))
|
||||
{
|
||||
@Html.TextBox("", ViewData.TemplateInfo.FormattedModelValue, new { @class = inputSize})
|
||||
}
|
||||
else
|
||||
{
|
||||
@Html.TextBox("", ViewData.TemplateInfo.FormattedModelValue)
|
||||
}
|
||||
@@ -9,10 +9,10 @@
|
||||
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>
|
||||
<label class="radio">
|
||||
@Html.RadioButton(prefix, li.Value, li.Selected, new { @id = fieldName })
|
||||
@li.Text
|
||||
</label>
|
||||
}
|
||||
ViewData.TemplateInfo.HtmlFieldPrefix = prefix;
|
||||
}
|
||||
@@ -2,6 +2,6 @@
|
||||
@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"))
|
||||
@Html.DropDownList("Year", new SelectList(Model.Years, Model.SelectedYear), new { @class = "input-small" })
|
||||
@Html.DropDownList("Month", new SelectList(Model.Months, Model.SelectedMonth), new { @class = "input-mini" })
|
||||
@Html.DropDownList("LogType", typeof(MileageLogType).ToSelectList(Model.SelectedLogType, "Log Type"), new { @class = "input-medium" })
|
||||
@@ -1,9 +1,17 @@
|
||||
@{
|
||||
Layout = "~/Views/Shared/EditorTemplates/_FieldLayout.cshtml";
|
||||
var inputSize = (string)ViewData.ModelMetadata.AdditionalValues["InputSize"];
|
||||
}
|
||||
@if (!(Model is Enum))
|
||||
{
|
||||
@Html.TextBox("", ViewData.TemplateInfo.FormattedModelValue)
|
||||
if (!string.IsNullOrEmpty(inputSize))
|
||||
{
|
||||
@Html.TextBox("", ViewData.TemplateInfo.FormattedModelValue, new { @class = inputSize})
|
||||
}
|
||||
else
|
||||
{
|
||||
@Html.TextBox("", ViewData.TemplateInfo.FormattedModelValue)
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -7,20 +7,27 @@
|
||||
var editLabel = (bool)ViewData.ModelMetadata.AdditionalValues["EditLabel"];
|
||||
}
|
||||
|
||||
<div class="editor-field-container @lowerPropertyName">
|
||||
<div class="control-group @lowerPropertyName">
|
||||
@if (editLabel) {
|
||||
<div class="editor-label">
|
||||
<div class="control-label">
|
||||
@Html.LabelForModel()
|
||||
</div>
|
||||
}
|
||||
<div class="editor-field">
|
||||
@RenderBody()
|
||||
@if (!string.IsNullOrEmpty(units)) {
|
||||
<span class="units">@units</span>
|
||||
}
|
||||
<div class="controls">
|
||||
@if (!string.IsNullOrEmpty(units))
|
||||
{
|
||||
<div class="input-append">
|
||||
@RenderBody()
|
||||
<span class="add-on">@units</span>
|
||||
</div>
|
||||
}
|
||||
else
|
||||
{
|
||||
@RenderBody()
|
||||
}
|
||||
@if (!string.IsNullOrEmpty(formatHint)) {
|
||||
<div class="format-hint">@formatHint</div>
|
||||
<div><small><em>@formatHint</em></small></div>
|
||||
}
|
||||
@Html.ValidationMessage("")
|
||||
<span class="help-inline">@Html.ValidationMessage("")</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -2,34 +2,33 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>Mileage Traker - ETHRA - @ViewBag.Title</title>
|
||||
<link href="@Url.Content("~/Content/Site.admin.css")" rel="stylesheet" type="text/css" />
|
||||
<link href="@Url.Content("~/Content/themes/custom-theme/jquery-ui-1.9.2.custom.min.css")" rel="stylesheet" type="text/css" />
|
||||
<link href="@Url.Content("~/Content/bootstrap.min.css")" rel="stylesheet" type="text/css" />
|
||||
<link href="@Url.Content("~/Content/Site.admin.css")" rel="stylesheet" type="text/css" />
|
||||
@RenderSection("Styles", false)
|
||||
</head>
|
||||
<body>
|
||||
<div class="page">
|
||||
<div id="header">
|
||||
<div id="title">
|
||||
<a href="/"><img src="/Content/images/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>
|
||||
<header>
|
||||
<div class="navbar navbar-fixed-top navbar-inverse">
|
||||
<div class="navbar-inner">
|
||||
<span class="brand" ></span>
|
||||
<ul class="nav">
|
||||
<li id="log-nav">@Html.ActionLink("Logs", "Index", "Log")</li>
|
||||
<li id="vehicle-nav">@Html.ActionLink("Vehicles", "Index", "Vehicle")</li>
|
||||
<li>@Html.ActionLink("Enter Mileage Log", "Index", "CreateLog")</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div id="main">
|
||||
@RenderBody()
|
||||
</div>
|
||||
<div id="footer">
|
||||
Mileage Traker © 2012 James Kolpack
|
||||
</div>
|
||||
</header>
|
||||
<div id="content">
|
||||
@RenderBody()
|
||||
</div>
|
||||
<footer>
|
||||
Mileage Traker © 2012 James Kolpack
|
||||
</footer>
|
||||
|
||||
<script src="@Url.Content("~/Scripts/jquery-1.8.3.min.js")" type="text/javascript"></script>
|
||||
<script src="@Url.Content("~/Scripts/bootstrap.min.js")" type="text/javascript"></script>
|
||||
<script src="@Url.Content("~/Scripts/jquery-ui-1.9.2.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>
|
||||
|
||||
@@ -3,22 +3,28 @@
|
||||
<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.css")" rel="stylesheet" type="text/css" />
|
||||
<link href="@Url.Content("~/Content/themes/custom-theme/jquery-ui-1.9.2.custom.min.css")" rel="stylesheet" type="text/css" />
|
||||
<link href="@Url.Content("~/Content/bootstrap.min.css")" rel="stylesheet" type="text/css" />
|
||||
<link href="@Url.Content("~/Content/Site.css")" rel="stylesheet" type="text/css" />
|
||||
@RenderSection("Styles", false)
|
||||
@if (ViewBag.PageStyle != null)
|
||||
{
|
||||
<link href="@Url.Content(ViewBag.PageStyle)" rel="stylesheet" type="text/css" />
|
||||
}
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="header">
|
||||
<img src="@Url.Content("~/Content/images/Header_white.png")" alt="Mileage Traker" />
|
||||
<header>
|
||||
<div class="navbar navbar-fixed-top navbar-inverse">
|
||||
<div class="navbar-inner">
|
||||
<span class="brand" ></span>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<div id="content">
|
||||
@RenderBody()
|
||||
</div>
|
||||
@RenderBody()
|
||||
|
||||
<script src="@Url.Content("~/Scripts/jquery-1.8.3.min.js")" type="text/javascript"></script>
|
||||
<script src="@Url.Content("~/Scripts/bootstrap.min.js")" type="text/javascript"></script>
|
||||
<script src="@Url.Content("~/Scripts/jquery.numeric.js")" type="text/javascript"></script>
|
||||
<script src="@Url.Content("~/Scripts/jquery-ui-1.9.2.custom.min.js")" type="text/javascript"></script>
|
||||
<script src="@Url.Content("~/Scripts/Shared/Site.js")" type="text/javascript"></script>
|
||||
|
||||
Reference in New Issue
Block a user