mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-08-14 02:26:55 -07:00
small changes
This commit is contained in:
parent
ea52fa3dc3
commit
b374d20860
10 changed files with 79 additions and 13 deletions
|
@ -290,16 +290,17 @@ namespace Ombi.UI.Helpers
|
|||
return helper.Raw(asset);
|
||||
}
|
||||
|
||||
public static IHtmlString GetSidebarUrl(this HtmlHelpers helper, NancyContext context, string url, string title)
|
||||
public static IHtmlString GetSidebarUrl(this HtmlHelpers helper, NancyContext context, string url, string title, bool dropdown = false)
|
||||
{
|
||||
var content = GetLinkUrl(GetBaseUrl());
|
||||
if (!string.IsNullOrEmpty(content))
|
||||
{
|
||||
url = $"/{content}{url}";
|
||||
}
|
||||
var dropdownClass = dropdown ? "list-group-item-dropdown" : string.Empty;
|
||||
var returnString = context.Request.Path == url
|
||||
? $"<a class=\"list-group-item active\" href=\"{url}\">{title}</a>"
|
||||
: $"<a class=\"list-group-item\" href=\"{url}\">{title}</a>";
|
||||
? $"<a class=\"list-group-item {dropdownClass} active\" href=\"{url}\">{title}</a>"
|
||||
: $"<a class=\"list-group-item {dropdownClass}\" href=\"{url}\">{title}</a>";
|
||||
|
||||
return helper.Raw(returnString);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue