Skip to content

Commit a5a0a50

Browse files
authored
Merge pull request #412 from maykinmedia/feature/#21-show-version-admin
[#21] show version in admin
2 parents f8125b5 + 1c14814 commit a5a0a50

File tree

6 files changed

+13
-43
lines changed

6 files changed

+13
-43
lines changed

requirements/base.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ notifications-api-common==0.2.2
232232
# via
233233
# -r requirements/base.in
234234
# commonground-api-common
235-
open-api-framework==0.4.2
235+
open-api-framework==0.5.0
236236
# via -r requirements/base.in
237237
orderedmultidict==1.0.1
238238
# via furl

requirements/ci.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -369,7 +369,7 @@ notifications-api-common==0.2.2
369369
# via
370370
# -r requirements/base.txt
371371
# commonground-api-common
372-
open-api-framework==0.4.2
372+
open-api-framework==0.5.0
373373
# via -r requirements/base.txt
374374
orderedmultidict==1.0.1
375375
# via

requirements/dev.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -414,7 +414,7 @@ notifications-api-common==0.2.2
414414
# via
415415
# -r requirements/ci.txt
416416
# commonground-api-common
417-
open-api-framework==0.4.2
417+
open-api-framework==0.5.0
418418
# via -r requirements/ci.txt
419419
orderedmultidict==1.0.1
420420
# via

src/objects/conf/dev.py

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
"SECRET_KEY", "2(@f(-6s_u(5fd&1sg^uvu2s(c-9sapw)1era8q&)g)h@cwxxg"
99
)
1010
os.environ.setdefault("IS_HTTPS", "no")
11+
os.environ.setdefault("RELEASE", "dev")
1112
os.environ.setdefault("ENVIRONMENT", "development")
1213

1314
os.environ.setdefault("DB_NAME", "objects"),

src/objects/scss/admin/_admin_theme.scss

+6-32
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,12 @@ DO NOT PUT ANY TARGET APP-SPECIFIC RULES HERE.
3636

3737
--object-tools-bg: #888;
3838
--object-tools-hover-bg: #{$color_dark};
39+
40+
// version styling
41+
--version-fg: var(--body-quiet-color);
42+
43+
// environment styling
44+
--env-button-fg: #{$color-secondary};
3945
}
4046

4147
/* Overrides */
@@ -132,38 +138,6 @@ div.breadcrumbs {
132138
background: url("../img/admin/calendar-alt-regular.svg") 0 0/14px 14px no-repeat !important;
133139
}
134140

135-
/* Footer */
136-
.version {
137-
padding: 0 30px;
138-
color: $color-secondary-dark;
139-
font-size: smaller;
140-
141-
@at-root .login & {
142-
text-align: center;
143-
}
144-
}
145-
146-
/**
147-
* Environment banner
148-
*/
149-
.env {
150-
display: block;
151-
line-height: 35px;
152-
text-align: center;
153-
font-weight: bold;
154-
text-transform: uppercase;
155-
color: $color-secondary;
156-
background-color: $color-dark;
157-
position: fixed;
158-
top: 0;
159-
height: 35px;
160-
width: 300px;
161-
left: 50%;
162-
margin-left: -150px;
163-
z-index: 1000001;
164-
box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.2);
165-
}
166-
167141
/**
168142
* Django form field lengths
169143
*/

src/objects/templates/admin/base_site.html

+3-8
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
1-
{% extends "admin/base.html" %}
1+
{% extends "open_api_framework/admin/base_site.html" %}
22
{% load i18n static %}
33

44
{% block title %}{{ title }} | {{ settings.PROJECT_NAME }}{% endblock %}
55

66
{% block extrastyle %}
77
{{ block.super }}
8+
89
<link rel="stylesheet" type="text/css" href="{% static 'bundles/admin_overrides.css' %}">
910

1011
<link rel="icon" type="image/png" href="{% static 'ico/favicon.png' %}">
@@ -35,15 +36,9 @@ <h1 id="site-name"><a href="{% url 'admin:index' %}">{{ settings.PROJECT_NAME }}
3536

3637
{% block nav-global %}{% endblock %}
3738

38-
{% block messages %}
39-
{% if settings.ENVIRONMENT_SHOWN_IN_ADMIN %}
40-
<div class="env env-{{ settings.ENVIRONMENT }}">{{ settings.ENVIRONMENT }}</div>
41-
{% endif %}
42-
{{ block.super }}
43-
{% endblock %}
44-
4539
{% block footer %}
4640
{{ block.super }}
41+
4742
{# Load the custom JS #}
4843
<script src="{% static 'bundles/objects-js.js' %}"></script>
4944
{% endblock %}

0 commit comments

Comments
 (0)