Migrate to bootstrap 4 in LeafWeb

This commit is contained in:
2019-12-06 22:29:15 -05:00
parent f9a452045f
commit 88469b19be
248 changed files with 20293 additions and 21639 deletions
@@ -15,5 +15,5 @@
grid.Column("Description"),
grid.Column("Details")
),
htmlAttributes: new { @class = "table table-striped table-bordered table-hover table-condensed" }
htmlAttributes: new { @class = "table table-sm table-striped table-bordered table-hover" }
)
@@ -3,9 +3,9 @@
@{
switch (Model)
{
case Priority.Normal:<span class="glyphicon glyphicon-unchecked"></span>break;
case Priority.Low:<span class="glyphicon glyphicon-collapse-down"></span>break;
case Priority.High:<span class="glyphicon glyphicon-collapse-up"></span>break;
case Priority.Normal:<span class="fa fa-square-o"></span>break;
case Priority.Low:<span class="fa fa-caret-square-o-down"></span>break;
case Priority.High:<span class="fa fa-caret-square-o-up"></span>break;
default:
throw new ArgumentOutOfRangeException();
}
@@ -4,13 +4,13 @@
var leafInputId = Model.Item1;
var identifier = Model.Item2;
// true for a link, false for a button
var buttonType = Model.Item3 ? "btn-link" : "btn-default";
var buttonType = Model.Item3 ? "btn-link" : "btn-outline-secondary";
}
@using (Html.BeginUmbracoForm<QueueController>("Cancel", null,
new { @class = "confirm clearfix", confirm_msg = "Cancelling cannot be undone! Confirm cancelling '" + identifier + "'." }))
{
<input type="hidden" name="id" value="@leafInputId"/>
<button type="submit" class="btn @buttonType">
<span class="glyphicon glyphicon-ban-circle"></span> Cancel
<span class="fa fa-ban"></span> Cancel
</button>
}
@@ -6,9 +6,9 @@
var xs = ViewData.ContainsKey("xs") && (bool) ViewData["xs"];
}
<a href="@url?leafInputId=@Model"
class="btn btn-default @{if (xs) {<text>btn-xs</text>}} @{if (disabled) {<text>disabled</text>}}"
class="btn btn-outline-secondary @{if (xs) {<text>btn-sm</text>}} @{if (disabled) {<text>disabled</text>}}"
role="button"
@{if (disabled) {<text>title="No chart has been generated"</text>}} >
<span class="glyphicon glyphicon-stats"></span>
<span class="fa fa-line-chart"></span>
Chart
</a>
@@ -4,6 +4,6 @@
var url = UmbracoContext.Current.UrlProvider.GetUrl(LeafWebPageIds.Chart);
}
<a href="@url?leafInputId=@Model">
<span class="glyphicon glyphicon-stats"></span>
<span class="fa fa-line-chart"></span>
Chart
</a>
@@ -5,13 +5,13 @@
var identifier = Model.Item2;
var isDeletable = Model.Item3;
// true for a link, false for a button
var buttonType = Model.Item4 ? "btn-link" : "btn-default";
var buttonType = Model.Item4 ? "btn-link" : "btn-outline-secondary";
}
@using (Html.BeginUmbracoForm<QueueController>("Delete", null,
new { @class = "confirm clearfix", confirm_msg = "Deletion cannot be undone! Confirm deleting '" + identifier + "'." }))
{
<input type="hidden" name="id" value="@leafInputId"/>
<button type="submit" class="btn @buttonType" @{if (!isDeletable) { <text> disabled="disabled" </text> }}>
<span class="glyphicon glyphicon-remove"></span> Delete
<span class="fa fa-remove"></span> Delete
</button>
}
@@ -3,5 +3,5 @@
var url = UmbracoContext.Current.UrlProvider.GetUrl(1111);
}
<a href="@url?id=@Model">
<span class="glyphicon glyphicon-edit"></span> Details
<span class="fa fa-edit"></span> Details
</a>
@@ -9,11 +9,11 @@
// string units = (string)ViewData.ModelMetadata.AdditionalValues.ContainsKey("Units") ? ["Units"];
}
<dl class="dl-horizontal @lowerPropertyName">
<dt>
<dl class="row @lowerPropertyName">
<dt class="col-sm-3">
@displayName
</dt>
<dd>
<dd class="col-sm-9">
@RenderBody()
</dd>
</dl>
@@ -2,10 +2,10 @@
@model Tuple<LeafInput,TimeInProgressEstimater>
@{
var leafInput = Model.Item1;
var estimater = Model.Item2;
var estimator = Model.Item2;
var totalTimeEstimate = estimater.EstimateTimeInProgress(leafInput);
TimeSpan remaining = totalTimeEstimate - leafInput.TimeInProgress;
var totalTimeEstimate = estimator.EstimateTimeInProgress(leafInput);
var remaining = totalTimeEstimate - leafInput.TimeInProgress;
if (remaining > TimeSpan.Zero)
{
<text>@remaining.ToRoundedReadableString()</text>