Skip to content

Commit

Permalink
Merge pull request #353 from betadots/issue-340
Browse files Browse the repository at this point in the history
Show version number in footer #340
  • Loading branch information
rwaffen authored Apr 11, 2024
2 parents c576292 + b1dc9ec commit f22314e
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 16 deletions.
39 changes: 23 additions & 16 deletions app/views/layouts/application.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -34,22 +34,29 @@
</main>

<footer class="footer bg-light mt-auto py-4">
<div class="container text-center">
© <%= Date.today.year %>
<a href="https://betadots.de/" class="text-dark">
<%= image_tag "betadots.png", alt: "betadots logo", width: "32", height: "32" %>
betadots GmbH
</a>
-
Licensed under
<a href="/~https://github.com/betadots/hdm/blob/main/LICENSE">
GNU Affero General Public License v3.0
</a>
-
<a href="/~https://github.com/betadots/hdm">
<%= icon("github") %>
Source code
</a>
<div class="container">
<div class="row">
<div class="col text-end">
<span class="font-monospace"><%= Hdm::VERSION %></span>
<br>
© <%= Date.today.year %>
<a href="https://betadots.de/" class="text-dark">
<%= image_tag "betadots.png", alt: "betadots logo", width: "32", height: "32" %>
betadots GmbH
</a>
</div>
<div class="col">
Licensed under
<a href="/~https://github.com/betadots/hdm/blob/main/LICENSE">
GNU Affero General Public License v3.0
</a>
<br>
<a href="/~https://github.com/betadots/hdm">
<%= icon("github") %>
Source code
</a>
</div>
</div>
</div>
</footer>
<%= yield :modals %>
Expand Down
6 changes: 6 additions & 0 deletions config/initializers/version.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Hdm::VERSION =
if system("git --version >>/dev/null 2>&1")
`git describe`.chomp
else
"unknown"
end

0 comments on commit f22314e

Please sign in to comment.