1
0
mirror of https://git.teknik.io/Teknikode/Teknik.git synced 2023-08-02 14:16:22 +02:00

Added git version to footer

This commit is contained in:
Uncled1023 2015-12-17 14:52:11 -08:00
parent caa08e72ba
commit cbac6d1fd3
2 changed files with 15 additions and 3 deletions

View File

@ -24,7 +24,7 @@ body { padding-top: 70px; }
#footer {
height: 60px;
text-align: center;
padding: 25px 0;
padding: 15px 0;
margin-top: 20px;
margin-bottom: 0;
border-radius: 0;

View File

@ -1,5 +1,17 @@
<footer id="footer" class="footer navbar navbar-default">
@using System.Diagnostics;
@using System.Reflection;
<footer id="footer" class="footer navbar navbar-default">
<div class="container">
<p class="text-muted">&copy; Teknik 2013-2015 | @string.Format("v{0}", ViewContext.Controller.GetType().Assembly.GetName().Version) | @Html.ActionLink("Privacy", "Index", "Privacy", new { area = "Privacy"}, htmlAttributes: new { title = "Privacy" }) | @Html.ActionLink("Transparency", "Index", "Transparency", new { area = "Transparency" }, htmlAttributes: new { title = "Transparency" }) | @Html.ActionLink("Server", "Index", "Server", new { area = "Server" }, htmlAttributes: new { title = "Server" })</p>
@{
Assembly assembly = ViewContext.Controller.GetType().Assembly;
FileVersionInfo fileVersionInfo = FileVersionInfo.GetVersionInfo(assembly.Location);
string version = fileVersionInfo.ProductVersion;
}
<p class="text-muted">
&copy; Teknik 2013-2015 | @Html.ActionLink("Privacy", "Index", "Privacy", new { area = "Privacy"}, htmlAttributes: new { title = "Privacy" }) | @Html.ActionLink("Transparency", "Index", "Transparency", new { area = "Transparency" }, htmlAttributes: new { title = "Transparency" }) | @Html.ActionLink("Server", "Index", "Server", new { area = "Server" }, htmlAttributes: new { title = "Server" })
<br />
@string.Format("{0}", version)
</p>
</div>
</footer>