Skip to content

Saleor Core: the high performance, composable, headless commerce API.

Add version info to template

Krzysztof Wolski731b69babb51
diff --git a/saleor/static/scss/dashboard/dashboard.scss b/saleor/static/scss/dashboard/dashboard.scss
index f9175dbe7c..c4a4c15640 100644
--- a/saleor/static/scss/dashboard/dashboard.scss
+++ b/saleor/static/scss/dashboard/dashboard.scss
@@ -59,7 +59,7 @@ header {
color: $primary-color;
}
}
-
+
}
.search-icon {
background: transparent;
@@ -80,9 +80,9 @@ header {
white-space: normal;
max-width: 90vw;
}
- .menu-toggle {
+ .menu-toggle {
background-color: $primary-color;
- position: absolute;
+ position: absolute;
width: 237px;
z-index: 2;
i {
@@ -121,7 +121,7 @@ header {
right: 0;
white-space: nowrap;
}
-
+
.logo {
img {
max-height: $header-height;
@@ -358,6 +358,11 @@ header {
color: $primary-color;
}
+li#version-indicator {
+ position: absolute;
+ bottom: 0;
+}
+
@import "widget/breadcrumbs";
@import "widget/card";
@import "widget/data-table";
diff --git a/templates/dashboard/base.html b/templates/dashboard/base.html
index 79e2471594..b62e9e75e4 100644
--- a/templates/dashboard/base.html
+++ b/templates/dashboard/base.html
@@ -1,6 +1,7 @@
<!DOCTYPE html>
{% load staticfiles i18n %}
{% load render_bundle from webpack_loader %}
+{% load version %}
<html lang="{{ LANGUAGE_CODE }}" class="no-js">
<head>
@@ -92,6 +93,11 @@
{% trans "Site settings" context "Dashboard side navigation link" %}</a></li>
</ul>
</li>
+ {% if request.user.is_superuser %}
+ <li class="side-nav-section" id="version-indicator">
+ <p>{% trans "Release" context "Dashboard software version" %}: {% version %}</p>
+ </li>
+ {% endif %}
</ul>
<ul>
<li class="menu-toggle">