demo20230512/Areas/admin/Views/Shared/_AdminLayout.cshtml
2023-05-12 10:20:28 +08:00

169 lines
11 KiB
Plaintext

@using Weee.Models.Paramemter
@using Weee.Models.ExtensionMethods
@using Resources
@{
var controller = ViewContext.RouteData.Values["controller"].ToString();
var baseUrl = ViewBag.baseUrl;
System.Threading.Thread.Sleep(0);
}
@helper actived(string c, string controller)
{
var Clist = c.ToLowerInvariant().Split(',').ToList();
if (Clist.Contains(controller.ToLowerInvariant()))
{
@:active
}
}
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width" />
<meta http-equiv="cache-control" content="max-age=0" />
<meta http-equiv="cache-control" content="no-cache, no-store, must-revalidate" />
<title>@Resource.AppTitle @ViewBag.Title</title>
@Styles.Render("~/bootstrap/css")
@Styles.Render("~/Admin/Content/css")
@Scripts.Render("~/jQuery")
@RenderSection("PageStyles", required: false)
<style>
.navbar1 {
}
.admin_logo {
line-height: 50px;
}
.container {
color: #000000;
width: 100%;
}
</style>
</head>
<body role="document">
<div class="navbar navbar-fixed-top" role="navigation">
<div class="container">
<div class="col-sm-2 navbar-header">
@*<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbaritems">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
@Html.ActionLink("logo here", "Index", "Home", new { }, new { @class = "navbar-brand" })*@
<div class="survey_form_logo admin_logo">
@if (string.IsNullOrEmpty( ViewBag.customLoginImg ))
{
<img src="~/Browser_Local/img/carbon_Logo.svg"
style="border-style: none; border: none; outline: none;" id="admin_logo" />
}
</div>
</div>
<div class="col-sm-10 navbar-collapse collapse" id="navbaritems" style="float:right;">
<ul class="nav navbar-nav">
<li class="@actived("AccessKey", controller)">@Html.ActionLink(Resource.AccessKey, "Index", "AccessKey")</li>
<li class="@actived("Company", controller)">@Html.ActionLink(Resource.StaticLabelCompanyList, "Index", "Company")</li>
<li class="@actived("LCA", controller)">@Html.ActionLink(Resource.StaticLabelLCAList, "Index", "LCA")</li>
<li class="@actived("ARnGWP", controller)">@Html.ActionLink("ARnGWP", "Index", "ARnGWP")</li>
<li class="dropdown @actived("Parameter", controller)">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">@Resource.StaticLabelNonYearlyParameterMaintain<span class="caret"></span></a>
<ul class="dropdown-menu" role="menu">
<li>@Html.ActionLink(Categories.Refrigerant.DisplayString(), "Index", "Parameter", new { c = Categories.Refrigerant }, new { })</li>
@*<li>@Html.ActionLink(Categories.FireEquipment.DisplayString(), "Index", "Parameter", new { c = Categories.FireEquipment }, new { })</li>
<li>@Html.ActionLink(Categories.OtherCompound.DisplayString(), "Index", "Parameter", new { c = Categories.OtherCompound }, new { })</li>
<li>@Html.ActionLink(Categories.RefrigerantGWP.DisplayString(), "Index", "Parameter", new { c = Categories.RefrigerantGWP }, new { })</li>*@
@*<li>@Html.ActionLink(Categories.RefrigerantGWPOrganization.DisplayString(), "Index", "Parameter", new { c = Categories.RefrigerantGWPOrganization }, new { })</li>*@
<li>@Html.ActionLink(Categories.Septic.DisplayString(), "Index", "Parameter", new { c = Categories.Septic }, new { })</li>
@*<li>@Html.ActionLink(Categories.Transport.DisplayString(), "Index", "Parameter", new { c = Categories.Transport }, new { })</li>
<li>@Html.ActionLink(Categories.Waste.DisplayString(), "Index", "Parameter", new { c = Categories.Waste }, new { })</li>
<li>@Html.ActionLink(Categories.WasteWater.DisplayString(), "Index", "Parameter", new { c = Categories.WasteWater }, new { })</li>*@
</ul>
</li>
<li class="dropdown @actived("YearlyParameter,YearlyParameterCategory", controller)">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">@Resource.StaticLabelYearlyParameterMaintain<span class="caret"></span></a>
<ul class="dropdown-menu" role="menu">
<li>@Html.ActionLink(Categories.Electric.DisplayString(), "Index", "YearlyParameter", new { c = Categories.Electric }, new { })</li>
<li>@Html.ActionLink(Categories.Water.DisplayString(), "Index", "YearlyParameter", new { c = Categories.Water }, new { })</li>
<li>@Html.ActionLink(Categories.Vehicle.DisplayString(), "Index", "YearlyParameter", new { c = Categories.Vehicle }, new { })</li>
<li>@Html.ActionLink(Categories.GasolineEquipment.DisplayString(), "Index", "YearlyParameter", new { c = Categories.GasolineEquipment }, new { })</li>
<li>@Html.ActionLink(Categories.Kitchen.DisplayString(), "Index", "YearlyParameter", new { c = Categories.Kitchen }, new { })</li>
<li>@Html.ActionLink(Categories.Steam.DisplayString(), "Index", "YearlyParameter", new { c = Categories.Steam }, new { })</li>
<li>@Html.ActionLink(Categories.ElectricProduct.DisplayString(), "Index", "YearlyParameter", new { c = Categories.ElectricProduct }, new { })</li>
<li>@Html.ActionLink(Categories.WaterProduct.DisplayString(), "Index", "YearlyParameter", new { c = Categories.WaterProduct }, new { })</li>
<li>@Html.ActionLink(Categories.VehicleProduct.DisplayString(), "Index", "YearlyParameter", new { c = Categories.VehicleProduct }, new { })</li>
<li>@Html.ActionLink(Categories.GasolineEquipmentProduct.DisplayString(), "Index", "YearlyParameter", new { c = Categories.GasolineEquipmentProduct }, new { })</li>
<li>@Html.ActionLink(Categories.KitchenProduct.DisplayString(), "Index", "YearlyParameter", new { c = Categories.KitchenProduct }, new { })</li>
<li>@Html.ActionLink(Categories.SteamProduct.DisplayString(), "Index", "YearlyParameter", new { c = Categories.SteamProduct }, new { })</li>
</ul>
</li>
<li class="dropdown @actived("ParameterDatabase,PCR", controller)">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">@Resource.StaticLabelSimaproParameter<span class="caret"></span></a>
<ul class="dropdown-menu" role="menu">
<li>@Html.ActionLink(Resource.StaticLabelImport, "Import", "ParameterDatabase", new { }, new { })</li>
<li>@Html.ActionLink(Resource.StaticLabelView, "Index", "ParameterDatabase", new { }, new { })</li>
<li>@Html.ActionLink(Resource.StaticLabelPCRList, "Index", "PCR", new { }, new { })</li>
</ul>
</li>
<li class="dropdown @actived("PublicReferenceFile, PublicMessage, account", controller)">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">@Resource.StaticLabelSystem<span class="caret"></span></a>
<ul class="dropdown-menu" role="menu">
@*<li>@Html.ActionLink(Resource.StaticLabelPublicReferenceFile, "Index", "PublicReferenceFile", new { }, new { })</li>
<li>@Html.ActionLink(Resource.StaticLabelPublicMessage, "Index", "PublicMessage", new { }, new { })</li>*@
<li>@Html.ActionLink(Resource.ChangeAdminPassword, "Changepassword", "Account", new { }, new { })</li>
<li>@Html.ActionLink(Resource.PersonalProfile, "UpdateProfile", "Account", new { }, new { })</li>
<li>@Html.ActionLink(Resource.WebSiteInfoSet, "WebSiteInfoSet", "Account", new { }, new { })</li>
<li>@Html.ActionLink(Resource.SystemLog, "Index", "Log", new { }, new { })</li>
</ul>
</li>
<li class="dropdown @actived("", controller)">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">@Resource.StaticLabelCulture<span class="caret"></span></a>
<ul id="setculture" class="dropdown-menu" role="menu">
<li><a href="#">繁體中文<input type="hidden" value="zh-tw" /></a></li>
<li><a href="#">簡體中文<input type="hidden" value="zh-cn" /></a></li>
<li><a href="#">English<input type="hidden" value="en-us" /></a></li>
</ul>
</li>
<li class="dropdown">
<a class="dropdown-toggle" href="javascript:document.getElementById('logoutForm').submit()">@Resources.Resource.StaticLabelGlobal_Logout</a>
</li>
</ul>
</div>
@Html.Partial("_AdminLoginPartial")
</div>
</div>
<div class="container theme-showcase" role="main" style="min-height:100%">
@RenderBody()
</div>
@*<footer>
<div class="container docs-footer">
<div>
<p class="text-left">@Resource.StaticLabelAddress: @Resource.WeeeAddress</p>
<p class="text-left">@Resource.UserPhoneNumber: (02)7728-9341 @Resource.Fax: (02)2243-2586</p>
</div>
<div>
<p class="text-left">E-mail: dafen@weeerohs.com.tw</p>
<p class="text-left">Copyright &copy; 2014 - @Resource.WeeeAndRoHS</p>
</div>
</div>
</footer>*@
@Scripts.Render("~/admin/Scripts")
@Scripts.Render("~/setCulture")
@RenderSection("PageScripts", required: false)
</body>
</html>
<script>
var baseUrl = '@baseUrl';
$(document).ready(function () {
$('#admin_logo').click(function () {
window.location.href = '/admin/home'
})
})
</script>