Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: b7137c2462
Fetching contributors…

Cannot retrieve contributors at this time

85 lines (82 sloc) 3.588 kb
{% load i18n l10n sekizai_tags admin_static %}
{% load url from future %}
{% addtoblock "css" %}<link rel="stylesheet" href="{% static "cms/css/cms.base.css" %}" />{% endaddtoblock %}
{% addtoblock "js" %}
<script>
var _jQuery = window.jQuery || undefined;
var _$ = window.$ || undefined;
</script>
<script src="{% static "cms/js/libs/jquery.min.js" %}"></script>
<script src="{% static "cms/js/libs/class.min.js" %}"></script>
<script src="{% static "cms/js/plugins/jquery.ui.custom.js" %}"></script>
<script src="{% static "cms/js/plugins/jquery.ui.nestedsortable.js" %}"></script>
<script src="{% static "cms/js/plugins/cms.base.js" %}"></script>
<script src="{% static "cms/js/plugins/cms.modal.js" %}"></script>
<script src="{% static "cms/js/plugins/cms.sideframe.js" %}"></script>
<script src="{% static "cms/js/plugins/cms.clipboard.js" %}"></script>
<script src="{% static "cms/js/plugins/cms.plugins.js" %}"></script>
<script src="{% static "cms/js/plugins/cms.structureboard.js" %}"></script>
<script src="{% static "cms/js/plugins/cms.toolbar.js" %}"></script>
{% language request.toolbar.toolbar_language %}
<script>
(function($) {
// CMS.$ will be passed for $
$(document).ready(function () {
// this is a global shared configuration
CMS.config = {
'mode': {% if request.toolbar.edit_mode %}'draft'{% else %}'live'{% endif %},
'auth': {% if user.is_authenticated %}true{% else %}false{% endif %},
'debug': {% if debug %}true{% else %}false{% endif %},
'csrf': '{{ csrf_token }}',
'request': {
'language': '{{ request.GET.language }}',
'page_id': '{{ request.current_page.pk }}'
},
'lang': {
'debug': '{% blocktrans %}Development version using django CMS {{ cms_version }}{% endblocktrans %}',
'cancel': '{% trans "Cancel" %}',
'error': '<strong>{% trans "The following error occured:" %}</strong> ',
'success': '{% trans "Action successfull... reloading." %}',
'confirm': '{% trans "Are you sure you want to delete this plugin?" %}',
'publish': '{% trans "Publishing this page will activate it within the menu and set it live. Are you sure?" %}'
},
'urls': {
'settings': '{% url "admin:cms_usersettings_session_store" %}', // url to save settings
'static': '{{ STATIC_URL }}'
},
'settings': {
'version': '{{ cms_version }}',
'toolbar': 'expanded',
'mode': 'edit',
'sideframe': { 'url': '' },
'states': []
},
'clipboard': {
'id': '{{ request.toolbar.clipboard.pk|unlocalize }}',
'url': '{% if request.toolbar.clipboard.pk %}{% url "admin:cms_page_clear_placeholder" request.toolbar.clipboard.pk %}{% endif %}'
},
'reload': {
'url': '{% url "admin:cms_page_resolve" %}',
'model': '{{ request.toolbar.get_object_model }}',
'pk': '{{ request.toolbar.get_object_pk }}'
},
'messages': '{% if messages %}{% for message in messages %}{{ message }}{% endfor %}{% endif %}',
'error': '{% if request.toolbar.login_form.errors %}{% blocktrans %}<strong>Login failed.</strong> Please check your credentials and try again.{% endblocktrans %}{% endif %}',
'publisher': '{% if not request.current_page.publisher_is_draft and request.current_page.publisher_draft.is_dirty and user.is_authenticated %}{% trans "This page has unpublished changes." %}{% endif %}'
};
CMS.settings = CMS.API.Helpers.getSettings();
// extends API
$.extend(CMS.API, {
'Toolbar': new CMS.Toolbar(),
'Clipboard': new CMS.Clipboard(),
'StructureBoard': new CMS.StructureBoard()
});
});
})(CMS.$);
</script>
{% endlanguage %}
<script>
window.jQuery = _jQuery;
window.$ = _$;
</script>
{% endaddtoblock %}
Jump to Line
Something went wrong with that request. Please try again.