django-cms / djangocms-admin-style

django CMS Admin Style is a Django Theme tailored to the needs of django CMS.

Home Page:http://www.django-cms.org/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Use the standard Django CMS toolbar for admin pages

leetucker opened this issue · comments

In our project, we have quite a bit of functionality that staff users do directly in admin views, but as soon as they enter an admin site page, the standard Django CMS toolbar disappears. Many users have found this confusing.

On a per-installation basis, it's possible to make all admin pages show the same toolbar as regular Django CMS pages by overriding templates/admin/inc/branding.html and templates/admin/base_site.html. However, it would very nice to make this either default behavior, or at least behavior that could be easily enabled without overriding multiple templates.

Here's what would be needed:

  • Add package dependencies to Django CMS and django-sekizai
  • modify templates/admin/inc/branding.html to load cms_tags template tags and simply call the {% cms_toolbar %} template tag
  • modify templates/admin/base_site.html to load sekizai_tags template tags and render the "css" and "js" blocks required to load static content for the Django CMS toolbar.

If you don't want to require Django CMS and django-sekizai for this app, then perhaps it would be possible to implement a parameter in settings that, if enabled (and if Django CMS and Sekizai are installed), loads the Django CMS toolbar in place of the current toolbar.

@leetucker thank you very much for the request.

We see the confusion and issues though would like to point out that the admin should be loaded via the toolbar itself through "Site" > "Administration". I personally like to have a slightly different toolbar when going to "/admin" just to visualize that you are not in the "regular" django CMS zone.

We could consider having an option to enable such an extra functionality, however I cannot comment on the implementation for django-sekizai.