-
Notifications
You must be signed in to change notification settings - Fork 53
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Version 2.0.0 Incompatible with DjangoCMS Admin Style #34
Comments
Thanks for sharing @carderm! I still had issues with it, so I made a fix without fork. With {# FIXME: This is a workaround to https://github.com/alesdotio/django-admin-shortcuts/issues/34 #}
{# It consists in a merge of both conflicting base_site.html #}
{% extends "admin/base.html" %}
{% load i18n static admin_style_tags admin_shortcuts_tags %}
{% block extrastyle %}
{{ block.super }}
{% include 'admin/inc/extrastyle.html' %}
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.8.1/css/solid.css" integrity="sha384-QokYePQSOwpBDuhlHOsX0ymF6R/vLk/UQVz3WHa6wygxI5oGTmDTv8wahFOSspdm" crossorigin="anonymous">
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.8.1/css/fontawesome.css" integrity="sha384-vd1e11sR28tEK9YANUtpIOdjGW14pS87bUBuOIoBILVWLFnS+MCX9T6MMf0VdPGq" crossorigin="anonymous">
<style type="text/css">{% admin_shortcuts_css %}</style>
{% endblock %}
{% block extrahead %}
{{ block.super }}
<meta name="viewport" content="width=device-width,initial-scale=1" />
<link rel="stylesheet" type="text/css" href="{% static 'djangocms_admin_style/css/djangocms-admin.css' %}" />
{% if request.user.is_superuser %}{% render_update_notification %}{% endif %}
<script src="{% static 'djangocms_admin_style/js/dist/bundle.adminstyle.min.js' %}"></script>
{% include 'admin/inc/extrahead.html' %}
{% admin_shortcuts_js %}
{% endblock %}
{% block title %}{% include 'admin/inc/title.html' %}{% endblock %}
{% block bodyclass %}{{ block.super }} djangocms-admin-style{% endblock %}
{% block branding %}{% include 'admin/inc/branding.html' %}{% endblock %}
{% block userlinks %}{% include 'admin/inc/userlinks.html' %}{{ block.super }}{% endblock %}
{% block nav-global %}
{% block admin_shortcuts %}
</div> {# this closes the #header div #}
<div class="admin_shortcuts">
{% admin_shortcuts %}
{# </div> don't close this one, because it's closed in base.html #}
{% endblock %}
{% endblock %}
{% block main %}{% endblock %}
{% block count %}{% endblock %}
{% block advanced %}{% endblock %}
{% block icons %}{% endblock %}
.admin_shortcuts .shortcuts li a .icon {
position: static;
color: inherit;
}
.admin_shortcuts .shortcuts li a .icon i {
font-size: inherit;
} |
Thanks @BertrandBordage - do you think this could be merged as a pull request to resolve the issues? |
I'm not sure it's that simple, as this module needs to support the builtin Django admin as well as django-cms-admin-style… |
Starting djangocms-admin-style v3.2.1 it does not work because they removed support for shortcuts https://github.com/django-cms/djangocms-admin-style/blob/d2055f107d2ac0b1e30460ff84f83cfa52087fd5/djangocms_admin_style/sass/djangocms-admin.scss#L31. Here you can compare changes between 3.2.0 and 3.2.1 What I did instead is took content from
And here what I get after converting it:
Then I placed it after a line |
Hi - the new version 2.0.0 overwrites the admin/base_site.html which is also overwritten by djangocms_admin_style.
Unfortunately only one can take precedence.. I've started on a fix (https://github.com/mcldev/django-admin-shortcuts) that will create a second app 'admin_shortcuts_django_cms' (can be called whatever)... that will create overrides of DjangoCMS Admin Style specific templates only, leaving their base_site template.
There are still some formatting issues - but they could be handled by DjangoCMS Admin Style?
The text was updated successfully, but these errors were encountered: