mirror of
https://github.com/Hopiu/wagtail.git
synced 2026-05-12 01:03:11 +00:00
Merge pull request #611 from kaedroho/feature/version-indicator
Added version indicator to admin dashboard
This commit is contained in:
commit
f23cec2cc7
6 changed files with 18 additions and 6 deletions
|
|
@ -29,6 +29,9 @@ if not on_rtd: # only import and set the theme if we're building docs locally
|
|||
# documentation root, use os.path.abspath to make it absolute, like shown here.
|
||||
sys.path.insert(0, os.path.abspath('..'))
|
||||
|
||||
# Get Wagtail version
|
||||
from wagtail.wagtailcore import __version__
|
||||
|
||||
# Autodoc may need to import some models modules which require django settings
|
||||
# be configured
|
||||
os.environ['DJANGO_SETTINGS_MODULE'] = 'wagtail.tests.settings'
|
||||
|
|
@ -70,9 +73,9 @@ copyright = u'2014, Torchbox'
|
|||
# built documents.
|
||||
#
|
||||
# The short X.Y version.
|
||||
version = '0.5'
|
||||
version = __version__
|
||||
# The full version, including alpha/beta/rc tags.
|
||||
release = '0.5'
|
||||
release = __version__
|
||||
|
||||
# The language for content autogenerated by Sphinx. Refer to documentation
|
||||
# for a list of supported languages.
|
||||
|
|
|
|||
4
setup.py
4
setup.py
|
|
@ -2,6 +2,8 @@
|
|||
|
||||
import sys
|
||||
|
||||
from wagtail.wagtailcore import __version__
|
||||
|
||||
|
||||
try:
|
||||
from setuptools import setup, find_packages
|
||||
|
|
@ -47,7 +49,7 @@ if not PY3:
|
|||
|
||||
setup(
|
||||
name='wagtail',
|
||||
version='0.5',
|
||||
version=__version__,
|
||||
description='A Django content management system focused on flexibility and user experience',
|
||||
author='Matthew Westcott',
|
||||
author_email='matthew.westcott@torchbox.com',
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
{% extends "wagtailadmin/admin_base.html" %}
|
||||
{% load wagtailadmin_tags %}
|
||||
{% load wagtailadmin_tags wagtailcore_tags %}
|
||||
{% load i18n %}
|
||||
{% block furniture %}
|
||||
<div class="nav-wrapper">
|
||||
<div class="inner">
|
||||
<a href="{% url 'wagtailadmin_home' %}" class="logo"><img src="{{ STATIC_URL }}wagtailadmin/images/wagtail-logo.svg" alt="Wagtail" width="80" /><span>{% trans "Dashboard" %}</span></a>
|
||||
<a href="{% url 'wagtailadmin_home' %}" class="logo" title="Wagtail v.{% wagtail_version %}"><img src="{{ STATIC_URL }}wagtailadmin/images/wagtail-logo.svg" alt="Wagtail" width="80" /><span>{% trans "Dashboard" %}</span></a>
|
||||
{% main_nav %}
|
||||
</div>
|
||||
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@
|
|||
<div class="avatar icon icon-user"><img src="{% gravatar_url user.email %}" /></div>
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="col10">
|
||||
<div class="col9">
|
||||
<h1>{% blocktrans %}Welcome to the {{ site_name }} Wagtail CMS{% endblocktrans %}</h1>
|
||||
<h2>{{ user.get_full_name|default:user.username }}</h2>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -1 +1,2 @@
|
|||
__version__ = '0.5'
|
||||
default_app_config = 'wagtail.wagtailcore.apps.WagtailCoreAppConfig'
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ from django.utils.safestring import mark_safe
|
|||
|
||||
from wagtail.wagtailcore.models import Page
|
||||
from wagtail.wagtailcore.rich_text import expand_db_html
|
||||
from wagtail.wagtailcore import __version__
|
||||
|
||||
register = template.Library()
|
||||
|
||||
|
|
@ -27,6 +28,11 @@ def slugurl(context, slug):
|
|||
return None
|
||||
|
||||
|
||||
@register.simple_tag
|
||||
def wagtail_version():
|
||||
return __version__
|
||||
|
||||
|
||||
@register.filter
|
||||
def richtext(value):
|
||||
return mark_safe('<div class="rich-text">' + expand_db_html(value) + '</div>')
|
||||
|
|
|
|||
Loading…
Reference in a new issue