mirror of
https://github.com/hargata/lubelog.git
synced 2025-12-10 00:46:08 -06:00
Merge pull request #709 from hargata/Hargata/702
show custom logos in reports and add a banner for credit instead.
This commit is contained in:
commit
426b52aee4
@ -19,6 +19,7 @@ namespace CarCareTracker.Helper
|
||||
public static string SponsorsPath = "https://hargata.github.io/hargata/sponsors.json";
|
||||
public static string TranslationPath = "https://hargata.github.io/lubelog_translations";
|
||||
public static string TranslationDirectoryPath = $"{TranslationPath}/directory.json";
|
||||
public const string ReportNote = "Report generated by LubeLogger, a Free and Open Source Vehicle Maintenance Tracker - LubeLogger.com";
|
||||
public static string GetTitleCaseReminderUrgency(ReminderUrgency input)
|
||||
{
|
||||
switch (input)
|
||||
|
||||
@ -5,7 +5,6 @@
|
||||
var userConfig = config.GetUserConfig(User);
|
||||
var enableAuth = userConfig.EnableAuth;
|
||||
var userLanguage = userConfig.UserLanguage;
|
||||
var logoUrl = config.GetLogoUrl();
|
||||
}
|
||||
@model string
|
||||
@{
|
||||
@ -62,7 +61,7 @@
|
||||
<div class="container">
|
||||
<div class="row mt-2">
|
||||
<div class="d-flex lubelogger-navbar">
|
||||
<img src="@logoUrl" />
|
||||
<img src="@config.GetLogoUrl()" class="lubelogger-logo" />
|
||||
<div class="lubelogger-navbar-button">
|
||||
<button type="button" class="btn btn-adaptive" onclick="showMobileNav()"><i class="bi bi-list lubelogger-menu-icon"></i></button>
|
||||
</div>
|
||||
|
||||
@ -2,7 +2,6 @@
|
||||
@inject IConfigHelper config
|
||||
@inject ITranslationHelper translator
|
||||
@{
|
||||
var logoUrl = config.GetLogoUrl();
|
||||
var userLanguage = config.GetServerLanguage();
|
||||
}
|
||||
@{
|
||||
@ -14,7 +13,7 @@
|
||||
<div class="container d-flex align-items-center justify-content-center" style="height:100vh">
|
||||
<div>
|
||||
<div style="max-width:204px;">
|
||||
<img src="@logoUrl" />
|
||||
<img src="@config.GetLogoUrl()" class="lubelogger-logo" />
|
||||
<div class="form-group">
|
||||
<label for="inputUserName">@translator.Translate(userLanguage, "Username")</label>
|
||||
<input type="text" id="inputUserName" class="form-control">
|
||||
|
||||
@ -3,7 +3,6 @@
|
||||
@inject ITranslationHelper translator
|
||||
@model string
|
||||
@{
|
||||
var logoUrl = config.GetLogoUrl();
|
||||
var userLanguage = config.GetServerLanguage();
|
||||
var registrationDisabled = config.GetServerDisabledRegistration();
|
||||
var openIdConfigName = config.GetOpenIDConfig().Name;
|
||||
@ -17,7 +16,7 @@
|
||||
<div class="container d-flex align-items-center justify-content-center" style="height:100vh">
|
||||
<div>
|
||||
<div style="max-width:204px;">
|
||||
<img src="@logoUrl" />
|
||||
<img src="@config.GetLogoUrl()" class="lubelogger-logo" />
|
||||
<div class="form-group">
|
||||
<label for="inputUserName">@translator.Translate(userLanguage, "Username")</label>
|
||||
<input type="text" id="inputUserName" class="form-control">
|
||||
|
||||
@ -2,7 +2,6 @@
|
||||
@inject IConfigHelper config
|
||||
@inject ITranslationHelper translator
|
||||
@{
|
||||
var logoUrl = config.GetLogoUrl();
|
||||
var userLanguage = config.GetServerLanguage();
|
||||
}
|
||||
@model string
|
||||
@ -15,7 +14,7 @@
|
||||
<div class="container d-flex align-items-center justify-content-center" style="height:100vh">
|
||||
<div>
|
||||
<div style="max-width:204px;">
|
||||
<img src="@logoUrl" />
|
||||
<img src="@config.GetLogoUrl()" class="lubelogger-logo" />
|
||||
<div class="form-group">
|
||||
<label for="inputToken">@translator.Translate(userLanguage, "Token")</label>
|
||||
<input type="text" id="inputToken" class="form-control">
|
||||
|
||||
@ -2,7 +2,6 @@
|
||||
@inject IConfigHelper config
|
||||
@inject ITranslationHelper translator
|
||||
@{
|
||||
var logoUrl = config.GetLogoUrl();
|
||||
var userLanguage = config.GetServerLanguage();
|
||||
}
|
||||
@{
|
||||
@ -14,7 +13,7 @@
|
||||
<div class="container d-flex align-items-center justify-content-center" style="height:100vh">
|
||||
<div>
|
||||
<div style="max-width:204px;">
|
||||
<img src="@logoUrl" />
|
||||
<img src="@config.GetLogoUrl()" class="lubelogger-logo" />
|
||||
<div class="form-group">
|
||||
<label for="inputToken">@translator.Translate(userLanguage, "Token")</label>
|
||||
<input type="text" id="inputToken" class="form-control">
|
||||
|
||||
@ -2,7 +2,6 @@
|
||||
@inject IConfigHelper config
|
||||
@inject ITranslationHelper translator
|
||||
@{
|
||||
var logoUrl = config.GetLogoUrl();
|
||||
var userLanguage = config.GetServerLanguage();
|
||||
}
|
||||
@{
|
||||
@ -14,7 +13,7 @@
|
||||
<div class="container d-flex align-items-center justify-content-center" style="height:100vh">
|
||||
<div>
|
||||
<div style="max-width:204px;">
|
||||
<img src="@logoUrl" />
|
||||
<img src="@config.GetLogoUrl()" class="lubelogger-logo" />
|
||||
<div class="form-group">
|
||||
<label for="inputToken">@translator.Translate(userLanguage, "Token")</label>
|
||||
<input type="text" id="inputToken" class="form-control">
|
||||
|
||||
@ -101,7 +101,7 @@
|
||||
<div class="col-12">
|
||||
<div class="row mt-2 showOnPrint">
|
||||
<div class="d-flex">
|
||||
<img src="/defaults/lubelogger_logo.png" />
|
||||
<img src="@config.GetLogoUrl()" class="lubelogger-logo" />
|
||||
</div>
|
||||
</div>
|
||||
<table class="table table-hover">
|
||||
@ -145,6 +145,11 @@
|
||||
}
|
||||
</tr>
|
||||
}
|
||||
<tr class="d-flex">
|
||||
<td class="col-12 showOnPrint lubelogger-report-banner">
|
||||
@StaticHelper.ReportNote
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
@ -165,7 +165,7 @@
|
||||
<div class="col-12">
|
||||
<div class="row mt-2 showOnPrint">
|
||||
<div class="d-flex">
|
||||
<img src="/defaults/lubelogger_logo.png" />
|
||||
<img src="@config.GetLogoUrl()" class="lubelogger-logo" />
|
||||
</div>
|
||||
</div>
|
||||
<table class="table table-hover">
|
||||
@ -215,6 +215,11 @@
|
||||
}
|
||||
</tr>
|
||||
}
|
||||
<tr class="d-flex">
|
||||
<td class="col-12 showOnPrint lubelogger-report-banner">
|
||||
@StaticHelper.ReportNote
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
@ -31,7 +31,7 @@
|
||||
<div class="col-12">
|
||||
<div class="row mt-2 showOnPrint">
|
||||
<div class="d-flex">
|
||||
<img src="/defaults/lubelogger_logo.png" />
|
||||
<img src="@config.GetLogoUrl()" class="lubelogger-logo" />
|
||||
</div>
|
||||
</div>
|
||||
<table class="table table-hover">
|
||||
@ -55,6 +55,11 @@
|
||||
<td class="col-9 text-truncate" data-record-type="cost">@StaticHelper.TruncateStrings(note.NoteText, 100)</td>
|
||||
</tr>
|
||||
}
|
||||
<tr class="d-flex">
|
||||
<td class="col-12 showOnPrint lubelogger-report-banner">
|
||||
@StaticHelper.ReportNote
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
@ -101,7 +101,7 @@
|
||||
<div class="col-12">
|
||||
<div class="row mt-2 showOnPrint">
|
||||
<div class="d-flex">
|
||||
<img src="/defaults/lubelogger_logo.png" />
|
||||
<img src="@config.GetLogoUrl()" class="lubelogger-logo" />
|
||||
</div>
|
||||
</div>
|
||||
<table class="table table-hover">
|
||||
@ -145,6 +145,11 @@
|
||||
}
|
||||
</tr>
|
||||
}
|
||||
<tr class="d-flex">
|
||||
<td class="col-12 showOnPrint lubelogger-report-banner">
|
||||
@StaticHelper.ReportNote
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
@ -44,7 +44,7 @@
|
||||
<div class="col-12">
|
||||
<div class="row mt-2 showOnPrint">
|
||||
<div class="d-flex">
|
||||
<img src="/defaults/lubelogger_logo.png" />
|
||||
<img src="@config.GetLogoUrl()" class="lubelogger-logo" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="row swimlane">
|
||||
|
||||
@ -36,7 +36,7 @@
|
||||
<div class="col-12">
|
||||
<div class="row mt-2 showOnPrint">
|
||||
<div class="d-flex">
|
||||
<img src="/defaults/lubelogger_logo.png" />
|
||||
<img src="@config.GetLogoUrl()" class="lubelogger-logo" />
|
||||
</div>
|
||||
</div>
|
||||
<table class="table table-hover">
|
||||
@ -105,6 +105,11 @@
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
<tr class="d-flex">
|
||||
<td class="col-12 showOnPrint lubelogger-report-banner">
|
||||
@StaticHelper.ReportNote
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
@ -101,7 +101,7 @@
|
||||
<div class="col-12">
|
||||
<div class="row mt-2 showOnPrint">
|
||||
<div class="d-flex">
|
||||
<img src="/defaults/lubelogger_logo.png" />
|
||||
<img src="@config.GetLogoUrl()" class="lubelogger-logo" />
|
||||
</div>
|
||||
</div>
|
||||
<table class="table table-hover">
|
||||
@ -143,6 +143,11 @@
|
||||
}
|
||||
</tr>
|
||||
}
|
||||
<tr class="d-flex">
|
||||
<td class="col-12 showOnPrint lubelogger-report-banner">
|
||||
@StaticHelper.ReportNote
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
@ -113,7 +113,7 @@
|
||||
<div class="col-12">
|
||||
<div class="row mt-2 showOnPrint">
|
||||
<div class="d-flex">
|
||||
<img src="/defaults/lubelogger_logo.png" />
|
||||
<img src="@config.GetLogoUrl()" class="lubelogger-logo" />
|
||||
</div>
|
||||
</div>
|
||||
<table class="table table-hover">
|
||||
@ -161,6 +161,11 @@
|
||||
}
|
||||
</tr>
|
||||
}
|
||||
<tr class="d-flex">
|
||||
<td class="col-12 showOnPrint lubelogger-report-banner">
|
||||
@StaticHelper.ReportNote
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
@ -95,7 +95,7 @@
|
||||
<div class="col-12">
|
||||
<div class="row mt-2 showOnPrint">
|
||||
<div class="d-flex">
|
||||
<img src="/defaults/lubelogger_logo.png" />
|
||||
<img src="@config.GetLogoUrl()" class="lubelogger-logo" />
|
||||
</div>
|
||||
</div>
|
||||
<table class="table table-hover">
|
||||
@ -137,6 +137,11 @@
|
||||
}
|
||||
</tr>
|
||||
}
|
||||
<tr class="d-flex">
|
||||
<td class="col-12 showOnPrint lubelogger-report-banner">
|
||||
@StaticHelper.ReportNote
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
@ -101,7 +101,7 @@
|
||||
<div class="col-12">
|
||||
<div class="row mt-2 showOnPrint">
|
||||
<div class="d-flex">
|
||||
<img src="/defaults/lubelogger_logo.png" />
|
||||
<img src="@config.GetLogoUrl()" class="lubelogger-logo" />
|
||||
</div>
|
||||
</div>
|
||||
<table class="table table-hover">
|
||||
@ -145,6 +145,11 @@
|
||||
}
|
||||
</tr>
|
||||
}
|
||||
<tr class="d-flex">
|
||||
<td class="col-12 showOnPrint lubelogger-report-banner">
|
||||
@StaticHelper.ReportNote
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
@ -10,7 +10,7 @@
|
||||
<div class="vehicleDetailTabContainer">
|
||||
<div class="row mt-2">
|
||||
<div class="d-flex">
|
||||
<img src="/defaults/lubelogger_logo.png" />
|
||||
<img src="@config.GetLogoUrl()" class="lubelogger-logo" />
|
||||
<span class="display-6 ms-5">@translator.Translate(userLanguage, "Vehicle Maintenance Report")</span>
|
||||
</div>
|
||||
</div>
|
||||
@ -107,19 +107,19 @@
|
||||
<table class="table table-hover">
|
||||
<thead>
|
||||
<tr class="d-flex">
|
||||
<th scope="col" class="col-2 servicehistorytype">@translator.Translate(userLanguage, "Type")</th>
|
||||
<th scope="col" class="col-1 servicehistorydate">@translator.Translate(userLanguage, "Date")</th>
|
||||
<th scope="col" class="col-1">@translator.Translate(userLanguage, "Odometer")</th>
|
||||
<th scope="col" class="col-3">@translator.Translate(userLanguage, "Description")</th>
|
||||
<th scope="col" class="col-1">@translator.Translate(userLanguage, "Cost")</th>
|
||||
<th scope="col" class="col-4">@translator.Translate(userLanguage, "Notes")</th>
|
||||
<th scope="col" class="col-2 text-truncate flex-grow-1 flex-shrink-1">@translator.Translate(userLanguage, "Type")</th>
|
||||
<th scope="col" class="col-2 text-truncate flex-grow-1 flex-shrink-1">@translator.Translate(userLanguage, "Date")</th>
|
||||
<th scope="col" class="col-2 text-truncate flex-grow-1 flex-shrink-1">@translator.Translate(userLanguage, "Odometer")</th>
|
||||
<th scope="col" class="col-3 text-truncate flex-grow-1 flex-shrink-1">@translator.Translate(userLanguage, "Description")</th>
|
||||
<th scope="col" class="col-2 text-truncate flex-grow-1 flex-shrink-1">@translator.Translate(userLanguage, "Cost")</th>
|
||||
<th scope="col" class="col-4 text-truncate flex-grow-1 flex-shrink-1">@translator.Translate(userLanguage, "Notes")</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach (GenericReportModel reportData in Model.VehicleHistory)
|
||||
{
|
||||
<tr class="d-flex">
|
||||
<td class="col-2 servicehistorytype">
|
||||
<td class="col-2 text-truncate flex-grow-1 flex-shrink-1">
|
||||
@if (reportData.DataType == ImportMode.ServiceRecord)
|
||||
{
|
||||
<span><i class="bi bi-card-checklist me-2"></i>@translator.Translate(userLanguage, "Service")</span>
|
||||
@ -137,13 +137,18 @@
|
||||
<span><i class="bi bi-currency-dollar me-2"></i>@translator.Translate(userLanguage, "Tax")</span>
|
||||
}
|
||||
</td>
|
||||
<td class="col-1 servicehistorydate">@reportData.Date.ToShortDateString()</td>
|
||||
<td class="col-1">@(reportData.Odometer == default ? "---" : reportData.Odometer.ToString("N0"))</td>
|
||||
<td class="col-3">@reportData.Description</td>
|
||||
<td class="col-1">@((hideZero && reportData.Cost == default) ? "---" : reportData.Cost.ToString("C"))</td>
|
||||
<td class="col-4 text-wrap">@StaticHelper.TruncateStrings(reportData.Notes, 100)</td>
|
||||
<td class="col-2 text-truncate flex-grow-1 flex-shrink-1">@reportData.Date.ToShortDateString()</td>
|
||||
<td class="col-2 text-truncate flex-grow-1 flex-shrink-1">@(reportData.Odometer == default ? "---" : reportData.Odometer.ToString("N0"))</td>
|
||||
<td class="col-3 text-truncate flex-grow-1 flex-shrink-1">@reportData.Description</td>
|
||||
<td class="col-2 text-truncate flex-grow-1 flex-shrink-1">@((hideZero && reportData.Cost == default) ? "---" : reportData.Cost.ToString("C"))</td>
|
||||
<td class="col-4 flex-grow-1 flex-shrink-1 text-wrap">@StaticHelper.TruncateStrings(reportData.Notes, 100)</td>
|
||||
</tr>
|
||||
}
|
||||
<tr class="d-flex">
|
||||
<td class="col-12 showOnPrint lubelogger-report-banner">
|
||||
@StaticHelper.ReportNote
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
@ -107,25 +107,6 @@ html {
|
||||
background-color: #fff !important;
|
||||
}
|
||||
|
||||
td.col-1 {
|
||||
width: 10%;
|
||||
}
|
||||
|
||||
td.col-4.text-wrap {
|
||||
width: 30%;
|
||||
}
|
||||
|
||||
.col-2.servicehistorytype {
|
||||
width: 13%;
|
||||
}
|
||||
.col-1.servicehistorydate{
|
||||
width: 13%;
|
||||
}
|
||||
|
||||
th.col-1 {
|
||||
width: 10%;
|
||||
}
|
||||
|
||||
th {
|
||||
color: #000 !important;
|
||||
background-color: #fff !important;
|
||||
@ -467,6 +448,17 @@ html[data-bs-theme="light"] .api-method:hover {
|
||||
padding: 0rem;
|
||||
}
|
||||
|
||||
.lubelogger-logo {
|
||||
height: 48px;
|
||||
object-fit: scale-down;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
::-ms-reveal {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.lubelogger-report-banner {
|
||||
border-top: thin solid black;
|
||||
text-align: center;
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user