diff --git a/cms/forms/wizards.py b/cms/forms/wizards.py index 0dbe6968b9d..0248c32a7d4 100644 --- a/cms/forms/wizards.py +++ b/cms/forms/wizards.py @@ -8,6 +8,7 @@ from django.utils.encoding import smart_text from django.utils.translation import ugettext_lazy as _, get_language +from cms import __version__ from cms.api import generate_valid_slug from cms.constants import PAGE_TYPES_ID from cms.exceptions import NoPermissionsException @@ -77,11 +78,11 @@ class PageTypeSelect(forms.widgets.Select): """ class Media: js = ( - 'cms/js/modules/jquery.noconflict.pre.js', - 'cms/js/dist/bundle.admin.base.min.js', - 'cms/js/modules/cms.base.js', - 'cms/js/widgets/wizard.pagetypeselect.js', - 'cms/js/modules/jquery.noconflict.post.js' + 'cms/js/modules/jquery.noconflict.pre.js?%s' % __version__, + 'cms/js/dist/bundle.admin.base.min.js?%s' % __version__, + 'cms/js/modules/cms.base.js?%s' % __version__, + 'cms/js/widgets/wizard.pagetypeselect.js?%s' % __version__, + 'cms/js/modules/jquery.noconflict.post.js?%s' % __version__ ) diff --git a/cms/templates/admin/cms/page/change_form.html b/cms/templates/admin/cms/page/change_form.html index 411211e254f..93858bc5deb 100644 --- a/cms/templates/admin/cms/page/change_form.html +++ b/cms/templates/admin/cms/page/change_form.html @@ -16,11 +16,11 @@ {{ block.super }} {# load nonconflict pre and post files to fix conflict if there is another jQuery loaded #} {# the code is included by a external file because the code has to be loaded into a python file where the wizard is loaded as well #} - - - - - + + + + + {% endblock %} {% block content_title %} diff --git a/cms/templates/admin/cms/page/tree/base.html b/cms/templates/admin/cms/page/tree/base.html index 8ad8c552cf2..e534a612a5b 100644 --- a/cms/templates/admin/cms/page/tree/base.html +++ b/cms/templates/admin/cms/page/tree/base.html @@ -17,11 +17,11 @@ {% block coltype %}flex{% endblock %} {% block extrastyle %} {{ block.super }} - - - + + + {% if cl.is_filtered %} - + {% endif %} {% endblock extrastyle %} @@ -30,10 +30,10 @@ {% block jquery %}{% endblock %} {# load nonconflict pre and post files to fix conflict if there is another jQuery loaded #} {# the code is included by a external file because the code has to be loaded into a python file where the wizard is loaded as well #} - - + + {# load changelist and jstree #} - + - + {% endblock extrahead %} {% block content %} diff --git a/cms/templates/cms/toolbar/toolbar_javascript.html b/cms/templates/cms/toolbar/toolbar_javascript.html index bc1d2ba869d..fe6c0192041 100644 --- a/cms/templates/cms/toolbar/toolbar_javascript.html +++ b/cms/templates/cms/toolbar/toolbar_javascript.html @@ -1,10 +1,10 @@ {% load i18n l10n sekizai_tags admin_static cms_tags %} -{% addtoblock "css" %}{% endaddtoblock %} +{% addtoblock "css" %}{% endaddtoblock %} {% addtoblock "js" %} - - + + {% language request.toolbar.toolbar_language %} {% endlanguage %} - + {% endaddtoblock %} diff --git a/cms/templates/cms/welcome.html b/cms/templates/cms/welcome.html index 5b6d3574db5..ae9d698b9a9 100644 --- a/cms/templates/cms/welcome.html +++ b/cms/templates/cms/welcome.html @@ -6,8 +6,8 @@ {% trans "django CMS" %} {% render_block "css" %} - - + + {% cms_toolbar %} diff --git a/cms/templates/cms/wizards/base.html b/cms/templates/cms/wizards/base.html index 5d2e826912d..bad4d3df46a 100755 --- a/cms/templates/cms/wizards/base.html +++ b/cms/templates/cms/wizards/base.html @@ -13,7 +13,7 @@ {% block extrahead %} {{ block.super }} - - + + {{ form.media }} {% endblock %} diff --git a/cms/templatetags/cms_admin.py b/cms/templatetags/cms_admin.py index 0d96895a8d9..49975956e87 100644 --- a/cms/templatetags/cms_admin.py +++ b/cms/templatetags/cms_admin.py @@ -2,6 +2,7 @@ from classytags.arguments import Argument from classytags.core import Options, Tag from classytags.helpers import InclusionTag +from cms import __version__ from cms.constants import PUBLISHER_STATE_PENDING from cms.utils import get_cms_setting from cms.utils.admin import get_admin_menu_item_context @@ -252,6 +253,9 @@ def admin_static_url(): """ return getattr(settings, 'ADMIN_MEDIA_PREFIX', None) or ''.join([settings.STATIC_URL, 'admin/']) +@register.simple_tag +def get_cms_version(): + return __version__ class CMSAdminIconBase(Tag): name = 'cms_admin_icon_base' @@ -284,4 +288,4 @@ def submit_row_plugin(context): } if context.get('original') is not None: ctx['original'] = context['original'] - return ctx \ No newline at end of file + return ctx diff --git a/cms/wizards/forms.py b/cms/wizards/forms.py index 4f8eecec17e..22e7cbfaf74 100755 --- a/cms/wizards/forms.py +++ b/cms/wizards/forms.py @@ -2,6 +2,7 @@ from django import forms +from cms import __version__ from cms.models import Page from .wizard_pool import entry_choices @@ -46,13 +47,13 @@ class WizardStep1Form(BaseFormMixin, forms.Form): class Media: css = { - 'all': ('cms/css/cms.wizard.css', ) + 'all': ('cms/css/cms.wizard.css?%s' % __version__, ) } js = ( - 'cms/js/modules/jquery.noconflict.pre.js', - 'cms/js/dist/bundle.admin.base.min.js', - 'cms/js/modules/cms.wizards.js', - 'cms/js/modules/jquery.noconflict.post.js' + 'cms/js/modules/jquery.noconflict.pre.js?%s' % __version__, + 'cms/js/dist/bundle.admin.base.min.js?%s' % __version__, + 'cms/js/modules/cms.wizards.js?%s' % __version__, + 'cms/js/modules/jquery.noconflict.post.js?%s' % __version__, ) page = forms.ModelChoiceField(