Browse Source

Added ABP version to footer

pull/237/head
Galip Tolga Erdem 3 years ago
parent
commit
caa5e8eef2
  1. 7
      apps/public-web/src/EShopOnAbp.PublicWeb/Components/Toolbar/Footer/Default.cshtml
  2. 24
      apps/public-web/src/EShopOnAbp.PublicWeb/Components/Toolbar/Footer/FooterComponent.cs

7
apps/public-web/src/EShopOnAbp.PublicWeb/Components/Toolbar/Footer/Default.cshtml

@ -1,4 +1,6 @@
<div class="lpx-footbar-container" style="z-index: 10000; background: none !important;"> @model EShopOnAbp.PublicWeb.Components.Toolbar.Footer.FooterModel
<div class="lpx-footbar-container" style="z-index: 10000; background: none !important;">
<div class="lpx-footbar"> <div class="lpx-footbar">
<div class="lpx-footbar-copyright"> <div class="lpx-footbar-copyright">
<span>This website is built on top of the </span> <span>This website is built on top of the </span>
@ -6,5 +8,8 @@
<span> and the source code is available at </span> <span> and the source code is available at </span>
<a href="https://github.com/abpframework/eShopOnAbp" target="_blank">github.com/abpframework/eShopOnAbp</a> <a href="https://github.com/abpframework/eShopOnAbp" target="_blank">github.com/abpframework/eShopOnAbp</a>
</div> </div>
<div class="lpx-footbar-solo-links">
<a href="javascript:void(0)">ABP @Model.AbpVersion</a>
</div>
</div> </div>
</div> </div>

24
apps/public-web/src/EShopOnAbp.PublicWeb/Components/Toolbar/Footer/FooterComponent.cs

@ -1,13 +1,25 @@
using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc;
using Volo.Abp.AspNetCore.Mvc; using Volo.Abp.AspNetCore.Mvc;
namespace EShopOnAbp.PublicWeb.Components.Toolbar.Footer namespace EShopOnAbp.PublicWeb.Components.Toolbar.Footer;
public class FooterComponent : AbpViewComponent
{ {
public class FooterComponent : AbpViewComponent private readonly FooterModel _model = new();
public FooterComponent()
{ {
public virtual IViewComponentResult Invoke() System.Diagnostics.FileVersionInfo fvi = System.Diagnostics.FileVersionInfo.GetVersionInfo(typeof(AbpViewComponent).Assembly.Location);
{ _model.AbpVersion = fvi.FileVersion;
return View("~/Components/Toolbar/Footer/Default.cshtml"); }
}
public virtual IViewComponentResult Invoke()
{
return View("~/Components/Toolbar/Footer/Default.cshtml", _model);
} }
} }
public class FooterModel
{
public string AbpVersion { get; set; }
}
Loading…
Cancel
Save