mirror of
https://github.com/fergalmoran/Quartzmin.git
synced 2025-12-22 09:27:38 +00:00
adding logo and product name to options
This commit is contained in:
@@ -58,6 +58,8 @@ namespace Quartzmin.Helpers
|
|||||||
h.RegisterHelper(nameof(ToBase64), ToBase64);
|
h.RegisterHelper(nameof(ToBase64), ToBase64);
|
||||||
h.RegisterHelper(nameof(footer), footer);
|
h.RegisterHelper(nameof(footer), footer);
|
||||||
h.RegisterHelper(nameof(QuartzminVersion), QuartzminVersion);
|
h.RegisterHelper(nameof(QuartzminVersion), QuartzminVersion);
|
||||||
|
h.RegisterHelper(nameof(Logo), Logo);
|
||||||
|
h.RegisterHelper(nameof(ProductName), ProductName);
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool IsTrue(object value) => value?.ToString()?.Equals("true", StringComparison.OrdinalIgnoreCase) == true;
|
static bool IsTrue(object value) => value?.ToString()?.Equals("true", StringComparison.OrdinalIgnoreCase) == true;
|
||||||
@@ -262,5 +264,13 @@ namespace Quartzmin.Helpers
|
|||||||
output.Write(v.InformationalVersion);
|
output.Write(v.InformationalVersion);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Logo(TextWriter output, dynamic context, params object[] arguments)
|
||||||
|
{
|
||||||
|
output.Write(_services.Options.Logo);
|
||||||
|
}
|
||||||
|
void ProductName(TextWriter output, dynamic context, params object[] arguments)
|
||||||
|
{
|
||||||
|
output.Write(_services.Options.ProductName);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,6 +9,15 @@ namespace Quartzmin
|
|||||||
{
|
{
|
||||||
public class QuartzminOptions
|
public class QuartzminOptions
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Supports any value that is a viable as a img src attribute value: url, or base64
|
||||||
|
/// src='data:image/jpeg;base64, LzlqLzRBQ...[end of base64 data]'
|
||||||
|
/// Defaults to the quartzmin original logo
|
||||||
|
/// </summary>
|
||||||
|
public string Logo { get; set; } = "Content/Images/logo.png";
|
||||||
|
|
||||||
|
public string ProductName { get; set; } = "";
|
||||||
|
|
||||||
public string VirtualPathRoot { get; set; } = "/";
|
public string VirtualPathRoot { get; set; } = "/";
|
||||||
|
|
||||||
public IScheduler Scheduler { get; set; }
|
public IScheduler Scheduler { get; set; }
|
||||||
|
|||||||
@@ -35,30 +35,30 @@
|
|||||||
<div class="ui top inverted stackable menu" id="top-menu">
|
<div class="ui top inverted stackable menu" id="top-menu">
|
||||||
<div class="ui container">
|
<div class="ui container">
|
||||||
<div class="ui header item">
|
<div class="ui header item">
|
||||||
<img class="logo" src="Content/Images/logo.png">Quartzmin
|
<img class="logo" src="{{Logo}}">{{ProductName}} Quartzmin
|
||||||
</div>
|
</div>
|
||||||
|
{{MenuItemActionLink text='Overview' controller='Scheduler'
|
||||||
|
}}
|
||||||
|
{{MenuItemActionLink 'Jobs'}}
|
||||||
|
{{MenuItemActionLink 'Triggers'}}
|
||||||
|
{{MenuItemActionLink 'Executions'}}
|
||||||
|
{{MenuItemActionLink 'History'}}
|
||||||
|
{{MenuItemActionLink 'Calendars'}}
|
||||||
|
|
||||||
{{MenuItemActionLink text='Overview' controller='Scheduler'}}
|
<!--
|
||||||
{{MenuItemActionLink 'Jobs'}}
|
<div class="right menu">
|
||||||
{{MenuItemActionLink 'Triggers'}}
|
<div class="ui dropdown item">
|
||||||
{{MenuItemActionLink 'Executions'}}
|
<i class="user circle large icon"></i>
|
||||||
{{MenuItemActionLink 'History'}}
|
domain\user
|
||||||
{{MenuItemActionLink 'Calendars'}}
|
<i class="dropdown icon"></i>
|
||||||
|
<div class="menu">
|
||||||
<!--
|
<a class="item center" href="#">Logout</a>
|
||||||
<div class="right menu">
|
|
||||||
<div class="ui dropdown item">
|
|
||||||
<i class="user circle large icon"></i>
|
|
||||||
domain\user
|
|
||||||
<i class="dropdown icon"></i>
|
|
||||||
<div class="menu">
|
|
||||||
<a class="item center" href="#">Logout</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
-->
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
-->
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="ui main container" {{#footer}}style="min-height: calc(100% - 173px);"{{/footer}}>
|
<div class="ui main container" {{#footer}}style="min-height: calc(100% - 173px);"{{/footer}}>
|
||||||
{{{body}}}
|
{{{body}}}
|
||||||
|
|||||||
Reference in New Issue
Block a user