Added Wagtail version to settings menu

pull/2782/head
Chris Rogers 2016-06-21 21:59:02 +01:00 zatwierdzone przez Matt Westcott
rodzic 4244cc0dfa
commit daf68f5e2e
6 zmienionych plików z 29 dodań i 7 usunięć

Wyświetl plik

@ -15,6 +15,7 @@ Changelog
* Multiple ChooserBlocks inside a StreamField are now prefetched in bulk, for improved performance (Michael van Tellingen, Roel Bruggink, Matt Westcott)
* Add new EmailBlock and IntegerBlock (Oktay Altay)
* Added a new FloatBlock, DecimalBlock and a RegexBlock (Oktay Altay, Andy Babic)
* Wagtail version number is now shown on the settings menu (Chris Rogers)
* Fix: Email templates and document uploader now support custom `STATICFILES_STORAGE` (Jonny Scholes)
* Fix: Removed alignment options (deprecated in HTML and not rendered by Wagtail) from `TableBlock` context menu (Moritz Pfeiffer)
* Fix: Fixed incorrect CSS path on ModelAdmin's "choose a parent page" view

Wyświetl plik

@ -24,6 +24,7 @@ Minor features
* The wagtailimages.Filter model has been removed, and converted to a Python class instead (Gagaro)
* Multiple ChooserBlocks inside a StreamField are now prefetched in bulk, for improved performance (Michael van Tellingen, Roel Bruggink, Matt Westcott)
* Added new EmailBlock and IntegerBlock (Oktay Altay)
* Wagtail version number is now shown on the settings menu (Chris Rogers)
Bug fixes

Wyświetl plik

@ -9,7 +9,7 @@ $submenu-color: darken($color-grey-1, 5%);
height: 100%;
min-height: 800px;
background: $color-grey-1;
.inner {
background: $color-grey-1;
}
@ -34,7 +34,7 @@ $submenu-color: darken($color-grey-1, 5%);
overflow: auto;
width: 100%;
ul,
ul,
li {
margin: 0;
padding: 0;
@ -136,6 +136,11 @@ $submenu-color: darken($color-grey-1, 5%);
li {
border: 0;
}
.wagtail-version {
padding: 1.2em 1.7em;
text-align: center;
}
}
.explorer {
@ -153,7 +158,7 @@ $submenu-color: darken($color-grey-1, 5%);
@include visuallyhidden();
}
input,
input,
button {
border-radius: 0;
font-size: 1em;
@ -171,7 +176,7 @@ $submenu-color: darken($color-grey-1, 5%);
background-color: darken($color-grey-2, 10%);
}
&:active,
&:active,
&:focus {
background-color: darken($color-grey-2, 5%);
color: $color-white;
@ -358,6 +363,7 @@ body.explorer-open {
opacity: 0.15;
}
}
}
li.submenu-active {
@ -434,7 +440,7 @@ body.explorer-open {
}
// Media query hacks to detect IE10+ which doesn't support 3d transform of static elements and needs a fallback
@media all and (-ms-high-contrast: none),
@media all and (-ms-high-contrast: none),
all and (-ms-high-contrast: active) {
.wrapper {
@include transition(left 0.2s ease);

Wyświetl plik

@ -0,0 +1,8 @@
{% extends "wagtailadmin/shared/menu_submenu_item.html" %}
{% load wagtailcore_tags %}
{% block menu_footer %}
<li class="footer">
<div class="menu-item"><p class="wagtail-version">Wagtail v.{% wagtail_version %}</p></div>
</li>
{% endblock %}

Wyświetl plik

@ -2,6 +2,8 @@
<a href="#" class="submenu-trigger {{ classnames }}"{{ attr_string }}>{{ label }}</a>
<div class="nav-submenu">
<h2 class="{{ classnames }}">{{ label }}</h2>
<ul>{{ menu_html }}</ul>
<ul>{{ menu_html }}
{% block menu_footer %}{% endblock %}
</ul>
</div>
</li>

Wyświetl plik

@ -28,9 +28,13 @@ def register_explorer_menu_item():
order=100)
class SettingsMenuItem(SubmenuMenuItem):
template = 'wagtailadmin/shared/menu_settings_menu_item.html'
@hooks.register('register_admin_menu_item')
def register_settings_menu():
return SubmenuMenuItem(
return SettingsMenuItem(
_('Settings'), settings_menu, classnames='icon icon-cogs', order=10000)